Compartilhar via


DevicePolicyManager.StopUser(ComponentName, UserHandle) Method

Definition

Called by a device owner to stop the specified secondary user.

[Android.Runtime.Register("stopUser", "(Landroid/content/ComponentName;Landroid/os/UserHandle;)I", "GetStopUser_Landroid_content_ComponentName_Landroid_os_UserHandle_Handler", ApiSince=28)]
public virtual Android.OS.UserOperationResultCode StopUser (Android.Content.ComponentName admin, Android.OS.UserHandle userHandle);
[<Android.Runtime.Register("stopUser", "(Landroid/content/ComponentName;Landroid/os/UserHandle;)I", "GetStopUser_Landroid_content_ComponentName_Landroid_os_UserHandle_Handler", ApiSince=28)>]
abstract member StopUser : Android.Content.ComponentName * Android.OS.UserHandle -> Android.OS.UserOperationResultCode
override this.StopUser : Android.Content.ComponentName * Android.OS.UserHandle -> Android.OS.UserOperationResultCode

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with.

userHandle
UserHandle

the user to be stopped.

Returns

one of the following result codes: UserManager#USER_OPERATION_ERROR_UNKNOWN, UserManager#USER_OPERATION_SUCCESS, UserManager#USER_OPERATION_ERROR_MANAGED_PROFILE, UserManager#USER_OPERATION_ERROR_CURRENT_USER

Attributes

Remarks

Called by a device owner to stop the specified secondary user.

Java documentation for android.app.admin.DevicePolicyManager.stopUser(android.content.ComponentName, android.os.UserHandle).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to