Merge "Add reference to permissions in UserRestriction docs." into udc-dev

This commit is contained in:
Treehugger Robot
2023-05-12 20:26:07 +00:00
committed by Android (Google) Code Review

View File

@@ -250,6 +250,10 @@ public class UserManager {
* use {@link android.accounts.AccountManager} APIs to add or remove accounts when account * use {@link android.accounts.AccountManager} APIs to add or remove accounts when account
* management is disallowed. * management is disallowed.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -267,6 +271,9 @@ public class UserManager {
* primary user or by a profile owner of an organization-owned managed profile on the parent * 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. * profile, it disallows the primary user from changing Wi-Fi access points.
* *
* <p>Holders of the permission {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WIFI}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -285,6 +292,9 @@ public class UserManager {
* When it is set by any of these owners, it applies globally - i.e., it disables airplane mode * When it is set by any of these owners, it applies globally - i.e., it disables airplane mode
* from changing Wi-Fi state. * from changing Wi-Fi state.
* *
* <p>Holders of the permission {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WIFI}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -306,6 +316,9 @@ public class UserManager {
* When it is set by any of these owners, it prevents all users from using * 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. * Wi-Fi tethering. Other forms of tethering are not affected.
* *
* <p>Holders of the permission {@link 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. * This user restriction disables only Wi-Fi tethering.
* Use {@link #DISALLOW_CONFIG_TETHERING} to limit all forms of tethering. * Use {@link #DISALLOW_CONFIG_TETHERING} to limit all forms of tethering.
* When {@link #DISALLOW_CONFIG_TETHERING} is set, this user restriction becomes obsolete. * When {@link #DISALLOW_CONFIG_TETHERING} is set, this user restriction becomes obsolete.
@@ -346,6 +359,9 @@ public class UserManager {
* sharing Wi-Fi for networks configured by these owners. * sharing Wi-Fi for networks configured by these owners.
* Other networks not configured by these owners are not affected. * Other networks not configured by these owners are not affected.
* *
* <p>Holders of the permission {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WIFI}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -365,6 +381,9 @@ public class UserManager {
* When it is set by any of these owners, it prevents all users from using * When it is set by any of these owners, it prevents all users from using
* Wi-Fi Direct. * Wi-Fi Direct.
* *
* <p>Holders of the permission {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WIFI}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -384,6 +403,9 @@ public class UserManager {
* a new Wi-Fi configuration. This does not limit the owner and carrier's ability * a new Wi-Fi configuration. This does not limit the owner and carrier's ability
* to add a new configuration. * to add a new configuration.
* *
* <p>Holders of the permission {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WIFI}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -398,6 +420,9 @@ public class UserManager {
* Specifies if a user is disallowed from changing the device * Specifies if a user is disallowed from changing the device
* language. The default value is <code>false</code>. * language. The default value is <code>false</code>.
* *
* <p>Holders of the permission {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCALE}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -411,6 +436,10 @@ public class UserManager {
* prevents device owners and profile owners installing apps. The default value is * prevents device owners and profile owners installing apps. The default value is
* {@code false}. * {@code false}.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_APPS_CONTROL}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -423,6 +452,10 @@ public class UserManager {
* Specifies if a user is disallowed from uninstalling applications. * Specifies if a user is disallowed from uninstalling applications.
* The default value is <code>false</code>. * The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_APPS_CONTROL}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -442,6 +475,10 @@ public class UserManager {
* managed profile on the parent profile, it prevents the primary user from turning on * managed profile on the parent profile, it prevents the primary user from turning on
* location sharing. * location sharing.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCATION}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -460,6 +497,10 @@ public class UserManager {
* When it is set by any of these owners, it applies globally - i.e., it disables airplane mode * When it is set by any of these owners, it applies globally - i.e., it disables airplane mode
* on the entire device. * on the entire device.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_AIRPLANE_MODE}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -476,6 +517,10 @@ public class UserManager {
* *
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_DISPLAY}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>This user restriction has no effect on managed profiles. * <p>This user restriction has no effect on managed profiles.
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
@@ -490,6 +535,10 @@ public class UserManager {
* *
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_DISPLAY}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>This user restriction has no effect on managed profiles. * <p>This user restriction has no effect on managed profiles.
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
@@ -504,6 +553,10 @@ public class UserManager {
* *
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_DISPLAY}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>This user restriction has no effect on managed profiles. * <p>This user restriction has no effect on managed profiles.
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
@@ -519,6 +572,10 @@ public class UserManager {
* Unknown sources exclude adb and special apps such as trusted app stores. * Unknown sources exclude adb and special apps such as trusted app stores.
* The default value is <code>false</code>. * The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_INSTALL_UNKNOWN_SOURCES}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -536,6 +593,10 @@ public class UserManager {
* This restriction can be enabled by the profile owner, in which case all accounts and * This restriction can be enabled by the profile owner, in which case all accounts and
* profiles will be affected. * profiles will be affected.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_INSTALL_UNKNOWN_SOURCES}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* The default value is <code>false</code>. * The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -559,6 +620,10 @@ public class UserManager {
* primary user or by a profile owner of an organization-owned managed profile on the parent * 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. * profile, it disallows the primary user from configuring bluetooth.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_BLUETOOTH}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -581,6 +646,10 @@ public class UserManager {
* profile, it disables the primary user from using bluetooth and configuring bluetooth * profile, it disables the primary user from using bluetooth and configuring bluetooth
* in Settings. * in Settings.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_BLUETOOTH}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -599,6 +668,10 @@ public class UserManager {
* profile owner of an organization-owned managed profile on the parent profile, it disables * profile owner of an organization-owned managed profile on the parent profile, it disables
* the primary user from any outgoing bluetooth sharing. * the primary user from any outgoing bluetooth sharing.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_BLUETOOTH}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Default is <code>true</code> for managed profiles and false otherwise. * <p>Default is <code>true</code> for managed profiles and false otherwise.
* *
* <p>When a device upgrades to {@link android.os.Build.VERSION_CODES#O}, the system sets it * <p>When a device upgrades to {@link android.os.Build.VERSION_CODES#O}, the system sets it
@@ -626,6 +699,10 @@ public class UserManager {
* user on the device is able to use file transfer over USB because the UI for file transfer * 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. * is always associated with the primary user.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USB_FILE_TRANSFER}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -640,6 +717,10 @@ public class UserManager {
* Specifies if a user is disallowed from configuring user * Specifies if a user is disallowed from configuring user
* credentials. The default value is <code>false</code>. * credentials. The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -654,6 +735,10 @@ public class UserManager {
* This restriction has no effect on managed profiles. * This restriction has no effect on managed profiles.
* The default value is <code>false</code>. * The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -692,6 +777,10 @@ public class UserManager {
* that user only, including starting activities, making service calls, accessing content * that user only, including starting activities, making service calls, accessing content
* providers, sending broadcasts, installing/uninstalling packages, clearing user data, etc. * providers, sending broadcasts, installing/uninstalling packages, clearing user data, etc.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_DEBUGGING_FEATURES}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -712,6 +801,10 @@ public class UserManager {
* <p>From Android 12 ({@linkplain android.os.Build.VERSION_CODES#S API level 31}) enforcing * <p>From Android 12 ({@linkplain android.os.Build.VERSION_CODES#S API level 31}) enforcing
* this restriction clears currently active VPN if it was configured by the user. * this restriction clears currently active VPN if it was configured by the user.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_VPN}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -729,6 +822,10 @@ public class UserManager {
* managed profile on the parent profile, it disallows the primary user from turning location * managed profile on the parent profile, it disallows the primary user from turning location
* on or off. * on or off.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCATION}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>This user restriction is different from {@link #DISALLOW_SHARE_LOCATION}, * <p>This user restriction is different from {@link #DISALLOW_SHARE_LOCATION},
@@ -755,6 +852,10 @@ public class UserManager {
* from configuring date, time and timezone and disables all configuring of date, time and * from configuring date, time and timezone and disables all configuring of date, time and
* timezone in Settings. * timezone in Settings.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_TIME}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -776,6 +877,10 @@ public class UserManager {
* the parent profile, it disables the primary user from using Tethering and hotspots and * the parent profile, it disables the primary user from using Tethering and hotspots and
* disables all configuring of Tethering and hotspots in Settings. * disables all configuring of Tethering and hotspots in Settings.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>In Android 9.0 or higher, if tethering is enabled when this restriction is set, * <p>In Android 9.0 or higher, if tethering is enabled when this restriction is set,
@@ -796,6 +901,10 @@ public class UserManager {
* <p>This restriction has no effect on secondary users and managed profiles since only the * <p>This restriction has no effect on secondary users and managed profiles since only the
* primary user can reset the network settings of the device. * primary user can reset the network settings of the device.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -811,6 +920,10 @@ public class UserManager {
* <p>This restriction has no effect on non-admin users since they cannot factory reset the * <p>This restriction has no effect on non-admin users since they cannot factory reset the
* device. * device.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_FACTORY_RESET}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -827,6 +940,10 @@ public class UserManager {
* <p> When the device is an organization-owned device provisioned with a managed profile, * <p> When the device is an organization-owned device provisioned with a managed profile,
* this restriction will be set as a base restriction which cannot be removed by any admin. * this restriction will be set as a base restriction which cannot be removed by any admin.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -858,6 +975,10 @@ public class UserManager {
* <p>The default value for an unmanaged user is <code>false</code>. * <p>The default value for an unmanaged user is <code>false</code>.
* For users with a device owner set, the default is <code>true</code>. * For users with a device owner set, the default is <code>true</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILES}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -876,6 +997,10 @@ public class UserManager {
* the system enforces app verification across all users on the device. Running in earlier * 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. * Android versions, this restriction affects only the profile that sets it.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_INSTALL_UNKNOWN_SOURCES}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -893,6 +1018,10 @@ public class UserManager {
* on the primary user or by a profile owner of an organization-owned managed profile on * 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 configuring cell broadcasts. * the parent profile, it disables the primary user from configuring cell broadcasts.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>This restriction has no effect on secondary users and managed profiles since only the * <p>This restriction has no effect on secondary users and managed profiles since only the
@@ -915,6 +1044,10 @@ public class UserManager {
* on the primary user or by a profile owner of an organization-owned managed profile on * 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 configuring mobile networks. * the parent profile, it disables the primary user from configuring mobile networks.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>This restriction has no effect on secondary users and managed profiles since only the * <p>This restriction has no effect on secondary users and managed profiles since only the
@@ -949,6 +1082,10 @@ public class UserManager {
* {@link DevicePolicyManager#addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName)} * {@link DevicePolicyManager#addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName)}
* to add a default intent handler for a given intent filter. * to add a default intent handler for a given intent filter.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_APPS_CONTROL}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -966,6 +1103,10 @@ public class UserManager {
* on the primary user or by a profile owner of an organization-owned managed profile on * 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. * the parent profile, it disables the primary user from mounting physical external media.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PHYSICAL_MEDIA}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -986,6 +1127,10 @@ public class UserManager {
* organization-owned managed profile on the parent profile, it will disallow the primary user * organization-owned managed profile on the parent profile, it will disallow the primary user
* from adjusting the microphone volume. * from adjusting the microphone volume.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MICROPHONE}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -1004,6 +1149,10 @@ public class UserManager {
* <p>When the restriction is set by profile owners, then it only applies to relevant * <p>When the restriction is set by profile owners, then it only applies to relevant
* profiles. * profiles.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_AUDIO_OUTPUT}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>This restriction has no effect on managed profiles. * <p>This restriction has no effect on managed profiles.
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
@@ -1022,6 +1171,10 @@ public class UserManager {
* primary user or by a profile owner of an organization-owned managed profile on the parent * 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. * profile, it disallows the primary user from making outgoing phone calls.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_CALLS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -1041,6 +1194,10 @@ public class UserManager {
* on the primary user or by a profile owner of an organization-owned managed profile on * 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. * the parent profile, it disables the primary user from sending or receiving SMS messages.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_SMS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -1056,6 +1213,10 @@ public class UserManager {
* device owner may wish to prevent the user from experiencing amusement or * device owner may wish to prevent the user from experiencing amusement or
* joy while using the device. The default value is <code>false</code>. * joy while using the device. The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_FUN}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1073,6 +1234,10 @@ public class UserManager {
* <p>This can only be set by device owners and profile owners on the primary user. * <p>This can only be set by device owners and profile owners on the primary user.
* The default value is <code>false</code>. * The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WINDOWS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1091,6 +1256,10 @@ public class UserManager {
* the profile owner of the primary user or a secondary user, the restriction affects only the * 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. * calling user. This user restriction has no effect on managed profiles.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_SYSTEM_DIALOGS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1108,6 +1277,10 @@ public class UserManager {
* optical character recognition (OCR), we strongly recommend combining this user restriction * optical character recognition (OCR), we strongly recommend combining this user restriction
* with {@link DevicePolicyManager#setScreenCaptureDisabled(ComponentName, boolean)}. * with {@link DevicePolicyManager#setScreenCaptureDisabled(ComponentName, boolean)}.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1120,6 +1293,10 @@ public class UserManager {
* Specifies if the user is not allowed to use NFC to beam out data from apps. * Specifies if the user is not allowed to use NFC to beam out data from apps.
* The default value is <code>false</code>. * The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_NEARBY_COMMUNICATION}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1145,6 +1322,10 @@ public class UserManager {
* are able to set wallpaper regardless of this restriction. * are able to set wallpaper regardless of this restriction.
* The default value is <code>false</code>. * The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WALLPAPER}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1163,6 +1344,10 @@ public class UserManager {
* the parent profile, it disables the primary user from rebooting the device into safe * the parent profile, it disables the primary user from rebooting the device into safe
* boot mode. * boot mode.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_SAFE_BOOT}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -1191,6 +1376,10 @@ public class UserManager {
* *
* <p>This restriction can be set by device owners and profile owners. * <p>This restriction can be set by device owners and profile owners.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_RUN_IN_BACKGROUND}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
* @see DevicePolicyManager#clearUserRestriction(ComponentName, String) * @see DevicePolicyManager#clearUserRestriction(ComponentName, String)
* @see #getUserRestrictions() * @see #getUserRestrictions()
@@ -1208,6 +1397,10 @@ public class UserManager {
* profile owner of an organization-owned managed profile on the parent profile, it disables * profile owner of an organization-owned managed profile on the parent profile, it disables
* the primary user from using camera. * the primary user from using camera.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_CAMERA}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1220,6 +1413,10 @@ public class UserManager {
/** /**
* Specifies if a user is not allowed to unmute the device's global volume. * Specifies if a user is not allowed to unmute the device's global volume.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_AUDIO_OUTPUT}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* @see DevicePolicyManager#setMasterVolumeMuted(ComponentName, boolean) * @see DevicePolicyManager#setMasterVolumeMuted(ComponentName, boolean)
* @see DevicePolicyManager#clearUserRestriction(ComponentName, String) * @see DevicePolicyManager#clearUserRestriction(ComponentName, String)
* @see #getUserRestrictions() * @see #getUserRestrictions()
@@ -1236,6 +1433,10 @@ public class UserManager {
* on the primary user or by a profile owner of an organization-owned managed profile on * 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. * the parent profile, it disables the primary user from using cellular data when roaming.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1249,6 +1450,10 @@ public class UserManager {
* can set this restriction. When it is set by device owner, only the target user will be * can set this restriction. When it is set by device owner, only the target user will be
* affected. The default value is <code>false</code>. * affected. The default value is <code>false</code>.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1285,6 +1490,11 @@ public class UserManager {
* *
* <p>Can be set by profile owners. It only has effect on managed profiles when set by managed * <p>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. * profile owner. Has no effect on non-managed profiles or users.
*
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1302,7 +1512,12 @@ public class UserManager {
* {@link android.content.Intent#ACTION_VIEW}, * {@link android.content.Intent#ACTION_VIEW},
* category {@link android.content.Intent#CATEGORY_BROWSABLE}, scheme http or https, and which * category {@link android.content.Intent#CATEGORY_BROWSABLE}, scheme http or https, and which
* define a host can handle intents from the managed profile. * define a host can handle intents from the managed profile.
* The default value is <code>false</code>. *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILES}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
* <p>Type: Boolean * <p>Type: Boolean
@@ -1319,6 +1534,10 @@ public class UserManager {
* <p>Device owner and profile owner can set this restriction. When it is set by device owner, * <p>Device owner and profile owner can set this restriction. When it is set by device owner,
* only the target user will be affected. * only the target user will be affected.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_AUTOFILL}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1336,6 +1555,10 @@ public class UserManager {
* managed profile on the parent profile, it disables the primary user's screen from being * managed profile on the parent profile, it disables the primary user's screen from being
* captured for artificial intelligence purposes. * captured for artificial intelligence purposes.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_SCREEN_CONTENT}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1353,6 +1576,10 @@ public class UserManager {
* managed profile on the parent profile, it disables the primary user from receiving content * managed profile on the parent profile, it disables the primary user from receiving content
* suggestions for selections based on the contents of their screen. * suggestions for selections based on the contents of their screen.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_SCREEN_CONTENT}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1369,6 +1596,10 @@ public class UserManager {
* {@link DevicePolicyManager#switchUser(ComponentName, UserHandle)} when this restriction is * {@link DevicePolicyManager#switchUser(ComponentName, UserHandle)} when this restriction is
* set. * set.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1391,7 +1622,12 @@ public class UserManager {
* This restriction is only meaningful when set by profile owner. When it is set by device * This restriction is only meaningful when set by profile owner. When it is set by device
* owner, it does not have any effect. * owner, it does not have any effect.
* <p> * <p>
* The default value is <code>false</code>. *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
* @see DevicePolicyManager#clearUserRestriction(ComponentName, String) * @see DevicePolicyManager#clearUserRestriction(ComponentName, String)
@@ -1404,6 +1640,10 @@ public class UserManager {
* *
* This restriction can be set by device or profile owner. * This restriction can be set by device or profile owner.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PRINTING}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* The default value is {@code false}. * The default value is {@code false}.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1419,6 +1659,10 @@ public class UserManager {
* organization-owned managed profile on the parent profile. When it is set by either of these * organization-owned managed profile on the parent profile. When it is set by either of these
* owners, it applies globally. * owners, it applies globally.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_RESTRICT_PRIVATE_DNS}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* <p>Key for user restrictions. * <p>Key for user restrictions.
@@ -1525,6 +1769,10 @@ public class UserManager {
* In all cases, the setting applies globally on the device and will prevent the device from * In all cases, the setting applies globally on the device and will prevent the device from
* scanning for or connecting to 2g networks, except in the case of an emergency. * scanning for or connecting to 2g networks, except in the case of an emergency.
* *
* <p>Holders of the permission
* {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK}
* can set this restriction using the DevicePolicyManager APIs mentioned below.
*
* <p>The default value is <code>false</code>. * <p>The default value is <code>false</code>.
* *
* @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
@@ -1537,15 +1785,19 @@ public class UserManager {
* This user restriction specifies if Ultra-wideband is disallowed on the device. If * 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 is disallowed it cannot be turned on via Settings.
* *
* <p>
* 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.
*
* <p>This restriction can only be set by a device owner or a profile owner of an * <p>This restriction can only be set by a device owner or a profile owner of an
* organization-owned managed profile on the parent profile. * organization-owned managed profile on the parent profile.
* In both cases, the restriction applies globally on the device and will turn off the * 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 * ultra-wideband radio if it's currently on and prevent the radio from being turned on in
* the future. * the future.
* *
* <p> * <p>Holders of the permission
* Ultra-wideband (UWB) is a radio technology that can use a very low energy level * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_NEARBY_COMMUNICATION}
* for short-range, high-bandwidth communications over a large portion of the radio spectrum. * can set this restriction using the DevicePolicyManager APIs mentioned below.
* *
* <p>Default is <code>false</code>. * <p>Default is <code>false</code>.
* *