Partager via


CrossProfileApps.IsProfile(UserHandle) Method

Definition

Checks if the specified user is a profile, i.

[Android.Runtime.Register("isProfile", "(Landroid/os/UserHandle;)Z", "GetIsProfile_Landroid_os_UserHandle_Handler", ApiSince=35)]
public virtual bool IsProfile (Android.OS.UserHandle userHandle);
[<Android.Runtime.Register("isProfile", "(Landroid/os/UserHandle;)Z", "GetIsProfile_Landroid_os_UserHandle_Handler", ApiSince=35)>]
abstract member IsProfile : Android.OS.UserHandle -> bool
override this.IsProfile : Android.OS.UserHandle -> bool

Parameters

userHandle
UserHandle

The UserHandle of the target profile, must be one of the users returned by #getTargetUserProfiles(), otherwise a SecurityException will be thrown.

Returns

whether the specified user is a profile.

Attributes

Remarks

Checks if the specified user is a profile, i.e. not the parent user.

Java documentation for android.content.pm.CrossProfileApps.isProfile(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