Home
last modified time | relevance | path

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

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserRestrictionsUtilsTest.java20 import static com.android.server.devicepolicy.DpmTestUtils.newRestrictions;
55 Bundle a = newRestrictions("a", "d"); in testMerge()
56 Bundle b = newRestrictions("b", "d", "e"); in testMerge()
60 assertRestrictions(newRestrictions("a", "b", "d", "e"), a); in testMerge()
64 assertRestrictions(newRestrictions("a", "b", "d", "e"), a); in testMerge()
111 localRestrictions.put(0, newRestrictions(0, UserManager.DISALLOW_ADJUST_VOLUME)); in testMoveRestriction()
114 localRestrictions.put(1, newRestrictions(1, UserManager.ENSURE_VERIFY_APPS)); in testMoveRestriction()
116 newRestrictions(UserManager.DISALLOW_ADD_USER)); in testMoveRestriction()
118 localRestrictions.put(2, newRestrictions(2, in testMoveRestriction()
126 newRestrictions(0, UserManager.DISALLOW_ADJUST_VOLUME), in testMoveRestriction()
[all …]
/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/
DRestrictionsSetTest.java20 import static com.android.server.devicepolicy.DpmTestUtils.newRestrictions;
50 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_addRestrictions()
59 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_removeRestrictions()
69 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_noChange()
81 newRestrictions(restriction)); in testMoveRestriction_containsRestriction()
87 assertRestrictions(newRestrictions(restriction), in testMoveRestriction_containsRestriction()
96 newRestrictions(UserManager.ENSURE_VERIFY_APPS)); in testMoveRestriction_doesNotContainRestriction()
101 assertRestrictions(newRestrictions(UserManager.ENSURE_VERIFY_APPS), in testMoveRestriction_doesNotContainRestriction()
114 newRestrictions(UserManager.ENSURE_VERIFY_APPS, in testIsEmpty_hasRestrictions()
128 newRestrictions(UserManager.ENSURE_VERIFY_APPS, in testMergeAll_hasRestrictions()
[all …]
DBundleUtilsTest.java20 import static com.android.server.devicepolicy.DpmTestUtils.newRestrictions;
48 assertThat(BundleUtils.isEmpty(newRestrictions("a"))).isFalse(); in testIsEmpty()
/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()
DMockUtils.java110 final Bundle expected = DpmTestUtils.newRestrictions( in checkUserRestrictions()
138 final RestrictionsSet expected = DpmTestUtils.newRestrictions(userId, in checkUserRestrictions()
DDevicePolicyManagerServiceMigrationTest.java133 DpmTestUtils.newRestrictions( in testMigration_managedProfileOwner()
DDevicePolicyManagerTest.java2005 DpmTestUtils.newRestrictions( in testSetUserRestriction_asDo()
2010 DpmTestUtils.newRestrictions( in testSetUserRestriction_asDo()
2025 DpmTestUtils.newRestrictions(UserManager.DISALLOW_OUTGOING_CALLS), in testSetUserRestriction_asDo()
2029 DpmTestUtils.newRestrictions(UserManager.DISALLOW_OUTGOING_CALLS), in testSetUserRestriction_asDo()
2139 DpmTestUtils.newRestrictions(), in testSetUserRestriction_asPo()
2161 DpmTestUtils.newRestrictions( in testSetUserRestriction_asPo()
2169 DpmTestUtils.newRestrictions( in testSetUserRestriction_asPo()
2185 DpmTestUtils.newRestrictions( in testSetUserRestriction_asPo()
2192 DpmTestUtils.newRestrictions( in testSetUserRestriction_asPo()
2205 DpmTestUtils.newRestrictions(), in testSetUserRestriction_asPo()
[all …]
/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.java539 Bundle newRestrictions, Bundle prevRestrictions) { in applyUserRestrictions() argument
541 final boolean newValue = newRestrictions.getBoolean(key); in applyUserRestrictions()
867 public static boolean restrictionsChanged(Bundle oldRestrictions, Bundle newRestrictions, in restrictionsChanged() argument
870 return areEqual(oldRestrictions, newRestrictions); in restrictionsChanged()
874 newRestrictions.getBoolean(restriction, false)) { in restrictionsChanged()
DUserManagerInternal.java56 void onUserRestrictionsChanged(int userId, Bundle newRestrictions, Bundle prevRestrictions); in onUserRestrictionsChanged() argument
DUserManagerService.java2413 final Bundle newRestrictions = BundleUtils.clone( in setUserRestriction() local
2415 newRestrictions.putBoolean(key, value); in setUserRestriction()
2417 updateUserRestrictionsInternalLR(newRestrictions, userId); in setUserRestriction()
2478 Bundle newRestrictions, Bundle prevRestrictions) { in propagateUserRestrictionsLR() argument
2483 if (UserRestrictionsUtils.areEqual(newRestrictions, prevRestrictions)) { in propagateUserRestrictionsLR()
2487 final Bundle newRestrictionsFinal = new Bundle(newRestrictions); in propagateUserRestrictionsLR()
3353 final Bundle newRestrictions = BundleUtils.clone( in upgradeProfileToTypeLU() local
3355 UserRestrictionsUtils.merge(newRestrictions, in upgradeProfileToTypeLU()
3357 updateUserRestrictionsInternalLR(newRestrictions, userInfo.id); in upgradeProfileToTypeLU()
3360 + " restrictions to " + newRestrictions); in upgradeProfileToTypeLU()
/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/sensorprivacy/
DSensorPrivacyService.java313 public void onUserRestrictionsChanged(int userId, Bundle newRestrictions, in onUserRestrictionsChanged() argument
317 && newRestrictions.getBoolean(UserManager.DISALLOW_CAMERA_TOGGLE)) { in onUserRestrictionsChanged()
321 && newRestrictions.getBoolean(UserManager.DISALLOW_MICROPHONE_TOGGLE)) { in onUserRestrictionsChanged()
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsProvider.java1031 Bundle newRestrictions, Bundle prevRestrictions) { in startWatchingUserRestrictionChanges()
1033 getRestrictionDiff(prevRestrictions, newRestrictions); in startWatchingUserRestrictionChanges()
1119 private static Set<String> getRestrictionDiff(Bundle prevRestrictions, Bundle newRestrictions) { in getRestrictionDiff() argument
1122 restrictionNames.addAll(newRestrictions.keySet()); in getRestrictionDiff()
1125 if (prevRestrictions.getBoolean(restrictionName) != newRestrictions.getBoolean( in getRestrictionDiff()
/frameworks/base/services/core/java/com/android/server/audio/
DAudioService.java9323 public void onUserRestrictionsChanged(int userId, Bundle newRestrictions, in onUserRestrictionsChanged() argument
9330 newRestrictions.getBoolean(UserManager.DISALLOW_UNMUTE_MICROPHONE); in onUserRestrictionsChanged()
9343 newRestrictions.getBoolean(UserManager.DISALLOW_ADJUST_VOLUME) in onUserRestrictionsChanged()
9344 || newRestrictions.getBoolean(UserManager.DISALLOW_UNMUTE_DEVICE); in onUserRestrictionsChanged()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DDevicePolicyManagerService.java1067 public void onUserRestrictionsChanged(int userId, Bundle newRestrictions, in onUserRestrictionsChanged() argument
1069 resetCrossProfileIntentFiltersIfNeeded(userId, newRestrictions, prevRestrictions); in onUserRestrictionsChanged()
1070 resetUserVpnIfNeeded(userId, newRestrictions, prevRestrictions); in onUserRestrictionsChanged()
1074 int userId, Bundle newRestrictions, Bundle prevRestrictions) { in resetUserVpnIfNeeded() argument
1077 && newRestrictions.getBoolean(UserManager.DISALLOW_CONFIG_VPN); in resetUserVpnIfNeeded()
1084 int userId, Bundle newRestrictions, Bundle prevRestrictions) { in resetCrossProfileIntentFiltersIfNeeded() argument
1085 if (UserRestrictionsUtils.restrictionsChanged(prevRestrictions, newRestrictions, in resetCrossProfileIntentFiltersIfNeeded()