From 60f4ae03ccd26424458159e392cd6cc806079574 Mon Sep 17 00:00:00 2001 From: Elis Elliott Date: Wed, 12 Apr 2023 09:57:07 +0000 Subject: [PATCH] Add reference to permissions in UserRestriction docs. Fixes: 277873135 Test: n/a Change-Id: I486a8a9c0399730c6138c596e227ea8503e31653 --- core/java/android/os/UserManager.java | 262 +++++++++++++++++++++++++- 1 file changed, 257 insertions(+), 5 deletions(-) diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 8606687d8c689..7d68b44581de8 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -250,6 +250,10 @@ public class UserManager { * use {@link android.accounts.AccountManager} APIs to add or remove accounts when account * management is disallowed. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @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 * profile, it disallows the primary user from changing Wi-Fi access points. * + *

Holders of the permission {@link 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. @@ -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 * from changing Wi-Fi state. * + *

Holders of the permission {@link 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. @@ -306,6 +316,9 @@ public class UserManager { * 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 {@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. * Use {@link #DISALLOW_CONFIG_TETHERING} to limit all forms of tethering. * 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. * Other networks not configured by these owners are not affected. * + *

Holders of the permission {@link 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. @@ -365,6 +381,9 @@ public class UserManager { * When it is set by any of these owners, it prevents all users from using * Wi-Fi Direct. * + *

Holders of the permission {@link 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. @@ -384,6 +403,9 @@ public class UserManager { * a new Wi-Fi configuration. This does not limit the owner and carrier's ability * to add a new configuration. * + *

Holders of the permission {@link 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. @@ -398,6 +420,9 @@ public class UserManager { * Specifies if a user is disallowed from changing the device * language. The default value is false. * + *

Holders of the permission {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCALE} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -411,6 +436,10 @@ public class UserManager { * prevents device owners and profile owners installing apps. The default value is * {@code false}. * + *

Holders of the permission + * {@link 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 DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -423,6 +452,10 @@ public class UserManager { * Specifies if a user is disallowed from uninstalling applications. * The default value is false. * + *

Holders of the permission + * {@link 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 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 * location sharing. * + *

Holders of the permission + * {@link 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. @@ -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 * on the entire device. * + *

Holders of the permission + * {@link 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. @@ -476,6 +517,10 @@ public class UserManager { * *

The default value is false. * + *

Holders of the permission + * {@link 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 @@ -490,6 +535,10 @@ public class UserManager { * *

The default value is false. * + *

Holders of the permission + * {@link 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 @@ -504,6 +553,10 @@ public class UserManager { * *

The default value is false. * + *

Holders of the permission + * {@link 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 @@ -519,6 +572,10 @@ public class UserManager { * Unknown sources exclude adb and special apps such as trusted app stores. * The default value is false. * + *

Holders of the permission + * {@link 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 * @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 * profiles will be affected. * + *

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 false. * *

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 * profile, it disallows the primary user from configuring bluetooth. * + *

Holders of the permission + * {@link 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. @@ -581,6 +646,10 @@ public class UserManager { * profile, it disables the primary user from using bluetooth and configuring bluetooth * in Settings. * + *

Holders of the permission + * {@link 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. @@ -599,6 +668,10 @@ public class UserManager { * 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 + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_BLUETOOTH} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Default is true for managed profiles and false otherwise. * *

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 * is always associated with the primary user. * + *

Holders of the permission + * {@link 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. @@ -640,6 +717,10 @@ public class UserManager { * Specifies if a user is disallowed from configuring user * credentials. The default value is false. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -654,6 +735,10 @@ public class UserManager { * This restriction has no effect on managed profiles. * The default value is false. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -692,6 +777,10 @@ public class UserManager { * 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 + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_DEBUGGING_FEATURES} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

The default value is false. * *

Key for user restrictions. @@ -712,6 +801,10 @@ public class UserManager { *

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. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_VPN} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @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 * on or off. * + *

Holders of the permission + * {@link 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 {@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 * timezone in Settings. * + *

Holders of the permission + * {@link 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. @@ -776,6 +877,10 @@ public class UserManager { * 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 + * {@link 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, @@ -796,6 +901,10 @@ public class UserManager { *

This restriction has no effect on secondary users and managed profiles since only the * primary user can reset the network settings of the device. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -811,6 +920,10 @@ public class UserManager { *

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

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_FACTORY_RESET} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -827,6 +940,10 @@ public class UserManager { *

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. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -858,6 +975,10 @@ public class UserManager { *

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

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILES} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @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 * Android versions, this restriction affects only the profile that sets it. * + *

Holders of the permission + * {@link 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 * @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 * the parent profile, it disables the primary user from configuring cell broadcasts. * + *

Holders of the permission + * {@link 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 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 * the parent profile, it disables the primary user from configuring mobile networks. * + *

Holders of the permission + * {@link 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 secondary users and managed profiles since only the @@ -949,6 +1082,10 @@ public class UserManager { * {@link DevicePolicyManager#addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName)} * to add a default intent handler for a given intent filter. * + *

Holders of the permission + * {@link 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 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 * the parent profile, it disables the primary user from mounting physical external media. * + *

Holders of the permission + * {@link 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. @@ -986,6 +1127,10 @@ public class UserManager { * organization-owned managed profile on the parent profile, it will disallow the primary user * from adjusting the microphone volume. * + *

Holders of the permission + * {@link 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. @@ -1004,6 +1149,10 @@ public class UserManager { *

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

Holders of the permission + * {@link 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 @@ -1022,6 +1171,10 @@ public class UserManager { * 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 + * {@link 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. @@ -1041,6 +1194,10 @@ public class UserManager { * 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 + * {@link 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. @@ -1056,6 +1213,10 @@ public class UserManager { * 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 + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_FUN} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -1073,6 +1234,10 @@ public class UserManager { *

This can only be set by device owners and profile owners on the primary user. * The default value is false. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WINDOWS} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @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 * calling user. This user restriction has no effect on managed profiles. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_SYSTEM_DIALOGS} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -1108,6 +1277,10 @@ public class UserManager { * optical character recognition (OCR), we strongly recommend combining this user restriction * with {@link DevicePolicyManager#setScreenCaptureDisabled(ComponentName, boolean)}. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @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. * The default value is false. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_NEARBY_COMMUNICATION} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -1145,6 +1322,10 @@ public class UserManager { * are able to set wallpaper regardless of this restriction. * The default value is false. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_WALLPAPER} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @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 * boot mode. * + *

Holders of the permission + * {@link 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. @@ -1191,6 +1376,10 @@ public class UserManager { * *

This restriction can be set by device owners and profile owners. * + *

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#clearUserRestriction(ComponentName, String) * @see #getUserRestrictions() @@ -1208,6 +1397,10 @@ public class UserManager { * profile owner of an organization-owned managed profile on the parent profile, it disables * the primary user from using camera. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_CAMERA} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

The default value is false. * * @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. * + *

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#clearUserRestriction(ComponentName, String) * @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 * the parent profile, it disables the primary user from using cellular data when roaming. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

The default value is false. * * @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 * affected. The default value is false. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -1285,6 +1490,11 @@ public class UserManager { * *

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 + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

Key for user restrictions. *

Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -1302,7 +1512,12 @@ public class UserManager { * {@link android.content.Intent#ACTION_VIEW}, * category {@link android.content.Intent#CATEGORY_BROWSABLE}, scheme http or https, and which * define a host can handle intents from the managed profile. - * The default value is false. + * + *

Holders of the permission + * {@link 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 @@ -1319,6 +1534,10 @@ public class UserManager { *

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 + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_AUTOFILL} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

The default value is false. * * @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 * captured for artificial intelligence purposes. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_SCREEN_CONTENT} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

The default value is false. * * @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 * suggestions for selections based on the contents of their screen. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_SCREEN_CONTENT} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

The default value is false. * * @see DevicePolicyManager#addUserRestriction(ComponentName, String) @@ -1369,6 +1596,10 @@ public class UserManager { * {@link DevicePolicyManager#switchUser(ComponentName, UserHandle)} when this restriction is * set. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

The default value is false. * * @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 * owner, it does not have any effect. *

- * The default value is false. + * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * + *

The default value is false. * * @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#clearUserRestriction(ComponentName, String) @@ -1404,6 +1640,10 @@ public class UserManager { * * This restriction can be set by device or profile owner. * + *

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}. * * @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 * owners, it applies globally. * + *

Holders of the permission + * {@link 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. @@ -1525,6 +1769,10 @@ public class UserManager { * 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. * + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_MOBILE_NETWORK} + * can set this restriction using the DevicePolicyManager APIs mentioned below. + * *

The default value is false. * * @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 * 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. * - *

- * 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. + *

Holders of the permission + * {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_NEARBY_COMMUNICATION} + * can set this restriction using the DevicePolicyManager APIs mentioned below. * *

Default is false. *