Loading core/java/android/os/UserManager.java +28 −13 Original line number Diff line number Diff line Loading @@ -290,10 +290,12 @@ public class UserManager { /** * Specifies if airplane mode is disallowed on the device. * * <p> This restriction can only be set by the device owner and the profile owner on the * primary user and it applies globally - i.e. it disables airplane mode on the entire device. * <p>The default value is <code>false</code>. * <p> * This restriction can only be set by the device owner, the profile owner on the primary user * or the profile owner of an organization-owned managed profile on the parent profile, and it * applies globally - i.e. it disables airplane mode on the entire device. * <p> * The default value is <code>false</code>. * * <p>Key for user restrictions. * <p>Type: Boolean Loading Loading @@ -729,9 +731,12 @@ public class UserManager { public static final String DISALLOW_APPS_CONTROL = "no_control_apps"; /** * Specifies if a user is disallowed from mounting * physical external media. This can only be set by device owners and profile owners on the * primary user. The default value is <code>false</code>. * Specifies if a user is disallowed from mounting physical external media. * <p> * This restriction can only be set by the device owner, the profile owner on the primary user * or the profile owner of an organization-owned managed profile on the parent profile. * <p> * The default value is <code>false</code>. * * <p>Key for user restrictions. * <p>Type: Boolean Loading @@ -743,10 +748,15 @@ public class UserManager { /** * Specifies if a user is disallowed from adjusting microphone volume. If set, the microphone * will be muted. This can be set by device owners and profile owners. The default value is * <code>false</code>. * will be muted. * <p> * The default value is <code>false</code>. * <p> * Device owner and profile owner can set this restriction, although the restriction has no * effect in a managed profile. When it is set by the profile owner of an organization-owned * managed profile on the parent profile, it will disallow the personal user from adjusting the * microphone volume. * * <p>This restriction has no effect on managed profiles. * <p>Key for user restrictions. * <p>Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) Loading @@ -773,10 +783,15 @@ public class UserManager { public static final String DISALLOW_ADJUST_VOLUME = "no_adjust_volume"; /** * Specifies that the user is not allowed to make outgoing * phone calls. Emergency calls are still permitted. * Specifies that the user is not allowed to make outgoing phone calls. Emergency calls are * still permitted. * <p> * The default value is <code>false</code>. * <p>This restriction has no effect on managed profiles. * <p> * Device owner and profile owner can set this restriction, although the restriction has no * effect in a managed profile. When it is set by the profile owner of an organization-owned * managed profile on the parent profile, it will disallow the personal user from making * outgoing phone calls. * * <p>Key for user restrictions. * <p>Type: Boolean Loading services/core/java/com/android/server/pm/UserRestrictionsUtils.java +5 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,11 @@ public class UserRestrictionsUtils { UserManager.DISALLOW_SAFE_BOOT, UserManager.DISALLOW_SHARE_LOCATION, UserManager.DISALLOW_SMS, UserManager.DISALLOW_USB_FILE_TRANSFER UserManager.DISALLOW_USB_FILE_TRANSFER, UserManager.DISALLOW_AIRPLANE_MODE, UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA, UserManager.DISALLOW_OUTGOING_CALLS, UserManager.DISALLOW_UNMUTE_MICROPHONE ); /** Loading services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -1986,7 +1986,11 @@ public class DevicePolicyManagerTest extends DpmTestBase { UserManager.DISALLOW_SAFE_BOOT, UserManager.DISALLOW_SHARE_LOCATION, UserManager.DISALLOW_SMS, UserManager.DISALLOW_USB_FILE_TRANSFER UserManager.DISALLOW_USB_FILE_TRANSFER, UserManager.DISALLOW_AIRPLANE_MODE, UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA, UserManager.DISALLOW_OUTGOING_CALLS, UserManager.DISALLOW_UNMUTE_MICROPHONE ); public void testSetUserRestriction_asPoOfOrgOwnedDevice() throws Exception { Loading Loading
core/java/android/os/UserManager.java +28 −13 Original line number Diff line number Diff line Loading @@ -290,10 +290,12 @@ public class UserManager { /** * Specifies if airplane mode is disallowed on the device. * * <p> This restriction can only be set by the device owner and the profile owner on the * primary user and it applies globally - i.e. it disables airplane mode on the entire device. * <p>The default value is <code>false</code>. * <p> * This restriction can only be set by the device owner, the profile owner on the primary user * or the profile owner of an organization-owned managed profile on the parent profile, and it * applies globally - i.e. it disables airplane mode on the entire device. * <p> * The default value is <code>false</code>. * * <p>Key for user restrictions. * <p>Type: Boolean Loading Loading @@ -729,9 +731,12 @@ public class UserManager { public static final String DISALLOW_APPS_CONTROL = "no_control_apps"; /** * Specifies if a user is disallowed from mounting * physical external media. This can only be set by device owners and profile owners on the * primary user. The default value is <code>false</code>. * Specifies if a user is disallowed from mounting physical external media. * <p> * This restriction can only be set by the device owner, the profile owner on the primary user * or the profile owner of an organization-owned managed profile on the parent profile. * <p> * The default value is <code>false</code>. * * <p>Key for user restrictions. * <p>Type: Boolean Loading @@ -743,10 +748,15 @@ public class UserManager { /** * Specifies if a user is disallowed from adjusting microphone volume. If set, the microphone * will be muted. This can be set by device owners and profile owners. The default value is * <code>false</code>. * will be muted. * <p> * The default value is <code>false</code>. * <p> * Device owner and profile owner can set this restriction, although the restriction has no * effect in a managed profile. When it is set by the profile owner of an organization-owned * managed profile on the parent profile, it will disallow the personal user from adjusting the * microphone volume. * * <p>This restriction has no effect on managed profiles. * <p>Key for user restrictions. * <p>Type: Boolean * @see DevicePolicyManager#addUserRestriction(ComponentName, String) Loading @@ -773,10 +783,15 @@ public class UserManager { public static final String DISALLOW_ADJUST_VOLUME = "no_adjust_volume"; /** * Specifies that the user is not allowed to make outgoing * phone calls. Emergency calls are still permitted. * Specifies that the user is not allowed to make outgoing phone calls. Emergency calls are * still permitted. * <p> * The default value is <code>false</code>. * <p>This restriction has no effect on managed profiles. * <p> * Device owner and profile owner can set this restriction, although the restriction has no * effect in a managed profile. When it is set by the profile owner of an organization-owned * managed profile on the parent profile, it will disallow the personal user from making * outgoing phone calls. * * <p>Key for user restrictions. * <p>Type: Boolean Loading
services/core/java/com/android/server/pm/UserRestrictionsUtils.java +5 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,11 @@ public class UserRestrictionsUtils { UserManager.DISALLOW_SAFE_BOOT, UserManager.DISALLOW_SHARE_LOCATION, UserManager.DISALLOW_SMS, UserManager.DISALLOW_USB_FILE_TRANSFER UserManager.DISALLOW_USB_FILE_TRANSFER, UserManager.DISALLOW_AIRPLANE_MODE, UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA, UserManager.DISALLOW_OUTGOING_CALLS, UserManager.DISALLOW_UNMUTE_MICROPHONE ); /** Loading
services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -1986,7 +1986,11 @@ public class DevicePolicyManagerTest extends DpmTestBase { UserManager.DISALLOW_SAFE_BOOT, UserManager.DISALLOW_SHARE_LOCATION, UserManager.DISALLOW_SMS, UserManager.DISALLOW_USB_FILE_TRANSFER UserManager.DISALLOW_USB_FILE_TRANSFER, UserManager.DISALLOW_AIRPLANE_MODE, UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA, UserManager.DISALLOW_OUTGOING_CALLS, UserManager.DISALLOW_UNMUTE_MICROPHONE ); public void testSetUserRestriction_asPoOfOrgOwnedDevice() throws Exception { Loading