Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/os/UserManager#nestedclasses) \| [Constants](https://developer.android.com/reference/android/os/UserManager#constants) \| [Methods](https://developer.android.com/reference/android/os/UserManager#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/os/UserManager#inhmethods)

# UserManager

*** ** * ** ***


`
public


class
UserManager
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.os.UserManager |

<br />

*** ** * ** ***

Manages users and user details on a multi-user system. There are two major categories of
users: fully customizable users with their own login, and profiles that share a workspace
with a related user.


Users are different from accounts, which are managed by
`https://developer.android.com/reference/android/accounts/AccountManager`. Each user can have their own set of accounts.


See `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#ACTION_PROVISION_MANAGED_PROFILE` for more on managed profiles.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/os/UserManager.UserOperationException` Thrown to indicate user operation failed. |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#ALLOW_PARENT_PROFILE_APP_LINKING` Allows apps in the parent profile to handle web links from the managed profile. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADD_MANAGED_PROFILE` *This constant was deprecated in API level 30. As the ability to have a managed profile on a fully-managed device has been removed from the platform, this restriction will be silently ignored when applied by the device owner.* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADD_PRIVATE_PROFILE` Specifies if a user is disallowed from creating a private profile. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADD_USER` Specifies if a user is disallowed from adding new users. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADD_WIFI_CONFIG` Specifies if a user is disallowed from adding a new Wi-Fi configuration. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADJUST_VOLUME` Specifies if a user is disallowed from adjusting the global volume. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_AIRPLANE_MODE` Specifies if airplane mode is disallowed on the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_AMBIENT_DISPLAY` Specifies if ambient display is disallowed for the user. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_APPS_CONTROL` Specifies if a user is disallowed from modifying applications in Settings or launchers. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ASSIST_CONTENT` This user restriction specifies if assist content is disallowed from being sent to a privileged app such as the Assistant app. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_AUTOFILL` Specifies if a user is not allowed to use Autofill Services. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_BLUETOOTH` Specifies if bluetooth is disallowed on the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_BLUETOOTH_SHARING` Specifies if outgoing bluetooth sharing is disallowed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CAMERA_TOGGLE` Specifies whether the camera toggle is available to the user. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CELLULAR_2G` Specifies if a user is not allowed to use 2g networks. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CHANGE_NEAR_FIELD_COMMUNICATION_RADIO` This user restriction specifies if Near-field communication is disallowed to change on the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CHANGE_WIFI_STATE` Specifies if a user is disallowed from enabling/disabling Wi-Fi. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_BLUETOOTH` Specifies if a user is disallowed from configuring bluetooth via Settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_BRIGHTNESS` Specifies if a user is disallowed from configuring brightness. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_CELL_BROADCASTS` Specifies if a user is disallowed from configuring cell broadcasts. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_CREDENTIALS` Specifies if a user is disallowed from configuring user credentials. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_DATE_TIME` Specifies configuring date, time and timezone is disallowed via Settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_DEFAULT_APPS` Specifies whether the user is allowed to modify default apps in settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_LOCALE` Specifies if a user is disallowed from changing the device language. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_LOCATION` Specifies if a user is disallowed from enabling or disabling location providers. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_MOBILE_NETWORKS` Specifies if a user is disallowed from configuring mobile networks. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_PRIVATE_DNS` Specifies whether the user is allowed to modify private DNS settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_SCREEN_TIMEOUT` Specifies if a user is disallowed from changing screen off timeout. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_TETHERING` Specifies if a user is disallowed from using and configuring Tethering and portable hotspots via Settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_VPN` Specifies if a user is disallowed from configuring a VPN. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_WIFI` Specifies if a user is disallowed from changing Wi-Fi access points via Settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONTENT_CAPTURE` Specifies if the contents of a user's screen is not allowed to be captured for artificial intelligence purposes. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONTENT_SUGGESTIONS` Specifies if the current user is able to receive content suggestions for selections based on the contents of their screen. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CREATE_WINDOWS` Specifies that windows besides app windows should not be created. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CROSS_PROFILE_COPY_PASTE` Specifies if the clipboard contents can be exported by pasting the data into other users or profiles. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_DATA_ROAMING` Specifies if a user is not allowed to use cellular data when roaming. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_DEBUGGING_FEATURES` Specifies if a user is disallowed from enabling or accessing debugging features. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_FACTORY_RESET` Specifies if a user is disallowed from factory resetting from Settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_FUN` Specifies if the user is not allowed to have fun. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_GRANT_ADMIN` Restricts a user's ability to possess or grant admin privileges. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_APPS` Specifies if a user is disallowed from installing applications. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES` Specifies if a user is disallowed from enabling the "Unknown Sources" setting, that allows installation of apps from unknown sources. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY` This restriction is a device-wide version of `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES_INCLUDING_REGISTERED_APP_STORES` User restriction to disallow installing apps from unknown sources, including registered app stores. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_MICROPHONE_TOGGLE` Specifies whether the microphone toggle is available to the user. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_MODIFY_ACCOUNTS` Specifies if a user is disallowed from adding and removing accounts, unless they are `https://developer.android.com/reference/android/accounts/AccountManager#addAccountExplicitly(android.accounts.Account,%20java.lang.String,%20android.os.Bundle)` added by Authenticator. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_MOUNT_PHYSICAL_MEDIA` Specifies if a user is disallowed from mounting physical external media. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO` This user restriction specifies if Near-field communication is disallowed on the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_NETWORK_RESET` Specifies if a user is disallowed from resetting network settings from Settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_OUTGOING_BEAM` Specifies if the user is not allowed to use NFC to beam out data from apps. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_OUTGOING_CALLS` Specifies that the user is not allowed to make outgoing phone calls. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_PRINTING` Specifies whether the user is allowed to print. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_REMOVE_MANAGED_PROFILE` *This constant was deprecated in API level 30. As the ability to have a managed profile on a fully-managed device has been removed from the platform, this restriction will be silently ignored when applied by the device owner. When the device is provisioned with a managed profile on an organization-owned device, the managed profile could not be removed anyway.* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_REMOVE_USER` When set on the admin user this specifies if the user can remove secondary users. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SAFE_BOOT` Specifies if the user is not allowed to reboot the device into safe boot mode. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SET_USER_ICON` Specifies if a user is not allowed to change their icon. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SET_WALLPAPER` User restriction to disallow setting a wallpaper. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SHARE_INTO_MANAGED_PROFILE` Specifies whether the user can share file / picture / data from the primary user into the managed profile, either by sending them from the primary side, or by picking up data within an app in the managed profile. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SHARE_LOCATION` Specifies if a user is disallowed from turning on location sharing. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI` Specifies if users are disallowed from sharing Wi-Fi for admin configured networks. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SIM_GLOBALLY` This user restriction specifies if the user is able to add embedded SIMs to the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SMS` Specifies that the user is not allowed to send or receive SMS messages. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SYSTEM_ERROR_DIALOGS` Specifies that system error dialogs for crashed or unresponsive apps should not be shown. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_TASK_CONTINUITY_HANDOFF` Specifies if the user is not allowed to handoff tasks to other devices. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_THREAD_NETWORK` This user restriction specifies if Thread network is disallowed on the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ULTRA_WIDEBAND_RADIO` This user restriction specifies if Ultra-wideband is disallowed on the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_UNIFIED_PASSWORD` Specifies that the managed profile is not allowed to have unified lock screen challenge with the profile parent. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_UNINSTALL_APPS` Specifies if a user is disallowed from uninstalling applications. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_UNMUTE_MICROPHONE` Specifies if a user is disallowed from adjusting microphone volume. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_USB_FILE_TRANSFER` Specifies if a user is disallowed from transferring files over USB. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_USER_SWITCH` Specifies if user switching is blocked on the current user. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_WIFI_DIRECT` Specifies if a user is disallowed from using Wi-Fi Direct. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#DISALLOW_WIFI_TETHERING` Specifies if a user is disallowed from using Wi-Fi tethering. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#ENSURE_VERIFY_APPS` Specifies if a user is disallowed from disabling application verification. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#KEY_RESTRICTIONS_PENDING` Application restriction key that is used to indicate the pending arrival of real restrictions for the app. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#QUIET_MODE_DISABLE_ONLY_IF_CREDENTIAL_NOT_REQUIRED` Flag passed to `https://developer.android.com/reference/android/os/UserManager#requestQuietModeEnabled(boolean,%20android.os.UserHandle)` to request disabling quiet mode only if there is no need to confirm the user credentials. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_CREATION_FAILED_NOT_PERMITTED` Error result indicating that this user is not allowed to add other users on this device. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_CREATION_FAILED_NO_MORE_USERS` Error result indicating that no more users can be created on this device. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_OPERATION_ERROR_CURRENT_USER` Indicates user operation failed because the target user is in the foreground. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_OPERATION_ERROR_LOW_STORAGE` Indicates user operation failed because device has low data storage. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_OPERATION_ERROR_MANAGED_PROFILE` Indicates user operation failed because target user is a managed profile. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_OPERATION_ERROR_MAX_RUNNING_USERS` Indicates user operation failed because maximum running user limit has been reached. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_OPERATION_ERROR_MAX_USERS` Indicates user operation failed because a relevant maximum user limit has been reached. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_OPERATION_ERROR_UNKNOWN` Indicates user operation failed for unknown reason. |
| `int` | `https://developer.android.com/reference/android/os/UserManager#USER_OPERATION_SUCCESS` Indicates user operation is successful. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#USER_TYPE_PROFILE_CLONE` User type representing a clone profile. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#USER_TYPE_PROFILE_MANAGED` User type representing a managed profile, which is a profile that is to be managed by a device policy controller (DPC). |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/os/UserManager#USER_TYPE_PROFILE_PRIVATE` User type representing a private profile. |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/content/Intent` | ` https://developer.android.com/reference/android/os/UserManager#createUserCreationIntent(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.os.PersistableBundle)(https://developer.android.com/reference/java/lang/String userName, https://developer.android.com/reference/java/lang/String accountName, https://developer.android.com/reference/java/lang/String accountType, https://developer.android.com/reference/android/os/PersistableBundle accountOptions) ` Returns an intent to create a user for the provided name and account name. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/os/UserManager#getApplicationRestrictions(java.lang.String)(https://developer.android.com/reference/java/lang/String packageName) ` Returns a `https://developer.android.com/reference/android/os/Bundle` containing any saved application restrictions for the context user, for the given package name. |
| ` long` | ` https://developer.android.com/reference/android/os/UserManager#getSerialNumberForUser(android.os.UserHandle)(https://developer.android.com/reference/android/os/UserHandle user) ` Return the serial number for a user. |
| ` int` | ` https://developer.android.com/reference/android/os/UserManager#getUserCount()() ` Return the number of users currently created on the device. |
| ` long` | ` https://developer.android.com/reference/android/os/UserManager#getUserCreationTime(android.os.UserHandle)(https://developer.android.com/reference/android/os/UserHandle userHandle) ` Returns creation time of the given user. |
| ` https://developer.android.com/reference/android/os/UserHandle` | ` https://developer.android.com/reference/android/os/UserManager#getUserForSerialNumber(long)(long serialNumber) ` Return the user associated with a serial number previously returned by `https://developer.android.com/reference/android/os/UserManager#getSerialNumberForUser(android.os.UserHandle)`. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/os/UserManager#getUserName()() ` Returns the user name of the context user. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/os/UserHandle>` | ` https://developer.android.com/reference/android/os/UserManager#getUserProfiles()() ` Returns a list of the users that are associated with the context user, including the user itself. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/os/UserManager#getUserRestrictions(android.os.UserHandle)(https://developer.android.com/reference/android/os/UserHandle userHandle) ` Returns the user-wide restrictions imposed on the user specified by `userHandle`. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()() ` Returns the user-wide restrictions imposed on the context user. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#hasUserRestriction(java.lang.String)(https://developer.android.com/reference/java/lang/String restrictionKey) ` Returns whether the context user has been disallowed from performing certain actions or setting certain settings. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isAdminUser()() ` Used to check if the context user is an admin user. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isDemoUser()() ` Checks if the context user is a demo user. |
| ` static boolean` | ` https://developer.android.com/reference/android/os/UserManager#isHeadlessSystemUserMode()() ` Checks whether the device is running in a headless system user mode. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isManagedProfile()() ` Checks if the context user is a managed profile. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isProfile()() ` Checks if the context user is running in a profile. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isQuietModeEnabled(android.os.UserHandle)(https://developer.android.com/reference/android/os/UserHandle userHandle) ` Returns whether the given profile is in quiet mode or not. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isSystemUser()() ` Used to check if the context user is the system user. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isUserAGoat()() ` Used to determine whether the user making this call is subject to teleportations. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isUserForeground()() ` Checks if the context user is running in the foreground. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isUserRunning(android.os.UserHandle)(https://developer.android.com/reference/android/os/UserHandle user) ` Return whether the given user is actively running. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isUserRunningOrStopping(android.os.UserHandle)(https://developer.android.com/reference/android/os/UserHandle user) ` Return whether the given user is actively running *or* stopping. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isUserUnlocked(android.os.UserHandle)(https://developer.android.com/reference/android/os/UserHandle user) ` Return whether the given user is running in an "unlocked" state. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#isUserUnlocked()() ` Return whether the context user is running in an "unlocked" state. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#requestQuietModeEnabled(boolean,%20android.os.UserHandle,%20int)(boolean enableQuietMode, https://developer.android.com/reference/android/os/UserHandle userHandle, int flags) ` Perform the same operation as `https://developer.android.com/reference/android/os/UserManager#requestQuietModeEnabled(boolean,%20android.os.UserHandle)`, but with a flag to tweak the behavior of the request. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#requestQuietModeEnabled(boolean,%20android.os.UserHandle)(boolean enableQuietMode, https://developer.android.com/reference/android/os/UserHandle userHandle) ` Enables or disables quiet mode for a profile. |
| ` boolean` | ` https://developer.android.com/reference/android/os/UserManager#setRestrictionsChallenge(java.lang.String)(https://developer.android.com/reference/java/lang/String newPin) ` *This method was deprecated in API level 23. The restrictions PIN functionality is no longer provided by the system. This method is preserved for backwards compatibility reasons and always returns false.* |
| ` void` | ` https://developer.android.com/reference/android/os/UserManager#setUserRestriction(java.lang.String,%20boolean)(https://developer.android.com/reference/java/lang/String key, boolean value) ` *This method was deprecated in API level 21. use `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)` or `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)` instead.* |
| ` void` | ` https://developer.android.com/reference/android/os/UserManager#setUserRestrictions(android.os.Bundle,%20android.os.UserHandle)(https://developer.android.com/reference/android/os/Bundle restrictions, https://developer.android.com/reference/android/os/UserHandle userHandle) ` This will no longer work. |
| ` void` | ` https://developer.android.com/reference/android/os/UserManager#setUserRestrictions(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle restrictions) ` This will no longer work. |
| ` static boolean` | ` https://developer.android.com/reference/android/os/UserManager#supportsMultipleUsers()() ` Returns whether this device supports multiple switchable users with their own login and customizable space. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Constants

### ALLOW_PARENT_PROFILE_APP_LINKING

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ALLOW_PARENT_PROFILE_APP_LINKING
```

Allows apps in the parent profile to handle web links from the managed profile.

This user restriction has an effect only in a managed profile.
If set:
Intent filters of activities in the parent profile with action
`https://developer.android.com/reference/android/content/Intent#ACTION_VIEW`,
category `https://developer.android.com/reference/android/content/Intent#CATEGORY_BROWSABLE`, scheme http or https, and which
define a host can handle intents from the managed profile.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_PROFILES`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"allow_parent_profile_app_linking"


### DISALLOW_ADD_MANAGED_PROFILE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_ADD_MANAGED_PROFILE
```


**This constant was deprecated
in API level 30.**   

As the ability to have a managed profile on a fully-managed device has been
removed from the platform, this restriction will be silently ignored when applied by the
device owner.

Specifies if a user is disallowed from adding managed profiles.

The default value for an unmanaged user is `false`.
For users with a device owner set, the default is `true`.

This restriction has no effect on managed profiles.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_add_managed_profile"


### DISALLOW_ADD_PRIVATE_PROFILE

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_ADD_PRIVATE_PROFILE
```

Specifies if a user is disallowed from creating a private profile.

The default value for an unmanaged user is `false`.
For users with a device owner set, the default value is `true` and the
device owner currently cannot change it to `false`.
On organization-owned managed profile devices, the default value is `false` but
the profile owner can change it to `true` via the parent profile to block creating
of private profiles on the personal user.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_PROFILES`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getParentProfileInstance(android.content.ComponentName)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_add_private_profile"


### DISALLOW_ADD_USER

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_ADD_USER
```

Specifies if a user is disallowed from adding new users. This can only be set by device
owners or profile owners on the main user. The default value is `false`.

When the device is an organization-owned device, this restriction will be set as
a base restriction which cannot be removed by any admin.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MODIFY_USERS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_add_user"


### DISALLOW_ADD_WIFI_CONFIG

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_ADD_WIFI_CONFIG
```

Specifies if a user is disallowed from adding a new Wi-Fi configuration.

This restriction can only be set by a device owner,
a profile owner of an organization-owned managed profile on the parent profile.
When it is set by any of these owners, it prevents all users from adding
a new Wi-Fi configuration. This does not limit the owner and carrier's ability
to add a new configuration.

Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_WIFI`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_add_wifi_config"


### DISALLOW_ADJUST_VOLUME

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_ADJUST_VOLUME
```

Specifies if a user is disallowed from adjusting the global volume. If set, the global volume
will be muted. This can be set by device owners from API 21 and profile owners from API 24.
The default value is `false`.

When the restriction is set by profile owners, then it only applies to relevant
profiles.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_AUDIO_OUTPUT`
can set this restriction using the DevicePolicyManager APIs mentioned below.

This restriction has no effect on managed profiles.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_adjust_volume"


### DISALLOW_AIRPLANE_MODE

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_AIRPLANE_MODE
```

Specifies if airplane mode is disallowed on the device.

This restriction can only be set by a device owner, a profile owner on the primary
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by any of these owners, it applies globally - i.e., it disables airplane mode
on the entire device.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_AIRPLANE_MODE`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_airplane_mode"


### DISALLOW_AMBIENT_DISPLAY

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_AMBIENT_DISPLAY
```

Specifies if ambient display is disallowed for the user.

The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_DISPLAY`
can set this restriction using the DevicePolicyManager APIs mentioned below.

This user restriction has no effect on managed profiles.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_ambient_display"


### DISALLOW_APPS_CONTROL

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_APPS_CONTROL
```

Specifies if a user is disallowed from modifying
applications in Settings or launchers. The following actions will not be allowed when this
restriction is enabled:
- uninstalling apps
- disabling apps
- clearing app caches
- clearing app data
- force stopping apps
- clearing app defaults
- The default value is `false`.
- **Note:** The user will still be able to perform those actions via other means (such as adb). Third party apps will also be able to uninstall apps via the `https://developer.android.com/reference/android/content/pm/PackageInstaller`. `https://developer.android.com/reference/android/os/UserManager#DISALLOW_UNINSTALL_APPS` or `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setUninstallBlocked(android.content.ComponentName,%20java.lang.String,%20boolean)` should be used to prevent the user from uninstalling apps completely, and `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addPersistentPreferredActivity(android.content.ComponentName,%20android.content.IntentFilter,%20android.content.ComponentName)` to add a default intent handler for a given intent filter.
- Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_APPS_CONTROL` can set this restriction using the DevicePolicyManager APIs mentioned below.
- Key for user restrictions.
- Type: Boolean
**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`
- Constant Value: "no_control_apps"

### DISALLOW_ASSIST_CONTENT

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_ASSIST_CONTENT
```

This user restriction specifies if assist content is disallowed from being sent to a
privileged app such as the Assistant app. Assist content includes screenshots and information
about an app, such as package name.

This restriction can only be set by a device owner or a profile owner. When it is set by a
device owner, it disables the assist contextual data on the entire device. When it is set by
a profile owner, it disables assist content on the profile.


Default is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_assist_content"


### DISALLOW_AUTOFILL

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_AUTOFILL
```

Specifies if a user is not allowed to use Autofill Services.

Device owner and profile owner can set this restriction. When it is set by device owner,
only the target user will be affected.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_AUTOFILL`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_autofill"


### DISALLOW_BLUETOOTH

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_BLUETOOTH
```

Specifies if bluetooth is disallowed on the device. If bluetooth is disallowed on the device,
bluetooth cannot be turned on or configured via Settings.

This restriction can only be set by a device owner, a profile owner on the primary
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by a device owner, it applies globally - i.e., it disables bluetooth on
the entire device and all users will be affected. When it is set by a profile owner on the
primary user or by a profile owner of an organization-owned managed profile on the parent
profile, it disables the primary user from using bluetooth and configuring bluetooth
in Settings.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_BLUETOOTH`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_bluetooth"


### DISALLOW_BLUETOOTH_SHARING

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_BLUETOOTH_SHARING
```

Specifies if outgoing bluetooth sharing is disallowed.

A device owner and a profile owner can set this restriction. When it is set by a device
owner, it applies globally. When it is set by a profile owner on the primary user or by a
profile owner of an organization-owned managed profile on the parent profile, it disables
the primary user from any outgoing bluetooth sharing.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_BLUETOOTH`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Default is `true` for managed and private profiles, false otherwise.

When a device upgrades to `https://developer.android.com/reference/android/os/Build.VERSION_CODES#O`, the system sets it
for all existing managed profiles.


Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_bluetooth_sharing"


### DISALLOW_CAMERA_TOGGLE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CAMERA_TOGGLE
```

Specifies whether the camera toggle is available to the user. If this restriction is set,
the user will not be able to block camera access via the system toggle. If camera
access is blocked when the restriction is added, it will be automatically re-enabled.

This restriction can only be set by a device owner.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/hardware/SensorPrivacyManager`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"disallow_camera_toggle"


### DISALLOW_CELLULAR_2G

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CELLULAR_2G
```

Specifies if a user is not allowed to use 2g networks.

This is a security feature. 2g has no mutual authentication between a device and
cellular base station and downgrading a device's connection to 2g is a common tactic for
several types of privacy and security compromising attacks that could allow an adversary
to intercept, inject, or modify cellular communications.

This restriction can only be set by a device owner or a profile owner of an
organization-owned managed profile on the parent profile.
In all cases, the setting applies globally on the device.

Cellular connectivity loss (where a device would have otherwise successfully
connected to a 2g network) occurs if the device is in an area where only 2g networks are
available. Emergency calls are an exception and are never impacted. The device will still
scan for and connect to a 2g network for emergency calls.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_cellular_2g"


### DISALLOW_CHANGE_NEAR_FIELD_COMMUNICATION_RADIO

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CHANGE_NEAR_FIELD_COMMUNICATION_RADIO
```

This user restriction specifies if Near-field communication is disallowed to change
on the device. If Near-field communication is disallowed it cannot be changed via Settings.

This restriction can only be set by a device owner or a profile owner of an
organization-owned managed profile on the parent profile.
In both cases, the restriction applies globally on the device and will not allow Near-field
communication state being changed.


Near-field communication (NFC) is a radio technology that allows two devices (like your phone
and a payments terminal) to communicate with each other when they're close together.

Default is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_change_near_field_communication_radio"


### DISALLOW_CHANGE_WIFI_STATE

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CHANGE_WIFI_STATE
```

Specifies if a user is disallowed from enabling/disabling Wi-Fi.

This restriction can only be set by a device owner,
a profile owner of an organization-owned managed profile on the parent profile.
When it is set by any of these owners, it applies globally - i.e., it disables airplane mode
from changing Wi-Fi state.

Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_WIFI`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_change_wifi_state"


### DISALLOW_CONFIG_BLUETOOTH

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_BLUETOOTH
```

Specifies if a user is disallowed from configuring bluetooth via Settings. This does
*not* restrict the user from turning bluetooth on or off.

This restriction doesn't prevent the user from using bluetooth. For disallowing usage of
bluetooth completely on the device, use `https://developer.android.com/reference/android/os/UserManager#DISALLOW_BLUETOOTH`.

A device owner and a profile owner can set this restriction, although the restriction has
no effect in a managed profile. When it is set by a device owner, a profile owner on the
primary user or by a profile owner of an organization-owned managed profile on the parent
profile, it disallows the primary user from configuring bluetooth.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_BLUETOOTH`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_bluetooth"


### DISALLOW_CONFIG_BRIGHTNESS

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_BRIGHTNESS
```

Specifies if a user is disallowed from configuring brightness. When device owner sets it,
it'll only be applied on the target(system) user.

The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_DISPLAY`
can set this restriction using the DevicePolicyManager APIs mentioned below.

This user restriction has no effect on managed profiles.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_brightness"


### DISALLOW_CONFIG_CELL_BROADCASTS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_CELL_BROADCASTS
```

Specifies if a user is disallowed from configuring cell broadcasts.

This restriction can only be set by a device owner, a profile owner on the main
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by a device owner, it applies globally. When it is set by a profile owner
on the main user or by a profile owner of an organization-owned managed profile on
the parent profile, it disables the user from configuring cell broadcasts.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

This restriction has no effect on non-Admin users since they cannot configure cell
broadcasts.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_cell_broadcasts"


### DISALLOW_CONFIG_CREDENTIALS

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_CREDENTIALS
```

Specifies if a user is disallowed from configuring user
credentials. The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_credentials"


### DISALLOW_CONFIG_DATE_TIME

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_DATE_TIME
```

Specifies configuring date, time and timezone is disallowed via Settings.

A device owner and a profile owner can set this restriction, although the restriction has
no effect in a managed profile. When it is set by a device owner or by a profile owner of an
organization-owned managed profile on the parent profile, it applies globally - i.e.,
it disables date, time and timezone setting on the entire device and all users are affected.
When it is set by a profile owner on the primary user, it disables the primary user
from configuring date, time and timezone and disables all configuring of date, time and
timezone in Settings.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_TIME`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_date_time"


### DISALLOW_CONFIG_DEFAULT_APPS

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_DEFAULT_APPS
```

Specifies whether the user is allowed to modify default apps in settings.

A device owner and a profile owner can set this restriction. When it is set by a
device owner, it applies globally - i.e., modifying of default apps in Settings for all
users is disallowed. When it is set by a profile owner on the primary user or by a profile
owner of an organization-owned managed profile on the parent profile, modifying of
default apps in Settings for the primary user is disallowed.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"disallow_config_default_apps"


### DISALLOW_CONFIG_LOCALE

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_LOCALE
```

Specifies if a user is disallowed from changing the device
language. The default value is `false`.

Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_LOCALE`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_locale"


### DISALLOW_CONFIG_LOCATION

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_LOCATION
```

Specifies if a user is disallowed from enabling or disabling location providers. As a
result, user is disallowed from turning on or off location via Settings.

A device owner and a profile owner can set this restriction. When it is set by a device
owner, a profile owner on the primary user or by a profile owner of an organization-owned
managed profile on the parent profile, it disallows the primary user from turning location
on or off.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_LOCATION`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

This user restriction is different from `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SHARE_LOCATION`,
as a device owner or a profile owner can still enable or disable location mode via
`https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setLocationEnabled(android.content.ComponentName,%20boolean)` when this restriction is on.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/location/LocationManager#isLocationEnabled()`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_location"


### DISALLOW_CONFIG_MOBILE_NETWORKS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_MOBILE_NETWORKS
```

Specifies if a user is disallowed from configuring mobile networks.

This restriction can only be set by a device owner, a profile owner on the main
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by a device owner, it applies globally. When it is set by a profile owner
on the main user or by a profile owner of an organization-owned managed profile on
the parent profile, it disables the user from configuring mobile networks.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

This restriction has no effect on non-Admin users since they cannot configure mobile
networks.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_mobile_networks"


### DISALLOW_CONFIG_PRIVATE_DNS

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_PRIVATE_DNS
```

Specifies whether the user is allowed to modify private DNS settings.

This restriction can only be set by a device owner or a profile owner of an
organization-owned managed profile on the parent profile. When it is set by either of these
owners, it applies globally.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_RESTRICT_PRIVATE_DNS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"disallow_config_private_dns"


### DISALLOW_CONFIG_SCREEN_TIMEOUT

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_SCREEN_TIMEOUT
```

Specifies if a user is disallowed from changing screen off timeout.

The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_DISPLAY`
can set this restriction using the DevicePolicyManager APIs mentioned below.

This user restriction has no effect on managed profiles.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_screen_timeout"


### DISALLOW_CONFIG_TETHERING

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_TETHERING
```

Specifies if a user is disallowed from using and configuring Tethering and portable hotspots
via Settings.

This restriction can only be set by a device owner, a profile owner on the primary
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by a device owner, it applies globally. When it is set by a profile owner
on the primary user or by a profile owner of an organization-owned managed profile on
the parent profile, it disables the primary user from using Tethering and hotspots and
disables all configuring of Tethering and hotspots in Settings.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

In Android 9.0 or higher, if tethering is enabled when this restriction is set,
tethering will be automatically turned off.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_tethering"


### DISALLOW_CONFIG_VPN

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_VPN
```

Specifies if a user is disallowed from configuring a VPN. The default value is `false
`. This restriction has an effect when set by device owners and, in Android 6.0
([API level 23](https://developer.android.com/reference/android/os/Build.VERSION_CODES#M)) or higher, profile owners.

This restriction also prevents VPNs from starting. However, in Android 7.0 ([API level 24](https://developer.android.com/reference/android/os/Build.VERSION_CODES#N)) or higher, the system does start always-on
VPNs created by the device or profile owner.

From Android 12 ([API level 31](https://developer.android.com/reference/android/os/Build.VERSION_CODES#S)) enforcing
this restriction clears currently active VPN if it was configured by the user.


Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_VPN` can
set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_vpn"


### DISALLOW_CONFIG_WIFI

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONFIG_WIFI
```

Specifies if a user is disallowed from changing Wi-Fi access points via Settings. This
restriction does not affect Wi-Fi tethering settings.

A device owner and a profile owner can set this restriction, although the restriction has
no effect in a managed profile. When it is set by a device owner, a profile owner on the
primary user or by a profile owner of an organization-owned managed profile on the parent
profile, it disallows the primary user from changing Wi-Fi access points.

Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_WIFI`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_config_wifi"


### DISALLOW_CONTENT_CAPTURE

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONTENT_CAPTURE
```

Specifies if the contents of a user's screen is not allowed to be captured for artificial
intelligence purposes.

A device owner and a profile owner can set this restriction. When it is set by a device
owner, a profile owner on the primary user or by a profile owner of an organization-owned
managed profile on the parent profile, it disables the primary user's screen from being
captured for artificial intelligence purposes.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_SCREEN_CONTENT`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_content_capture"


### DISALLOW_CONTENT_SUGGESTIONS

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CONTENT_SUGGESTIONS
```

Specifies if the current user is able to receive content suggestions for selections based on
the contents of their screen.

A device owner and a profile owner can set this restriction. When it is set by a device
owner, a profile owner on the primary user or by a profile owner of an organization-owned
managed profile on the parent profile, it disables the primary user from receiving content
suggestions for selections based on the contents of their screen.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_SCREEN_CONTENT`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_content_suggestions"


### DISALLOW_CREATE_WINDOWS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CREATE_WINDOWS
```

Specifies that windows besides app windows should not be
created. This will block the creation of the following types of windows.
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#TYPE_TOAST`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY`
- This can only be set by device owners and profile owners on the primary user. The default value is `false`.
- Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_WINDOWS` can set this restriction using the DevicePolicyManager APIs mentioned below.
- Key for user restrictions.
- Type: Boolean
**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`
- Constant Value: "no_create_windows"

### DISALLOW_CROSS_PROFILE_COPY_PASTE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_CROSS_PROFILE_COPY_PASTE
```

Specifies if the clipboard contents can be exported by pasting the data into other users or
profiles. This restriction doesn't prevent import, such as someone pasting clipboard data
from other profiles or users. The default value is `false`.

**Note** : Because it's possible to extract data from screenshots using
optical character recognition (OCR), we strongly recommend combining this user restriction
with `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setScreenCaptureDisabled(android.content.ComponentName,%20boolean)`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_cross_profile_copy_paste"


### DISALLOW_DATA_ROAMING

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_DATA_ROAMING
```

Specifies if a user is not allowed to use cellular data when roaming.

This restriction can only be set by a device owner, a profile owner on the primary
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by a device owner, it applies globally. When it is set by a profile owner
on the primary user or by a profile owner of an organization-owned managed profile on
the parent profile, it disables the primary user from using cellular data when roaming.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_data_roaming"


### DISALLOW_DEBUGGING_FEATURES

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_DEBUGGING_FEATURES
```

Specifies if a user is disallowed from enabling or accessing debugging features.

A device owner and a profile owner can set this restriction. When it is set by a device
owner, a profile owner on the primary user or by a profile owner of an organization-owned
managed profile on the parent profile, it disables debugging features altogether, including
USB debugging. When set on a managed profile or a secondary user, it blocks debugging for
that user only, including starting activities, making service calls, accessing content
providers, sending broadcasts, installing/uninstalling packages, clearing user data, etc.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_DEBUGGING_FEATURES`
can set this restriction using the DevicePolicyManager APIs mentioned below.


Default is `true` for newly created work profile on or after the
2025-04 security patch level. Otherwise, the default is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_debugging_features"


### DISALLOW_FACTORY_RESET

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_FACTORY_RESET
```

Specifies if a user is disallowed from factory resetting from Settings.
This can only be set by device owners and profile owners on an admin user.
The default value is `false`.

This restriction has no effect on non-admin users since they cannot factory reset the
device.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_FACTORY_RESET`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_factory_reset"


### DISALLOW_FUN

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_FUN
```

Specifies if the user is not allowed to have fun. In some cases, the
device owner may wish to prevent the user from experiencing amusement or
joy while using the device. The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_FUN`
can set this restriction using the DevicePolicyManager APIs mentioned below.


Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_fun"


### DISALLOW_GRANT_ADMIN

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_GRANT_ADMIN
```

Restricts a user's ability to possess or grant admin privileges.

When set to `true`, this prevents the user from:

- Becoming an admin
- Giving other users admin privileges

This restriction is only effective in environments where multiple admins are allowed.

Key for user restrictions. Type: Boolean. Default: `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_grant_admin"


### DISALLOW_INSTALL_APPS

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_INSTALL_APPS
```

Specifies if a user is disallowed from installing applications. This user restriction also
prevents device owners and profile owners installing apps. The default value is
`false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_APPS_CONTROL`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_install_apps"


### DISALLOW_INSTALL_UNKNOWN_SOURCES

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_INSTALL_UNKNOWN_SOURCES
```

Specifies if a user is disallowed from enabling the
"Unknown Sources" setting, that allows installation of apps from unknown sources.
Unknown sources exclude adb and special apps such as trusted app stores.
The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_INSTALL_UNKNOWN_SOURCES`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Note: This restriction does not apply to installations initiated or performed by
registered app stores or the installation of registered app stores themselves. To also
restrict installations of registered app stores and from registered app stores, use
`https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES_INCLUDING_REGISTERED_APP_STORES`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_install_unknown_sources"


### DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY
```

This restriction is a device-wide version of `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES`.

Specifies if all users on the device are disallowed from enabling the
"Unknown Sources" setting, that allows installation of apps from unknown sources.

This restriction can be enabled by the profile owner, in which case all accounts and
profiles will be affected.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_INSTALL_UNKNOWN_SOURCES`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Note: This restriction does not apply to installations initiated or performed by
registered app stores or the installation of registered app stores themselves. To also
restrict installations of registered app stores and from registered app stores, use
`https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES_INCLUDING_REGISTERED_APP_STORES`.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_install_unknown_sources_globally"


### DISALLOW_INSTALL_UNKNOWN_SOURCES_INCLUDING_REGISTERED_APP_STORES

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String DISALLOW_INSTALL_UNKNOWN_SOURCES_INCLUDING_REGISTERED_APP_STORES
```

User restriction to disallow installing apps from unknown sources, including
registered app stores.


When this restriction is set, the user cannot install apps from any source other than
privileged installers that are explicitly allowed as trusted sources. This
supersedes `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES` by also blocking installations
initiated by or from registered app stores (holders of `https://developer.android.com/reference/android/Manifest.permission#INSTALL_PACKAGES_AS_REGISTERED_APP_STORE`), and installations
of registered app stores themselves.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_install_unknown_sources_including_registered_app_stores"


### DISALLOW_MICROPHONE_TOGGLE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_MICROPHONE_TOGGLE
```

Specifies whether the microphone toggle is available to the user. If this restriction is set,
the user will not be able to block microphone access via the system toggle. If microphone
access is blocked when the restriction is added, it will be automatically re-enabled.

This restriction can only be set by a device owner.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/hardware/SensorPrivacyManager`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"disallow_microphone_toggle"


### DISALLOW_MODIFY_ACCOUNTS

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_MODIFY_ACCOUNTS
```

Specifies if a user is disallowed from adding and removing accounts, unless they are
`https://developer.android.com/reference/android/accounts/AccountManager#addAccountExplicitly(android.accounts.Account,%20java.lang.String,%20android.os.Bundle)` added by
Authenticator.
The default value is `false`.

From `https://developer.android.com/reference/android/os/Build.VERSION_CODES#N` a profile or device owner app can still
use `https://developer.android.com/reference/android/accounts/AccountManager` APIs to add or remove accounts when account
management is disallowed.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_modify_accounts"


### DISALLOW_MOUNT_PHYSICAL_MEDIA

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_MOUNT_PHYSICAL_MEDIA
```

Specifies if a user is disallowed from mounting physical external media.

This restriction can only be set by a device owner, a profile owner on the primary
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by a device owner, it applies globally. When it is set by a profile owner
on the primary user or by a profile owner of an organization-owned managed profile on
the parent profile, it disables the primary user from mounting physical external media.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_PHYSICAL_MEDIA`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_physical_media"


### DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO
```

This user restriction specifies if Near-field communication is disallowed on the device. If
Near-field communication is disallowed it cannot be turned on via Settings.

This restriction can only be set by a device owner or a profile owner of an
organization-owned managed profile on the parent profile.
In both cases, the restriction applies globally on the device and will turn off the
Near-field communication radio if it's currently on and prevent the radio from being turned
on in the future.


Near-field communication (NFC) is a radio technology that allows two devices (like your phone
and a payments terminal) to communicate with each other when they're close together.

Default is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_near_field_communication_radio"


### DISALLOW_NETWORK_RESET

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_NETWORK_RESET
```

Specifies if a user is disallowed from resetting network settings
from Settings. This can only be set by device owners and profile owners on the main user.
The default value is `false`.

This restriction has no effect on non-Admin users since they cannot reset the network
settings of the device.


Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_network_reset"


### DISALLOW_OUTGOING_BEAM

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_OUTGOING_BEAM
```

Specifies if the user is not allowed to use NFC to beam out data from apps.
The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_NEARBY_COMMUNICATION`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_outgoing_beam"


### DISALLOW_OUTGOING_CALLS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_OUTGOING_CALLS
```

Specifies that the user is not allowed to make outgoing phone calls. Emergency calls are
still permitted.

A device owner and a profile owner can set this restriction, although the restriction has
no effect in a managed profile. When it is set by a device owner, a profile owner on the
primary user or by a profile owner of an organization-owned managed profile on the parent
profile, it disallows the primary user from making outgoing phone calls.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_CALLS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_outgoing_calls"


### DISALLOW_PRINTING

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_PRINTING
```

Specifies whether the user is allowed to print.

This restriction can be set by device or profile owner.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_PRINTING`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_printing"


### DISALLOW_REMOVE_MANAGED_PROFILE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_REMOVE_MANAGED_PROFILE
```


**This constant was deprecated
in API level 30.**   

As the ability to have a managed profile on a fully-managed device has been
removed from the platform, this restriction will be silently ignored when applied by the
device owner.
When the device is provisioned with a managed profile on an organization-owned device,
the managed profile could not be removed anyway.

Specifies if managed profiles of this user can be removed, other than by its profile owner.
The default value is `false`.


This restriction has no effect on managed profiles, and this restriction does not block the
removal of private profiles of this user.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_remove_managed_profile"


### DISALLOW_REMOVE_USER

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_REMOVE_USER
```

When set on the admin user this specifies if the user can remove secondary users. Managed
profiles and private profiles can still be removed even if this is set on the admin user.
When set on a non-admin secondary user, this specifies if the user can remove itself.
This restriction has no effect when set on managed profiles.
The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MODIFY_USERS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_remove_user"


### DISALLOW_SAFE_BOOT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SAFE_BOOT
```

Specifies if the user is not allowed to reboot the device into safe boot mode.

This restriction can only be set by a device owner, a profile owner on the primary
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by a device owner, it applies globally. When it is set by a profile owner
on the primary user or by a profile owner of an organization-owned managed profile on
the parent profile, it disables the primary user from rebooting the device into safe
boot mode.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_SAFE_BOOT`
can set this restriction using the DevicePolicyManager APIs mentioned below.


The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_safe_boot"


### DISALLOW_SET_USER_ICON

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SET_USER_ICON
```

Specifies if a user is not allowed to change their icon. Device owner and profile owner
can set this restriction. When it is set by device owner, only the target user will be
affected. The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MODIFY_USERS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_set_user_icon"


### DISALLOW_SET_WALLPAPER

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SET_WALLPAPER
```

User restriction to disallow setting a wallpaper. Profile owner and device owner
are able to set wallpaper regardless of this restriction.
The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_WALLPAPER`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_set_wallpaper"


### DISALLOW_SHARE_INTO_MANAGED_PROFILE

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SHARE_INTO_MANAGED_PROFILE
```

Specifies whether the user can share file / picture / data from the primary user into the
managed profile, either by sending them from the primary side, or by picking up data within
an app in the managed profile.


When a managed profile is created, the system allows the user to send data from the primary
side to the profile by setting up certain default cross profile intent filters. If
this is undesired, this restriction can be set to disallow it. Note that this restriction
will not block any sharing allowed by explicit
`https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addCrossProfileIntentFilter(android.content.ComponentName,%20android.content.IntentFilter,%20int)` calls by the profile owner.


This restriction is only meaningful when set by profile owner. When it is set by device
owner, it does not have any effect.


Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_sharing_into_profile"


### DISALLOW_SHARE_LOCATION

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SHARE_LOCATION
```

Specifies if a user is disallowed from turning on location sharing.

In a managed profile, location sharing by default reflects the primary user's setting, but
can be overridden and forced off by setting this restriction to true in the managed profile.

A device owner and a profile owner can set this restriction. When it is set by a device
owner, a profile owner on the primary user or by a profile owner of an organization-owned
managed profile on the parent profile, it prevents the primary user from turning on
location sharing.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_LOCATION`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_share_location"


### DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI
```

Specifies if users are disallowed from sharing Wi-Fi for admin configured networks.

Device owner and profile owner can set this restriction.
When it is set by any of these owners, it prevents all users from
sharing Wi-Fi for networks configured by these owners.
Other networks not configured by these owners are not affected.

Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_WIFI`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_sharing_admin_configured_wifi"


### DISALLOW_SIM_GLOBALLY

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SIM_GLOBALLY
```

This user restriction specifies if the user is able to add embedded SIMs to the device.


This restriction blocks the download of embedded SIMs.


This restriction can only be set by a device owner or a profile owner of an
organization-owned managed profile.
In both cases, the restriction applies globally on the device.


Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Default is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_sim_globally"


### DISALLOW_SMS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SMS
```

Specifies that the user is not allowed to send or receive SMS messages.

This restriction can only be set by a device owner, a profile owner on the primary
user or a profile owner of an organization-owned managed profile on the parent profile.
When it is set by a device owner, it applies globally. When it is set by a profile owner
on the primary user or by a profile owner of an organization-owned managed profile on
the parent profile, it disables the primary user from sending or receiving SMS messages.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_SMS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_sms"


### DISALLOW_SYSTEM_ERROR_DIALOGS

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_SYSTEM_ERROR_DIALOGS
```

Specifies that system error dialogs for crashed or unresponsive apps should not be shown.
In this case, the system will force-stop the app as if the user chooses the "close app"
option on the UI. A feedback report isn't collected as there is no way for the user to
provide explicit consent. The default value is `false`.

When this user restriction is set by device owners, it's applied to all users. When set by
the profile owner of the primary user or a secondary user, the restriction affects only the
calling user. This user restriction has no effect on managed profiles.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_SYSTEM_DIALOGS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_system_error_dialogs"


### DISALLOW_TASK_CONTINUITY_HANDOFF

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_TASK_CONTINUITY_HANDOFF
```

Specifies if the user is not allowed to handoff tasks to other devices.

This policy may be set by a device owner or a profile owner. When set by a device owner,
no applications will be able to send data to other devices for Handoff, nor will the current
device exchange task metadata for other devices. When it is set by a profile owner of an
organization-owned managed profile or the parent profile, applications running in the
personal user will be disallowed from performing Handoff and excluded from appearing in
Handoff metadata exchanges

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`

Constant Value:

"no_task_continuity_handoff"


### DISALLOW_THREAD_NETWORK

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_THREAD_NETWORK
```

This user restriction specifies if Thread network is disallowed on the device. If Thread
network is disallowed it cannot be turned on via Settings.

This restriction can only be set by a device owner or a profile owner of an
organization-owned managed profile on the parent profile.
In both cases, the restriction applies globally on the device and will turn off the
Thread network radio if it's currently on and prevent the radio from being turned
on in the future.

[Thread](https://www.threadgroup.org) is a low-power and low-latency wireless
mesh networking protocol built on IPv6.

Default is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_thread_network"


### DISALLOW_ULTRA_WIDEBAND_RADIO

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_ULTRA_WIDEBAND_RADIO
```

This user restriction specifies if Ultra-wideband is disallowed on the device. If
Ultra-wideband is disallowed it cannot be turned on via Settings.


Ultra-wideband (UWB) is a radio technology that can use a very low energy level
for short-range, high-bandwidth communications over a large portion of the radio spectrum.

This restriction can only be set by a device owner or a profile owner of an
organization-owned managed profile on the parent profile.
In both cases, the restriction applies globally on the device and will turn off the
ultra-wideband radio if it's currently on and prevent the radio from being turned on in
the future.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_NEARBY_COMMUNICATION`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Default is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_ultra_wideband_radio"


### DISALLOW_UNIFIED_PASSWORD

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_UNIFIED_PASSWORD
```

Specifies that the managed profile is not allowed to have unified lock screen challenge with
the profile parent.

To ensure that there is a separate work profile password, IT admins
have to:

1. Enforce `https://developer.android.com/reference/android/os/UserManager#DISALLOW_UNIFIED_PASSWORD`
2. Verify that `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isUsingUnifiedPassword(android.content.ComponentName)` returns false. This indicates that there is now a separate work profile password configured and the set up is completed.
3. In case `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isUsingUnifiedPassword(android.content.ComponentName)` returns true, invoke `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#ACTION_SET_NEW_PASSWORD` intent and then verify again `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isUsingUnifiedPassword(android.content.ComponentName)`.

<br />

Can be set by profile owners. It only has effect on managed profiles when set by managed
profile owner. Has no effect on non-managed profiles or users.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS`
can set this restriction using the `https://developer.android.com/reference/android/app/admin/DevicePolicyManager` APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_unified_password"


### DISALLOW_UNINSTALL_APPS

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_UNINSTALL_APPS
```

Specifies if a user is disallowed from uninstalling applications.
The default value is `false`.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_APPS_CONTROL`
can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_uninstall_apps"


### DISALLOW_UNMUTE_MICROPHONE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_UNMUTE_MICROPHONE
```

Specifies if a user is disallowed from adjusting microphone volume. If set, the microphone
will be muted.

A device owner and a profile owner can set this restriction, although the restriction has
no effect in a managed profile. When it is set by a device owner, it applies globally. When
it is set by a profile owner on the primary user or by a profile owner of an
organization-owned managed profile on the parent profile, it will disallow the primary user
from adjusting the microphone volume.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MICROPHONE`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_unmute_microphone"


### DISALLOW_USB_FILE_TRANSFER

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_USB_FILE_TRANSFER
```

Specifies if a user is disallowed from transferring files over USB.

This restriction can only be set by a [device
owner](https://developers.google.com/android/work/terminology#device_owner_do) or a [profile
owner](https://developers.google.com/android/work/terminology#profile_owner_po) on the primary user's profile or a profile owner of an organization-owned [managed
profile](https://developers.google.com/android/work/terminology#managed_profile) on the parent profile. When it is set by a device owner, it applies globally.
When it is set by a profile owner on the primary user or by a profile owner of an
organization-owned managed profile on the parent profile, it disables the primary user from
transferring files over USB. No other user on the device is able to use file transfer over
USB because the UI for file transfer is always associated with the primary user.

Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_USB_FILE_TRANSFER` can set this restriction
using the DevicePolicyManager APIs mentioned below.

The default value is `false`.


Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_usb_file_transfer"


### DISALLOW_USER_SWITCH

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_USER_SWITCH
```

Specifies if user switching is blocked on the current user.

This restriction can only be set by the device owner, it will be applied to all users.
Device owner can still switch user via
`https://developer.android.com/reference/android/app/admin/DevicePolicyManager#switchUser(android.content.ComponentName,%20android.os.UserHandle)` when this restriction is
set.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_MODIFY_USERS`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_user_switch"


### DISALLOW_WIFI_DIRECT

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_WIFI_DIRECT
```

Specifies if a user is disallowed from using Wi-Fi Direct.

This restriction can only be set by a device owner,
a profile owner of an organization-owned managed profile on the parent profile.
When it is set by any of these owners, it prevents all users from using
Wi-Fi Direct.

Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_WIFI`
can set this restriction using the DevicePolicyManager APIs mentioned below.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_wifi_direct"


### DISALLOW_WIFI_TETHERING

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String DISALLOW_WIFI_TETHERING
```

Specifies if a user is disallowed from using Wi-Fi tethering.

This restriction does not limit the user's ability to modify or connect to regular
Wi-Fi networks, which is separately controlled by `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_WIFI`.

This restriction can only be set by a device owner,
a profile owner of an organization-owned managed profile on the parent profile.
When it is set by any of these owners, it prevents all users from using
Wi-Fi tethering. Other forms of tethering are not affected.

Holders of the permission `https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_WIFI`
can set this restriction using the DevicePolicyManager APIs mentioned below.

This user restriction disables only Wi-Fi tethering.
Use `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_TETHERING` to limit all forms of tethering.
When `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_TETHERING` is set, this user restriction becomes obsolete.

The default value is `false`.

Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"no_wifi_tethering"


### ENSURE_VERIFY_APPS

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String ENSURE_VERIFY_APPS
```

Specifies if a user is disallowed from disabling application verification. The default
value is `false`.

In Android 8.0 ([API level 26](https://developer.android.com/reference/android/os/Build.VERSION_CODES#O)) and higher,
this is a global user restriction. If a device owner or profile owner sets this restriction,
the system enforces app verification across all users on the device. Running in earlier
Android versions, this restriction affects only the profile that sets it.

Holders of the permission
`https://developer.android.com/reference/android/Manifest.permission#MANAGE_DEVICE_POLICY_INSTALL_UNKNOWN_SOURCES`
can set this restriction using the DevicePolicyManager APIs mentioned below.


Key for user restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)`
- `https://developer.android.com/reference/android/os/UserManager#getUserRestrictions()`

Constant Value:

"ensure_verify_apps"


### KEY_RESTRICTIONS_PENDING

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String KEY_RESTRICTIONS_PENDING
```

Application restriction key that is used to indicate the pending arrival
of real restrictions for the app.


Applications that support restrictions should check for the presence of this key.
A `true` value indicates that restrictions may be applied in the near
future but are not available yet. It is the responsibility of any
management application that sets this flag to update it when the final
restrictions are enforced.

Key for application restrictions.

Type: Boolean

<br />

**See also:**

- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setApplicationRestrictions(android.content.ComponentName,%20java.lang.String,%20android.os.Bundle)`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getApplicationRestrictions(android.content.ComponentName,%20java.lang.String)`

Constant Value:

"restrictions_pending"


### QUIET_MODE_DISABLE_ONLY_IF_CREDENTIAL_NOT_REQUIRED

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int QUIET_MODE_DISABLE_ONLY_IF_CREDENTIAL_NOT_REQUIRED
```

Flag passed to `https://developer.android.com/reference/android/os/UserManager#requestQuietModeEnabled(boolean,%20android.os.UserHandle)` to request disabling quiet mode only if
there is no need to confirm the user credentials. If credentials are required to disable
quiet mode, `https://developer.android.com/reference/android/os/UserManager#requestQuietModeEnabled(boolean,%20android.os.UserHandle)` will do nothing and return `false`.

<br />

Constant Value:

1
(0x00000001)


### USER_CREATION_FAILED_NOT_PERMITTED

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_CREATION_FAILED_NOT_PERMITTED
```

Error result indicating that this user is not allowed to add other users on this device.
This is a result code returned from the activity created by the intent
`https://developer.android.com/reference/android/os/UserManager#createUserCreationIntent(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.os.PersistableBundle)`.

<br />

Constant Value:

1
(0x00000001)


### USER_CREATION_FAILED_NO_MORE_USERS

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_CREATION_FAILED_NO_MORE_USERS
```

Error result indicating that no more users can be created on this device.
This is a result code returned from the activity created by the intent
`https://developer.android.com/reference/android/os/UserManager#createUserCreationIntent(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.os.PersistableBundle)`.

<br />

Constant Value:

2
(0x00000002)


### USER_OPERATION_ERROR_CURRENT_USER

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_OPERATION_ERROR_CURRENT_USER
```

Indicates user operation failed because the target user is in the foreground.

<br />

Constant Value:

4
(0x00000004)


### USER_OPERATION_ERROR_LOW_STORAGE

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_OPERATION_ERROR_LOW_STORAGE
```

Indicates user operation failed because device has low data storage.

<br />

Constant Value:

5
(0x00000005)


### USER_OPERATION_ERROR_MANAGED_PROFILE

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_OPERATION_ERROR_MANAGED_PROFILE
```

Indicates user operation failed because target user is a managed profile.

<br />

Constant Value:

2
(0x00000002)


### USER_OPERATION_ERROR_MAX_RUNNING_USERS

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_OPERATION_ERROR_MAX_RUNNING_USERS
```

Indicates user operation failed because maximum running user limit has been reached.

<br />

Constant Value:

3
(0x00000003)


### USER_OPERATION_ERROR_MAX_USERS

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_OPERATION_ERROR_MAX_USERS
```

Indicates user operation failed because a relevant maximum user limit has been reached.

This could include the situation in which limit is 0, such as if a particular type of user
is not enabled or is ineligible to be added to the requested parent.

<br />

Constant Value:

6
(0x00000006)


### USER_OPERATION_ERROR_UNKNOWN

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_OPERATION_ERROR_UNKNOWN
```

Indicates user operation failed for unknown reason.

<br />

Constant Value:

1
(0x00000001)


### USER_OPERATION_SUCCESS

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int USER_OPERATION_SUCCESS
```

Indicates user operation is successful.

<br />

Constant Value:

0
(0x00000000)


### USER_TYPE_PROFILE_CLONE

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String USER_TYPE_PROFILE_CLONE
```

User type representing a clone profile. Clone profile is a user profile type used to run
a second instance of an otherwise single user App (eg, messengers). Currently only the main
user (which is the first full user set up on the device, usually the system user)
can have a clone profile.

<br />

Constant Value:

"android.os.usertype.profile.CLONE"


### USER_TYPE_PROFILE_MANAGED

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String USER_TYPE_PROFILE_MANAGED
```

User type representing a managed profile, which is a profile that is to be managed by a
device policy controller (DPC).
The intended purpose is for work profiles, which are managed by a corporate entity.

<br />

Constant Value:

"android.os.usertype.profile.MANAGED"


### USER_TYPE_PROFILE_PRIVATE

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String USER_TYPE_PROFILE_PRIVATE
```

User type representing a private profile. Private profile is a user profile that can be used
as an alternative user-space to install and use sensitive apps.
UI surfaces can adopt an alternative strategy to show apps belonging to this profile, in line
with their sensitive nature.

<br />

Constant Value:

"android.os.usertype.profile.PRIVATE"


## Public methods

### createUserCreationIntent

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Intent createUserCreationIntent (String userName, 
                String accountName, 
                String accountType, 
                PersistableBundle accountOptions)
```

Returns an intent to create a user for the provided name and account name. The name
and account name will be used when the setup process for the new user is started.


The intent should be launched using startActivityForResult and the return result will
indicate if the user consented to adding a new user and if the operation succeeded. Any
errors in creating the user will be returned in the result code. If the user cancels the
request, the return result will be `https://developer.android.com/reference/android/app/Activity#RESULT_CANCELED`. On success, the
result code will be `https://developer.android.com/reference/android/app/Activity#RESULT_OK`.


Use `https://developer.android.com/reference/android/os/UserManager#supportsMultipleUsers()` to first check if the device supports this operation
at all.


The new user is created but not initialized. After switching into the user for the first
time, the preferred user name and account information are used by the setup process for that
user.

This API should only be called if the current user is an `https://developer.android.com/reference/android/os/UserManager#isAdminUser()` user,
as otherwise the returned intent will not be able to create a user.

<br />

| Parameters ||
|---|---|
| `userName` | `String`: Optional name to assign to the user. Character limit is 100. This value may be `null`. <br /> |
| `accountName` | `String`: Optional account name that will be used by the setup wizard to initialize the user. Character limit is 500. This value may be `null`. <br /> |
| `accountType` | `String`: Optional account type for the account to be created. This is required if the account name is specified. Character limit is 500. This value may be `null`. <br /> |
| `accountOptions` | `PersistableBundle`: Optional bundle of data to be passed in during account creation in the new user via `https://developer.android.com/reference/android/accounts/AccountManager#addAccount(java.lang.String,%20java.lang.String,%20java.lang.String[],%20android.os.Bundle,%20android.app.Activity,%20android.accounts.AccountManagerCallback<android.os.Bundle>,%20android.os.Handler)`. Character limit is 1000. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/Intent` | An Intent that can be launched from an Activity. <br /> |

**See also:**

- `https://developer.android.com/reference/android/os/UserManager#USER_CREATION_FAILED_NOT_PERMITTED`
- `https://developer.android.com/reference/android/os/UserManager#USER_CREATION_FAILED_NO_MORE_USERS`
- `https://developer.android.com/reference/android/os/UserManager#supportsMultipleUsers()`

### getApplicationRestrictions

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getApplicationRestrictions (String packageName)
```

Returns a `https://developer.android.com/reference/android/os/Bundle` containing any saved application restrictions for the context user,
for the given package name. Only an application with this package name can call this method.

The returned `https://developer.android.com/reference/android/os/Bundle` consists of key-value pairs, as defined by the application,
where the types of values may be:

- `boolean`
- `int`
- `String` or `String[]`
- From `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, `Bundle` or `Bundle[]`

NOTE: The method performs disk I/O and shouldn't be called on the main thread

Starting from Android version `https://developer.android.com/reference/android/os/Build.VERSION_CODES#UPSIDE_DOWN_CAKE`,
it is possible for there to be multiple managing apps on the device with the ability to set
app restrictions, e.g. an Enterprise Device Policy Controller (DPC) and a Supervision admin.
This method will always return the app restrictions set by the DPC, if the DPC has set one.
Beginning from SDK level 36.1, if the DPC has not set any app restriction while other
managing apps have set some, this method will return app restrictions set by one of those
managing apps. There is no guarantee on which managing apps app restriction will be returned.
To retrieve restrictions set by all managing apps, use
`https://developer.android.com/reference/android/content/RestrictionsManager#getApplicationRestrictionsPerAdmin()` instead.


This method may take several seconds to complete, so it should
only be called from a worker thread.

<br />

| Parameters ||
|---|---|
| `packageName` | `String`: the package name of the calling application <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | a `https://developer.android.com/reference/android/os/Bundle` with the restrictions for that package, or an empty `https://developer.android.com/reference/android/os/Bundle` if there are no saved restrictions. <br /> |

**See also:**

- `https://developer.android.com/reference/android/os/UserManager#KEY_RESTRICTIONS_PENDING`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getApplicationRestrictions(android.content.ComponentName,%20java.lang.String)`

### getSerialNumberForUser

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getSerialNumberForUser (UserHandle user)
```

Return the serial number for a user. This is a device-unique
number assigned to that user; if the user is deleted and then a new
user created, the new users will not be given the same serial number.

<br />

| Parameters ||
|---|---|
| `user` | `UserHandle`: The user whose serial number is to be retrieved. <br /> |

| Returns ||
|---|---|
| `long` | The serial number of the given user; returns -1 if the given UserHandle does not exist. <br /> |

**See also:**

- `https://developer.android.com/reference/android/os/UserManager#getUserForSerialNumber(long)`

### getUserCount

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getUserCount ()
```

Return the number of users currently created on the device.


Requires android.Manifest.permission.MANAGE_USERS or android.Manifest.permission.CREATE_USERS

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getUserCreationTime

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getUserCreationTime (UserHandle userHandle)
```

Returns creation time of the given user. The given user must be the calling user or
a profile associated with it.

<br />

| Parameters ||
|---|---|
| `userHandle` | `UserHandle`: user handle of the calling user or a profile associated with the calling user. <br /> |

| Returns ||
|---|---|
| `long` | creation time in milliseconds since Epoch time. <br /> |

### getUserForSerialNumber

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public UserHandle getUserForSerialNumber (long serialNumber)
```

Return the user associated with a serial number previously
returned by `https://developer.android.com/reference/android/os/UserManager#getSerialNumberForUser(android.os.UserHandle)`.

<br />

| Parameters ||
|---|---|
| `serialNumber` | `long`: The serial number of the user that is being retrieved. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/UserHandle` | Return the user associated with the serial number, or null if there is not one. <br /> |

**See also:**

- `https://developer.android.com/reference/android/os/UserManager#getSerialNumberForUser(android.os.UserHandle)`

### getUserName

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getUserName ()
```

Returns the user name of the context user. This call is only available to applications on
the system image.


Requires android.Manifest.permission.MANAGE_USERS or android.Manifest.permission.CREATE_USERS or android.Manifest.permission.QUERY_USERS or `https://developer.android.com/reference/android/Manifest.permission#GET_ACCOUNTS_PRIVILEGED`

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the user name. This value cannot be `null`. <br /> |

### getUserProfiles

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public List<UserHandle> getUserProfiles ()
```

Returns a list of the users that are associated with the context user, including the user
itself. This includes the user, its profiles, its parent, and its parent's other profiles,
as applicable.

Note that this includes all profile types (not including Restricted profiles).

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/os/UserHandle>` | A non-empty list of UserHandles associated with the context user. <br /> |

### getUserRestrictions

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getUserRestrictions (UserHandle userHandle)
```

Returns the user-wide restrictions imposed on the user specified by `userHandle`.

<br />

| Parameters ||
|---|---|
| `userHandle` | `UserHandle`: the UserHandle of the user for whom to retrieve the restrictions. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | a Bundle containing all the restrictions. Requires `android.permission.MANAGE_USERS` or `android.permission.INTERACT_ACROSS_USERS`, otherwise specified `https://developer.android.com/reference/android/os/UserHandle` must be the calling user or a profile associated with it. |

### getUserRestrictions

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getUserRestrictions ()
```

Returns the user-wide restrictions imposed on the context user.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | a Bundle containing all the restrictions. <br /> |

### hasUserRestriction

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasUserRestriction (String restrictionKey)
```

Returns whether the context user has been disallowed from performing certain actions
or setting certain settings.

<br />

| Parameters ||
|---|---|
| `restrictionKey` | `String`: The string key representing the restriction. Value is one of the following: - `https://developer.android.com/reference/android/os/UserManager#ALLOW_PARENT_PROFILE_APP_LINKING` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADD_MANAGED_PROFILE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADD_PRIVATE_PROFILE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADD_USER` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADD_WIFI_CONFIG` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ADJUST_VOLUME` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_AIRPLANE_MODE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_AMBIENT_DISPLAY` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_APPS_CONTROL` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ASSIST_CONTENT` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_AUTOFILL` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_BLUETOOTH` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_BLUETOOTH_SHARING` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CAMERA_TOGGLE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CELLULAR_2G` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CHANGE_NEAR_FIELD_COMMUNICATION_RADIO` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CHANGE_WIFI_STATE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_BLUETOOTH` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_BRIGHTNESS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_CELL_BROADCASTS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_CREDENTIALS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_DATE_TIME` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_DEFAULT_APPS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_LOCALE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_LOCATION` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_MOBILE_NETWORKS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_PRIVATE_DNS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_SCREEN_TIMEOUT` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_TETHERING` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_VPN` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONFIG_WIFI` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONTENT_CAPTURE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CONTENT_SUGGESTIONS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CREATE_WINDOWS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_CROSS_PROFILE_COPY_PASTE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_DATA_ROAMING` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_DEBUGGING_FEATURES` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_FACTORY_RESET` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_FUN` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_GRANT_ADMIN` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_TASK_CONTINUITY_HANDOFF` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_APPS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES_INCLUDING_REGISTERED_APP_STORES` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_MICROPHONE_TOGGLE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_MODIFY_ACCOUNTS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_MOUNT_PHYSICAL_MEDIA` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_NETWORK_RESET` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_OUTGOING_BEAM` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_OUTGOING_CALLS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_PRINTING` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_REMOVE_MANAGED_PROFILE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_REMOVE_USER` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SAFE_BOOT` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SET_USER_ICON` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SET_WALLPAPER` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SHARE_INTO_MANAGED_PROFILE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SHARE_LOCATION` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SIM_GLOBALLY` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SMS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_SYSTEM_ERROR_DIALOGS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_THREAD_NETWORK` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_ULTRA_WIDEBAND_RADIO` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_UNIFIED_PASSWORD` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_UNINSTALL_APPS` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_UNMUTE_MICROPHONE` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_USB_FILE_TRANSFER` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_USER_SWITCH` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_WIFI_DIRECT` - `https://developer.android.com/reference/android/os/UserManager#DISALLOW_WIFI_TETHERING` - `https://developer.android.com/reference/android/os/UserManager#ENSURE_VERIFY_APPS` - `https://developer.android.com/reference/android/os/UserManager#KEY_RESTRICTIONS_PENDING` |

| Returns ||
|---|---|
| `boolean` | `true` if the context user has the given restriction, `false` otherwise. <br /> |

### isAdminUser

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAdminUser ()
```

Used to check if the context user is an admin user. An admin user may be allowed to
modify or configure certain settings that aren't available to non-admin users,
create and delete additional users, etc. There can be more than one admin users.

<br />

| Returns ||
|---|---|
| `boolean` | whether the context user is an admin user. <br /> |

### isDemoUser

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isDemoUser ()
```

Checks if the context user is a demo user. When running in a demo user,
apps can be more helpful to the user, or explain their features in more detail.

<br />

| Returns ||
|---|---|
| `boolean` | whether the context user is a demo user. <br /> |

### isHeadlessSystemUserMode

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean isHeadlessSystemUserMode ()
```

Checks whether the device is running in a headless system user mode.

Headless system user mode means the `https://developer.android.com/reference/android/os/UserManager#isSystemUser()` runs system
services and some system UI, but it is not associated with any real person and additional
users must be created to be associated with real persons.

<br />

| Returns ||
|---|---|
| `boolean` | whether the device is running in a headless system user mode. <br /> |

### isManagedProfile

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isManagedProfile ()
```

Checks if the context user is a managed profile.

Note that this applies specifically to *managed* profiles. For profiles in general,
use `https://developer.android.com/reference/android/os/UserManager#isProfile()` instead.

<br />

| Returns ||
|---|---|
| `boolean` | whether the context user is a managed profile. <br /> |

### isProfile

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isProfile ()
```

Checks if the context user is running in a profile. A profile is a user that
typically has its own separate data but shares its UI with some parent user. For example, a
`https://developer.android.com/reference/android/os/UserManager#isManagedProfile()` is a type of profile.

<br />

| Returns ||
|---|---|
| `boolean` | whether the context user is in a profile. <br /> |

### isQuietModeEnabled

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isQuietModeEnabled (UserHandle userHandle)
```

Returns whether the given profile is in quiet mode or not.

<br />

| Parameters ||
|---|---|
| `userHandle` | `UserHandle`: The user handle of the profile to be queried. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the profile is in quiet mode, false otherwise. <br /> |

### isSystemUser

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isSystemUser ()
```

Used to check if the context user is the system user. The system user
is the initial user that is implicitly created on first boot and hosts most of the
system services.

<br />

| Returns ||
|---|---|
| `boolean` | whether the context user is the system user. <br /> |

### isUserAGoat

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isUserAGoat ()
```

Used to determine whether the user making this call is subject to
teleportations.

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#LOLLIPOP`, this method can
now automatically identify goats using advanced goat recognition technology.

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#R`, this method always returns
`false` in order to protect goat privacy.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | Returns whether the user making this call is a goat. <br /> |

### isUserForeground

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isUserForeground ()
```

Checks if the context user is running in the foreground.

<br />

| Returns ||
|---|---|
| `boolean` | whether the context user is running in the foreground. <br /> |

### isUserRunning

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isUserRunning (UserHandle user)
```

Return whether the given user is actively running. This means that
the user is in the "started" state, not "stopped" -- it is currently
allowed to run code through scheduled alarms, receiving broadcasts,
etc. A started user may be either the current foreground user or a
background user; the result here does not distinguish between the two.

Note prior to Android Nougat MR1 (SDK version \<= 24;
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#N`, this API required a system permission
in order to check other profile's status.
Since Android Nougat MR1 (SDK version \>= 25;
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#N_MR1`), the restriction has been relaxed, and now
it'll accept any `https://developer.android.com/reference/android/os/UserHandle` within the same profile group as the caller.

<br />

| Parameters ||
|---|---|
| `user` | `UserHandle`: The user to retrieve the running state for. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### isUserRunningOrStopping

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isUserRunningOrStopping (UserHandle user)
```

Return whether the given user is actively running *or* stopping.
This is like `https://developer.android.com/reference/android/os/UserManager#isUserRunning(android.os.UserHandle)`, but will also return
true if the user had been running but is in the process of being stopped
(but is not yet fully stopped, and still running some code).

Note prior to Android Nougat MR1 (SDK version \<= 24;
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#N`, this API required a system permission
in order to check other profile's status.
Since Android Nougat MR1 (SDK version \>= 25;
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#N_MR1`), the restriction has been relaxed, and now
it'll accept any `https://developer.android.com/reference/android/os/UserHandle` within the same profile group as the caller.

<br />

| Parameters ||
|---|---|
| `user` | `UserHandle`: The user to retrieve the running state for. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### isUserUnlocked

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isUserUnlocked (UserHandle user)
```

Return whether the given user is running in an "unlocked" state.


On devices with direct boot, a user is unlocked only after they've
entered their credentials (such as a lock pattern or PIN). On devices
without direct boot, a user is unlocked as soon as it starts.


When a user is locked, only device-protected data storage is available.
When a user is unlocked, both device-protected and credential-protected
private app data storage is available.

Requires `android.permission.MANAGE_USERS` or
`android.permission.INTERACT_ACROSS_USERS`, otherwise specified `https://developer.android.com/reference/android/os/UserHandle`
must be the calling user or a profile associated with it.

<br />

| Parameters ||
|---|---|
| `user` | `UserHandle`: to retrieve the unlocked state for. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/content/Intent#ACTION_USER_UNLOCKED`
- `https://developer.android.com/reference/android/content/Context#createDeviceProtectedStorageContext()`

### isUserUnlocked

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isUserUnlocked ()
```

Return whether the context user is running in an "unlocked" state.


On devices with direct boot, a user is unlocked only after they've
entered their credentials (such as a lock pattern or PIN). On devices
without direct boot, a user is unlocked as soon as it starts.


When a user is locked, only device-protected data storage is available.
When a user is unlocked, both device-protected and credential-protected
private app data storage is available.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/content/Intent#ACTION_USER_UNLOCKED`
- `https://developer.android.com/reference/android/content/Context#createDeviceProtectedStorageContext()`

### requestQuietModeEnabled

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean requestQuietModeEnabled (boolean enableQuietMode, 
                UserHandle userHandle, 
                int flags)
```

Perform the same operation as `https://developer.android.com/reference/android/os/UserManager#requestQuietModeEnabled(boolean,%20android.os.UserHandle)`, but
with a flag to tweak the behavior of the request.

<br />

| Parameters ||
|---|---|
| `enableQuietMode` | `boolean`: whether quiet mode should be enabled or disabled <br /> |
| `userHandle` | `UserHandle`: user handle of the profile. This value cannot be `null`. <br /> |
| `flags` | `int`: Can be 0 or `https://developer.android.com/reference/android/os/UserManager#QUIET_MODE_DISABLE_ONLY_IF_CREDENTIAL_NOT_REQUIRED`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/UserManager#QUIET_MODE_DISABLE_ONLY_IF_CREDENTIAL_NOT_REQUIRED` |

| Returns ||
|---|---|
| `boolean` | `false` if user's credential is needed in order to turn off quiet mode, `true` otherwise <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `userHandle` is not a managed profile |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller is invalid |

**See also:**

- `https://developer.android.com/reference/android/os/UserManager#isQuietModeEnabled(android.os.UserHandle)`

### requestQuietModeEnabled

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean requestQuietModeEnabled (boolean enableQuietMode, 
                UserHandle userHandle)
```

Enables or disables quiet mode for a profile. If quiet mode is enabled, apps in the profile
don't run, generate notifications, or consume data or battery.


If a user's credential is needed to turn off quiet mode, a confirm credential screen will be
shown to the user.


The change may not happen instantly, however apps can listen for
`https://developer.android.com/reference/android/content/Intent#ACTION_MANAGED_PROFILE_AVAILABLE` and
`https://developer.android.com/reference/android/content/Intent#ACTION_MANAGED_PROFILE_UNAVAILABLE` broadcasts in order to be notified of
the change of the quiet mode for managed profile.
Apps can listen to generic broadcasts `https://developer.android.com/reference/android/content/Intent#ACTION_PROFILE_AVAILABLE` and
`https://developer.android.com/reference/android/content/Intent#ACTION_PROFILE_UNAVAILABLE` to be notified of the change in quiet mode for
any profiles. Apps can also check the current state of quiet mode by calling
`https://developer.android.com/reference/android/os/UserManager#isQuietModeEnabled(android.os.UserHandle)`.


The caller must either be the foreground default launcher or have one of these permissions:
`MANAGE_USERS` or `MODIFY_QUIET_MODE`.

<br />

| Parameters ||
|---|---|
| `enableQuietMode` | `boolean`: whether quiet mode should be enabled or disabled <br /> |
| `userHandle` | `UserHandle`: user handle of the profile. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `false` if user's credential is needed in order to turn off quiet mode, `true` otherwise <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `userHandle` is not a profile |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller is invalid |

**See also:**

- `https://developer.android.com/reference/android/os/UserManager#isQuietModeEnabled(android.os.UserHandle)`

### setRestrictionsChallenge

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean setRestrictionsChallenge (String newPin)
```


**This method was deprecated
in API level 23.**   

The restrictions PIN functionality is no longer provided by the system.
This method is preserved for backwards compatibility reasons and always returns false.

Sets a new challenge PIN for restrictions. This is only for use by pre-installed
apps and requires the MANAGE_USERS permission.

<br />

| Parameters ||
|---|---|
| `newPin` | `String`: the PIN to use for challenge dialogs. <br /> |

| Returns ||
|---|---|
| `boolean` | Returns true if the challenge PIN was set successfully. <br /> |

### setUserRestriction

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setUserRestriction (String key, 
                boolean value)
```


**This method was deprecated
in API level 21.**   

use `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)` or
`https://developer.android.com/reference/android/app/admin/DevicePolicyManager#clearUserRestriction(android.content.ComponentName,%20java.lang.String)` instead.

Sets the value of a specific restriction on the context user.
Requires the MANAGE_USERS permission.


Requires android.Manifest.permission.MANAGE_USERS

<br />

| Parameters ||
|---|---|
| `key` | `String`: the key of the restriction <br /> |
| `value` | `boolean`: the value for the restriction <br /> |

### setUserRestrictions

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setUserRestrictions (Bundle restrictions, 
                UserHandle userHandle)
```

This will no longer work. Device owners and profile owners should use
`https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)` instead.

<br />

| Parameters ||
|---|---|
| `restrictions` | `Bundle` <br /> |
| `userHandle` | `UserHandle` <br /> |

### setUserRestrictions

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setUserRestrictions (Bundle restrictions)
```

This will no longer work. Device owners and profile owners should use
`https://developer.android.com/reference/android/app/admin/DevicePolicyManager#addUserRestriction(android.content.ComponentName,%20java.lang.String)` instead.

<br />

| Parameters ||
|---|---|
| `restrictions` | `Bundle` <br /> |

### supportsMultipleUsers

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean supportsMultipleUsers ()
```

Returns whether this device supports multiple switchable users with their own login and
customizable space.

Note that, even if false, multiple users might still be possible, as long as no login UI
is required; e.g., profiles might still be supported, as they do not require a login UI.

<br />

| Returns ||
|---|---|
| `boolean` | whether the device supports multiple switchable users. <br /> |