Udostępnij za pośrednictwem


DevicePolicyManager.GetSecondaryUsers(ComponentName) Method

Definition

Called by a device owner to list all secondary users on the device.

[Android.Runtime.Register("getSecondaryUsers", "(Landroid/content/ComponentName;)Ljava/util/List;", "GetGetSecondaryUsers_Landroid_content_ComponentName_Handler", ApiSince=28)]
public virtual System.Collections.Generic.IList<Android.OS.UserHandle>? GetSecondaryUsers (Android.Content.ComponentName admin);
[<Android.Runtime.Register("getSecondaryUsers", "(Landroid/content/ComponentName;)Ljava/util/List;", "GetGetSecondaryUsers_Landroid_content_ComponentName_Handler", ApiSince=28)>]
abstract member GetSecondaryUsers : Android.Content.ComponentName -> System.Collections.Generic.IList<Android.OS.UserHandle>
override this.GetSecondaryUsers : Android.Content.ComponentName -> System.Collections.Generic.IList<Android.OS.UserHandle>

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with.

Returns

list of other UserHandles on the device.

Attributes

Remarks

Called by a device owner to list all secondary users on the device. Managed profiles are not considered as secondary users.

Used for various user management APIs, including #switchUser, #removeUser and #stopUser.

Java documentation for android.app.admin.DevicePolicyManager.getSecondaryUsers(android.content.ComponentName).

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