Java android.os UserManager fields, constructors, methods, implement or subclass

Example usage for Java android.os UserManager fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.os UserManager.

The text is from its open source code.

Field

StringDISALLOW_MODIFY_ACCOUNTS
Specifies if a user is disallowed from adding and removing accounts, unless they are android.accounts.AccountManager#addAccountExplicitly programmatically added by Authenticator.
StringDISALLOW_INSTALL_UNKNOWN_SOURCES
Specifies if a user is disallowed from enabling the "Unknown Sources" setting, that allows installation of apps from unknown sources.
StringDISALLOW_USB_FILE_TRANSFER
Specifies if a user is disallowed from transferring files over USB.
StringDISALLOW_DEBUGGING_FEATURES
Specifies if a user is disallowed from enabling or accessing debugging features.
StringDISALLOW_MOUNT_PHYSICAL_MEDIA
Specifies if a user is disallowed from mounting physical external media.
StringDISALLOW_FUN
Specifies if the user is not allowed to have fun.
StringDISALLOW_OUTGOING_BEAM
Specifies if the user is not allowed to use NFC to beam out data from apps.
StringDISALLOW_WALLPAPER
Hidden user restriction to disallow access to wallpaper manager APIs.
StringDISALLOW_SET_USER_ICON
Specifies if a user is not allowed to change their icon.
StringALLOW_PARENT_PROFILE_APP_LINKING
Allows apps in the parent profile to handle web links from the managed profile.
StringKEY_RESTRICTIONS_PENDING
Application restriction key that is used to indicate the pending arrival of real restrictions for the app.

Method

UserManagerget(Context context)
BundlegetApplicationRestrictions(String packageName)
Returns a Bundle containing any saved application restrictions for this user, for the given package name.
ListgetProfiles(@UserIdInt int userHandle)
Returns list of the profiles of userHandle including userHandle itself.
longgetSerialNumberForUser(UserHandle user)
Return the serial number for a user.
UserHandlegetUserForSerialNumber(long serialNumber)
Return the user associated with a serial number previously returned by #getSerialNumberForUser(UserHandle) .
StringgetUserName()
Returns the user name of the user making this call.
ListgetUserProfiles()
Returns a list of UserHandles for profiles associated with the user that the calling process is running on, including the user itself.
BundlegetUserRestrictions()
Returns the user-wide restrictions imposed on this user.
ListgetUsers(boolean excludeDying)
Returns information for all users on this device.
booleanhasUserRestriction(String restrictionKey, UserHandle userHandle)
booleanhasUserRestriction(String restrictionKey)
Returns whether the current user has been disallowed from performing certain actions or setting certain settings.
booleanisSplitSystemUser()
booleanisSystemUser()
Used to check if this process is running under the system user.
booleanisUserAGoat()
Used to determine whether the user making this call is subject to teleportations.
booleanisUserUnlocked()
Return whether the calling user is running in an "unlocked" state.
booleanremoveUser(@UserIdInt int userHandle)
Removes a user and all associated data.
booleansupportsMultipleUsers()
Returns whether this device supports multiple users with their own login and customizable space.