Home
last modified time | relevance | path

Searched refs:newRestrictions (Results 1 – 15 of 15) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserRestrictionsUtilsTest.java20 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 …]
DRestrictionsSetTest.java20 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/
DDpmTestUtils.java62 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()
DDevicePolicyManagerServiceMigrationTest.java112 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 …]
DMockUtils.java110 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/
DOemLockService.java93 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/
DIUserRestrictionsListener.aidl25 … void onUserRestrictionsChanged(int userId, in Bundle newRestrictions, in Bundle prevRestrictions); in onUserRestrictionsChanged() argument
/frameworks/base/services/core/java/com/android/server/pm/
DUserRestrictionsUtils.java493 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()
DUserManagerService.java2072 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/
DUserManagerInternal.java56 void onUserRestrictionsChanged(int userId, Bundle newRestrictions, Bundle prevRestrictions); in onUserRestrictionsChanged() argument
/frameworks/base/services/core/java/com/android/server/infra/
DAbstractMasterSystemService.java273 umi.addUserRestrictionsListener((userId, newRestrictions, prevRestrictions) -> { in AbstractMasterSystemService() argument
275 newRestrictions.getBoolean(disallowProperty, false); in AbstractMasterSystemService()
/frameworks/base/services/core/java/com/android/server/
DBluetoothManagerService.java255 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/
DTetheringTest.java1145 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/
DSettingsProvider.java955 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/
DAudioService.java6670 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()