Loading core/java/android/os/UserManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ public class UserManager { * Specifies if managed profiles of this user can be removed, other than by its profile owner. * The default value is <code>false</code>. * <p> * This restriction can only be set by device owners. * This restriction has no effect on managed profiles. * * <p>Key for user restrictions. * <p>Type: Boolean Loading Loading @@ -353,8 +353,8 @@ public class UserManager { /** * Specifies if a user is disallowed from adding managed profiles. * <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> * <p>This restriction can only be set by device owners. * For users with a device owner set, the default is <code>true</code>. * <p>This restriction has no effect on managed profiles. * * <p>Key for user restrictions. * <p>Type: Boolean Loading services/core/java/com/android/server/pm/UserRestrictionsUtils.java +1 −2 Original line number Diff line number Diff line Loading @@ -126,8 +126,6 @@ public class UserRestrictionsUtils { UserManager.DISALLOW_NETWORK_RESET, UserManager.DISALLOW_FACTORY_RESET, UserManager.DISALLOW_ADD_USER, UserManager.DISALLOW_ADD_MANAGED_PROFILE, UserManager.DISALLOW_REMOVE_MANAGED_PROFILE, UserManager.DISALLOW_CONFIG_CELL_BROADCASTS, UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS, UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA, Loading Loading @@ -261,6 +259,7 @@ public class UserRestrictionsUtils { /** * Returns the user restrictions that default to {@code true} for device owners. * These user restrictions are local, though. ie only for the device owner's user id. */ public static @NonNull Set<String> getDefaultEnabledForDeviceOwner() { return DEFAULT_ENABLED_FOR_DEVICE_OWNERS; Loading services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +6 −6 Original line number Diff line number Diff line Loading @@ -1208,8 +1208,8 @@ public class DevicePolicyManagerTest extends DpmTestBase { ); verify(mContext.userManagerInternal).setDevicePolicyUserRestrictions( eq(UserHandle.USER_SYSTEM), MockUtils.checkUserRestrictions(), MockUtils.checkUserRestrictions(defaultRestrictions) MockUtils.checkUserRestrictions(defaultRestrictions), MockUtils.checkUserRestrictions() ); reset(mContext.userManagerInternal); Loading Loading @@ -1479,8 +1479,8 @@ public class DevicePolicyManagerTest extends DpmTestBase { ); verify(mContext.userManagerInternal).setDevicePolicyUserRestrictions( eq(UserHandle.USER_SYSTEM), MockUtils.checkUserRestrictions(), MockUtils.checkUserRestrictions(defaultRestrictions) MockUtils.checkUserRestrictions(defaultRestrictions), MockUtils.checkUserRestrictions() ); reset(mContext.userManagerInternal); Loading Loading @@ -1521,8 +1521,8 @@ public class DevicePolicyManagerTest extends DpmTestBase { ); verify(mContext.userManagerInternal, atLeast(1)).setDevicePolicyUserRestrictions( eq(UserHandle.USER_SYSTEM), MockUtils.checkUserRestrictions(), MockUtils.checkUserRestrictions(newDefaultEnabledRestriction) MockUtils.checkUserRestrictions(newDefaultEnabledRestriction), MockUtils.checkUserRestrictions() ); reset(mContext.userManagerInternal); Loading Loading
core/java/android/os/UserManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ public class UserManager { * Specifies if managed profiles of this user can be removed, other than by its profile owner. * The default value is <code>false</code>. * <p> * This restriction can only be set by device owners. * This restriction has no effect on managed profiles. * * <p>Key for user restrictions. * <p>Type: Boolean Loading Loading @@ -353,8 +353,8 @@ public class UserManager { /** * Specifies if a user is disallowed from adding managed profiles. * <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> * <p>This restriction can only be set by device owners. * For users with a device owner set, the default is <code>true</code>. * <p>This restriction has no effect on managed profiles. * * <p>Key for user restrictions. * <p>Type: Boolean Loading
services/core/java/com/android/server/pm/UserRestrictionsUtils.java +1 −2 Original line number Diff line number Diff line Loading @@ -126,8 +126,6 @@ public class UserRestrictionsUtils { UserManager.DISALLOW_NETWORK_RESET, UserManager.DISALLOW_FACTORY_RESET, UserManager.DISALLOW_ADD_USER, UserManager.DISALLOW_ADD_MANAGED_PROFILE, UserManager.DISALLOW_REMOVE_MANAGED_PROFILE, UserManager.DISALLOW_CONFIG_CELL_BROADCASTS, UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS, UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA, Loading Loading @@ -261,6 +259,7 @@ public class UserRestrictionsUtils { /** * Returns the user restrictions that default to {@code true} for device owners. * These user restrictions are local, though. ie only for the device owner's user id. */ public static @NonNull Set<String> getDefaultEnabledForDeviceOwner() { return DEFAULT_ENABLED_FOR_DEVICE_OWNERS; Loading
services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +6 −6 Original line number Diff line number Diff line Loading @@ -1208,8 +1208,8 @@ public class DevicePolicyManagerTest extends DpmTestBase { ); verify(mContext.userManagerInternal).setDevicePolicyUserRestrictions( eq(UserHandle.USER_SYSTEM), MockUtils.checkUserRestrictions(), MockUtils.checkUserRestrictions(defaultRestrictions) MockUtils.checkUserRestrictions(defaultRestrictions), MockUtils.checkUserRestrictions() ); reset(mContext.userManagerInternal); Loading Loading @@ -1479,8 +1479,8 @@ public class DevicePolicyManagerTest extends DpmTestBase { ); verify(mContext.userManagerInternal).setDevicePolicyUserRestrictions( eq(UserHandle.USER_SYSTEM), MockUtils.checkUserRestrictions(), MockUtils.checkUserRestrictions(defaultRestrictions) MockUtils.checkUserRestrictions(defaultRestrictions), MockUtils.checkUserRestrictions() ); reset(mContext.userManagerInternal); Loading Loading @@ -1521,8 +1521,8 @@ public class DevicePolicyManagerTest extends DpmTestBase { ); verify(mContext.userManagerInternal, atLeast(1)).setDevicePolicyUserRestrictions( eq(UserHandle.USER_SYSTEM), MockUtils.checkUserRestrictions(), MockUtils.checkUserRestrictions(newDefaultEnabledRestriction) MockUtils.checkUserRestrictions(newDefaultEnabledRestriction), MockUtils.checkUserRestrictions() ); reset(mContext.userManagerInternal); Loading