/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserRestrictionsUtilsTest.java | 20 import static com.android.server.devicepolicy.DpmTestUtils.newRestrictions; 54 assertFalse(UserRestrictionsUtils.isEmpty(newRestrictions("a"))); in testIsEmpty() 69 Bundle a = newRestrictions("a", "d"); in testMerge() 70 Bundle b = newRestrictions("b", "d", "e"); in testMerge() 74 assertRestrictions(newRestrictions("a", "b", "d", "e"), a); in testMerge() 78 assertRestrictions(newRestrictions("a", "b", "d", "e"), a); in testMerge() 125 localRestrictions.put(0, newRestrictions(0, UserManager.DISALLOW_ADJUST_VOLUME)); in testMoveRestriction() 128 localRestrictions.put(1, newRestrictions(1, UserManager.ENSURE_VERIFY_APPS)); in testMoveRestriction() 130 newRestrictions(UserManager.DISALLOW_ADD_USER)); in testMoveRestriction() 132 localRestrictions.put(2, newRestrictions(2, in testMoveRestriction() [all …]
|
D | RestrictionsSetTest.java | 20 import static com.android.server.devicepolicy.DpmTestUtils.newRestrictions; 48 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_addRestrictions() 57 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_removeRestrictions() 67 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_noChange() 79 newRestrictions(restriction)); in testMoveRestriction_containsRestriction() 85 assertRestrictions(newRestrictions(restriction), in testMoveRestriction_containsRestriction() 94 newRestrictions(UserManager.ENSURE_VERIFY_APPS)); in testMoveRestriction_doesNotContainRestriction() 99 assertRestrictions(newRestrictions(UserManager.ENSURE_VERIFY_APPS), in testMoveRestriction_doesNotContainRestriction() 112 newRestrictions(UserManager.ENSURE_VERIFY_APPS, in testIsEmpty_hasRestrictions() 126 newRestrictions(UserManager.ENSURE_VERIFY_APPS, in testMergeAll_hasRestrictions() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | DpmTestUtils.java | 62 public static RestrictionsSet newRestrictions(int userId, String... restrictions) { in newRestrictions() method in DpmTestUtils 63 Bundle localRestrictionsBundle = newRestrictions(restrictions); in newRestrictions() 69 public static Bundle newRestrictions(String... restrictions) { in newRestrictions() method in DpmTestUtils 174 final Bundle a = newRestrictions(); in testAssertRestrictions() 175 final Bundle b = newRestrictions("a"); in testAssertRestrictions() 176 final Bundle c = newRestrictions("a"); in testAssertRestrictions() 177 final Bundle d = newRestrictions("b", "c"); in testAssertRestrictions() 178 final Bundle e = newRestrictions("b", "c"); in testAssertRestrictions()
|
D | DevicePolicyManagerServiceMigrationTest.java | 112 eq(USER_SYSTEM))).thenReturn(DpmTestUtils.newRestrictions( in testMigration() 117 eq(10))).thenReturn(DpmTestUtils.newRestrictions( in testMigration() 126 eq(11))).thenReturn(DpmTestUtils.newRestrictions( in testMigration() 179 DpmTestUtils.newRestrictions( in testMigration() 185 DpmTestUtils.newRestrictions( in testMigration() 195 DpmTestUtils.newRestrictions( in testMigration() 206 DpmTestUtils.newRestrictions( in testMigration() 212 DpmTestUtils.newRestrictions( in testMigration() 218 DpmTestUtils.newRestrictions( in testMigration() 240 eq(USER_SYSTEM))).thenReturn(DpmTestUtils.newRestrictions( in testMigration2_profileOwnerOnUser0() [all …]
|
D | MockUtils.java | 110 final Bundle expected = DpmTestUtils.newRestrictions( in checkUserRestrictions() 130 final RestrictionsSet expected = DpmTestUtils.newRestrictions(userId, in checkUserRestrictions()
|
/frameworks/base/services/core/java/com/android/server/oemlock/ |
D | OemLockService.java | 93 public void onUserRestrictionsChanged(int userId, Bundle newRestrictions, 96 if (UserRestrictionsUtils.restrictionsChanged(prevRestrictions, newRestrictions, 99 !newRestrictions.getBoolean(UserManager.DISALLOW_FACTORY_RESET);
|
/frameworks/base/core/java/android/os/ |
D | IUserRestrictionsListener.aidl | 25 … void onUserRestrictionsChanged(int userId, in Bundle newRestrictions, in Bundle prevRestrictions); in onUserRestrictionsChanged() argument
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | UserRestrictionsUtils.java | 493 Bundle newRestrictions, Bundle prevRestrictions) { in applyUserRestrictions() argument 495 final boolean newValue = newRestrictions.getBoolean(key); in applyUserRestrictions() 863 public static boolean restrictionsChanged(Bundle oldRestrictions, Bundle newRestrictions, in restrictionsChanged() argument 866 return areEqual(oldRestrictions, newRestrictions); in restrictionsChanged() 870 newRestrictions.getBoolean(restriction, false)) { in restrictionsChanged()
|
D | UserManagerService.java | 2072 final Bundle newRestrictions = UserRestrictionsUtils.clone( in setUserRestriction() local 2074 newRestrictions.putBoolean(key, value); in setUserRestriction() 2076 updateUserRestrictionsInternalLR(newRestrictions, userId); in setUserRestriction() 2137 Bundle newRestrictions, Bundle prevRestrictions) { in propagateUserRestrictionsLR() argument 2142 if (UserRestrictionsUtils.areEqual(newRestrictions, prevRestrictions)) { in propagateUserRestrictionsLR() 2146 final Bundle newRestrictionsFinal = new Bundle(newRestrictions); in propagateUserRestrictionsLR()
|
/frameworks/base/services/core/java/android/os/ |
D | UserManagerInternal.java | 56 void onUserRestrictionsChanged(int userId, Bundle newRestrictions, Bundle prevRestrictions); in onUserRestrictionsChanged() argument
|
/frameworks/base/services/core/java/com/android/server/infra/ |
D | AbstractMasterSystemService.java | 273 umi.addUserRestrictionsListener((userId, newRestrictions, prevRestrictions) -> { in AbstractMasterSystemService() argument 275 newRestrictions.getBoolean(disallowProperty, false); in AbstractMasterSystemService()
|
/frameworks/base/services/core/java/com/android/server/ |
D | BluetoothManagerService.java | 255 public void onUserRestrictionsChanged(int userId, Bundle newRestrictions, 258 if (UserRestrictionsUtils.restrictionsChanged(prevRestrictions, newRestrictions, 261 newRestrictions.getBoolean(UserManager.DISALLOW_BLUETOOTH_SHARING)); 267 newRestrictions, UserManager.DISALLOW_BLUETOOTH)) { 268 if (userId == USER_SYSTEM && newRestrictions.getBoolean( 274 updateOppLauncherComponentState(userId, newRestrictions.getBoolean(
|
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
D | TetheringTest.java | 1145 final Bundle newRestrictions = new Bundle(); in runUserRestrictionsChange() local 1146 newRestrictions.putBoolean(UserManager.DISALLOW_CONFIG_TETHERING, nextDisallow); in runUserRestrictionsChange() 1149 when(mUserManager.getUserRestrictions()).thenReturn(newRestrictions); in runUserRestrictionsChange()
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | SettingsProvider.java | 955 Bundle newRestrictions, Bundle prevRestrictions) { in startWatchingUserRestrictionChanges() 957 getRestrictionDiff(prevRestrictions, newRestrictions); in startWatchingUserRestrictionChanges() 1048 private static Set<String> getRestrictionDiff(Bundle prevRestrictions, Bundle newRestrictions) { in getRestrictionDiff() argument 1051 restrictionNames.addAll(newRestrictions.keySet()); in getRestrictionDiff() 1054 if (prevRestrictions.getBoolean(restrictionName) != newRestrictions.getBoolean( in getRestrictionDiff()
|
/frameworks/base/services/core/java/com/android/server/audio/ |
D | AudioService.java | 6670 public void onUserRestrictionsChanged(int userId, Bundle newRestrictions, in onUserRestrictionsChanged() argument 6677 newRestrictions.getBoolean(UserManager.DISALLOW_UNMUTE_MICROPHONE); in onUserRestrictionsChanged() 6690 newRestrictions.getBoolean(UserManager.DISALLOW_ADJUST_VOLUME) in onUserRestrictionsChanged() 6691 || newRestrictions.getBoolean(UserManager.DISALLOW_UNMUTE_DEVICE); in onUserRestrictionsChanged()
|