/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/devicepolicy/ |
D | UserRestrictionsContext.java | 51 public UserRestrictionsContext set(String restriction) { in set() argument 52 mToSetUserRestrictions.add(restriction); in set() 60 public UserRestrictionsContext unset(String restriction) { in unset() argument 61 mToUnsetUserRestrictions.add(restriction); in unset() 67 for (String restriction : mToSetUserRestrictions) { in apply() 68 if (mSetUserRestrictions.contains(restriction) in apply() 69 || TestApis.devicePolicy().userRestrictions(mUser).isSet(restriction)) { in apply() 73 setNoCheck(restriction); in apply() 75 for (String restriction : mToUnsetUserRestrictions) { in apply() 76 if (mUnsetUserRestrictions.contains(restriction) in apply() [all …]
|
D | UserRestrictions.java | 57 public boolean isSet(String restriction) { in isSet() argument 59 return sUserManager.hasUserRestrictionForUser(restriction, mUser.userHandle()); in isSet() 67 public void set(String restriction, boolean set) throws AdbException { in set() argument 70 .addOperand(restriction) in set()
|
D | DevicePolicy.kt | 809 fun createAdminSupportIntent(restriction: String): Intent? = in <lambda>() 810 devicePolicyManager.createAdminSupportIntent(restriction) in <lambda>()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/userrestrictions/ |
D | BaseUserRestrictionsTest.java | 121 protected void assertLayeredRestriction(String restriction, boolean expected) { in assertLayeredRestriction() argument 122 assertEquals("Restriction " + restriction + ": expected=" + expected, in assertLayeredRestriction() 123 expected, mUserManager.hasUserRestriction(restriction)); in assertLayeredRestriction() 126 protected void assertOwnerRestriction(String restriction, boolean expected) { in assertOwnerRestriction() argument 127 assertEquals("Restriction " + restriction + ": expected=" + expected, in assertOwnerRestriction() 129 .getBoolean(restriction)); in assertOwnerRestriction() 133 protected boolean hasBaseUserRestriction(String restriction, UserHandle userHandle) { in hasBaseUserRestriction() argument 135 (um) -> um.hasBaseUserRestriction(restriction, userHandle)); in hasBaseUserRestriction() 155 protected void assertSetClearUserRestriction(String restriction) { in assertSetClearUserRestriction() argument 156 final boolean hadRestriction = mUserManager.hasUserRestriction(restriction); in assertSetClearUserRestriction() [all …]
|
D | ProfileGlobalRestrictionsTest.java | 23 private void assertRestriction(String restriction, boolean expected) { in assertRestriction() argument 25 expected, mUserManager.hasUserRestriction(restriction)); in assertRestriction()
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | UserRestrictionsTest.java | 179 @AllUserRestrictions String restriction) { in getUserRestrictions_allDefaultUserRestrictions_returnFalse() 182 .getBoolean(restriction)) in getUserRestrictions_allDefaultUserRestrictions_returnFalse() 189 @AllDpcAllowedUserRestrictions String restriction) { in getUserRestrictions_containsAddedRestriction() 191 .userManager().hasUserRestriction(restriction); in getUserRestrictions_containsAddedRestriction() 195 sDeviceState.dpc().componentName(), restriction); in getUserRestrictions_containsAddedRestriction() local 199 .getBoolean(restriction)) in getUserRestrictions_containsAddedRestriction() 204 sDeviceState.dpc().componentName(), restriction); in getUserRestrictions_containsAddedRestriction() local 212 @AllDpcAllowedUserRestrictions String restriction) { in hasUserRestriction_containsAddedRestriction() 214 .userManager().hasUserRestriction(restriction); in hasUserRestriction_containsAddedRestriction() 218 sDeviceState.dpc().componentName(), restriction); in hasUserRestriction_containsAddedRestriction() local [all …]
|
D | BluetoothTest.java | 148 private void clearUserRestriction(String restriction) { in clearUserRestriction() argument 151 sDeviceState.dpc().componentName(), restriction); in clearUserRestriction() local
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | OrgOwnedProfileOwnerParentTest.java | 104 for (String restriction : PROFILE_OWNER_ORGANIZATION_OWNED_GLOBAL_RESTRICTIONS) { in testAddGetAndClearUserRestriction_onParent() 105 testAddGetAndClearUserRestriction_onParent(restriction); in testAddGetAndClearUserRestriction_onParent() 107 for (String restriction : PROFILE_OWNER_ORGANIZATION_OWNED_LOCAL_RESTRICTIONS) { in testAddGetAndClearUserRestriction_onParent() 108 testAddGetAndClearUserRestriction_onParent(restriction); in testAddGetAndClearUserRestriction_onParent() 120 private void testAddGetAndClearUserRestriction_onParent(String restriction) { in testAddGetAndClearUserRestriction_onParent() argument 121 mParentDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in testAddGetAndClearUserRestriction_onParent() 125 assertThat(restrictions.get(restriction)).isNotNull(); in testAddGetAndClearUserRestriction_onParent() 127 mParentDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in testAddGetAndClearUserRestriction_onParent() 130 assertThat(restrictions.get(restriction)).isNull(); in testAddGetAndClearUserRestriction_onParent() 140 private void testUnableToAddBaseUserRestriction(String restriction) { in testUnableToAddBaseUserRestriction() argument [all …]
|
D | UserRestrictionsParentTest.java | 230 for (String restriction : PROFILE_OWNER_ORGANIZATION_OWNED_LOCAL_RESTRICTIONS) { in testPerProfileUserRestriction_onParent() 233 restriction); in testPerProfileUserRestriction_onParent() 235 parentDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in testPerProfileUserRestriction_onParent() 237 assertThat(hasUserRestriction(restriction)).isTrue(); in testPerProfileUserRestriction_onParent() 239 assertThat(mUserManager.hasUserRestriction(restriction)).isEqualTo( in testPerProfileUserRestriction_onParent() 243 restriction); in testPerProfileUserRestriction_onParent() 244 assertThat(hasUserRestriction(restriction)).isFalse(); in testPerProfileUserRestriction_onParent() 267 for (String restriction : PROFILE_OWNER_ORGANIZATION_OWNED_GLOBAL_RESTRICTIONS) { in testPerDeviceUserRestriction_onParent() 269 parentDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in testPerDeviceUserRestriction_onParent() 271 assertThat(hasUserRestriction(restriction)).isTrue(); in testPerDeviceUserRestriction_onParent() [all …]
|
D | CustomizationRestrictionsTest.java | 52 RestrictionApplicator(String restriction) { in RestrictionApplicator() argument 53 mRestriction = restriction; in RestrictionApplicator()
|
/cts/hostsidetests/multiuser/dpc/src/com/android/cts/multiuser/dpc/ |
D | DpcShellCommand.java | 72 String restriction = mArgs[1]; in runAddUserRestriction() local 73 Log.i(TAG, "Calling addUserRestriction(" + restriction + ")"); in runAddUserRestriction() 74 mDpm.addUserRestriction(mAdmin, restriction); in runAddUserRestriction() 78 String restriction = mArgs[1]; in runClearUserRestriction() local 79 Log.i(TAG, "Calling clearUserRestriction(" + restriction + ")"); in runClearUserRestriction() 80 mDpm.clearUserRestriction(mAdmin, restriction); in runClearUserRestriction()
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/provisioning/ |
D | UserRestrictionTest.java | 35 private void setUserRestriction(String restriction, boolean add) { in setUserRestriction() argument 39 dpm.addUserRestriction(admin, restriction); in setUserRestriction() 41 dpm.clearUserRestriction(admin, restriction); in setUserRestriction()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | UserRestrictions.java | 221 public static String getRestrictionLabel(Context context, String restriction) { in getRestrictionLabel() argument 222 final UserRestrictionItem item = findRestrictionItem(restriction); in getRestrictionLabel() 226 public static String getUserAction(Context context, String restriction) { in getUserAction() argument 227 final UserRestrictionItem item = findRestrictionItem(restriction); in getUserAction() 231 private static UserRestrictionItem findRestrictionItem(String restriction) { in findRestrictionItem() argument 232 final UserRestrictionItem item = USER_RESTRICTION_ITEMS.get(restriction); in findRestrictionItem() 234 throw new IllegalArgumentException("Unknown restriction: " + restriction); in findRestrictionItem() 261 public static Intent getUserRestrictionTestIntent(Context context, String restriction, in getUserRestrictionTestIntent() argument 263 final UserRestrictionItem item = USER_RESTRICTION_ITEMS.get(restriction); in getUserRestrictionTestIntent() 268 .putExtra(CommandReceiverActivity.EXTRA_USER_RESTRICTION, restriction) in getUserRestrictionTestIntent() [all …]
|
D | ByodHelperActivity.java | 348 final String restriction = intent.getStringExtra(EXTRA_PARAMETER_1); in onCreate() local 349 if (restriction != null) { in onCreate() 351 DeviceAdminTestReceiver.getReceiverComponentName(), restriction); in onCreate() local 354 final String restriction = intent.getStringExtra(EXTRA_PARAMETER_1); in onCreate() local 355 if (restriction != null) { in onCreate() 357 DeviceAdminTestReceiver.getReceiverComponentName(), restriction); in onCreate() local 556 private boolean isRestrictionSet(String restriction) { in isRestrictionSet() argument 560 return restrictions.getBoolean(restriction, false); in isRestrictionSet() 563 private void setRestriction(String restriction, boolean enabled) { in setRestriction() argument 565 mDevicePolicyManager.addUserRestriction(mAdminReceiverComponent, restriction); in setRestriction() [all …]
|
D | PolicyTransparencyTestListActivity.java | 149 for (String restriction : in addTestsToAdapter() 152 UserRestrictions.getUserRestrictionTestIntent(this, restriction, mMode); in addTestsToAdapter() 153 if (!UserRestrictions.isRestrictionValid(this, restriction)) { in addTestsToAdapter() 156 String title = UserRestrictions.getRestrictionLabel(this, restriction); in addTestsToAdapter()
|
D | CommandReceiverActivity.java | 794 public static Intent createSetDeviceOwnerUserRestrictionIntent(String restriction, in createSetDeviceOwnerUserRestrictionIntent() argument 796 return createSetUserRestrictionIntent(restriction, enforced, /* currentUserDpm= */ false); in createSetDeviceOwnerUserRestrictionIntent() 802 public static Intent createSetCurrentUserRestrictionIntent(String restriction, in createSetCurrentUserRestrictionIntent() argument 804 return createSetUserRestrictionIntent(restriction, enforced, /* currentUserDpm= */ true); in createSetCurrentUserRestrictionIntent() 807 private static Intent createSetUserRestrictionIntent(String restriction, boolean enforced, in createSetUserRestrictionIntent() argument 809 Log.d(TAG, "createSetUserRestrictionIntent(): restriction=" + restriction in createSetUserRestrictionIntent() 817 .putExtra(EXTRA_USER_RESTRICTION, restriction) in createSetUserRestrictionIntent()
|
/cts/hostsidetests/multiuser/src/android/host/multiuser/ |
D | DpcCommander.java | 61 public void addUserRestriction(String restriction) throws DeviceNotAvailableException { in addUserRestriction() argument 62 runDpcCmd("add-user-restriction %s", restriction); in addUserRestriction() 65 public void clearUserRestriction(String restriction) throws DeviceNotAvailableException { in clearUserRestriction() argument 66 runDpcCmd("clear-user-restriction %s", restriction); in clearUserRestriction()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | BluetoothRestrictionTest.java | 262 private void addUserRestriction(String restriction) { in addUserRestriction() argument 263 Log.d(TAG, "Adding " + restriction + " using " + mDevicePolicyManager); in addUserRestriction() 264 mDevicePolicyManager.addUserRestriction(getWho(), restriction); in addUserRestriction() local 267 private void clearUserRestriction(String restriction) { in clearUserRestriction() argument 268 Log.d(TAG, "Clearing " + restriction + " using " + mDevicePolicyManager); in clearUserRestriction() 269 mDevicePolicyManager.clearUserRestriction(getWho(), restriction); in clearUserRestriction() local
|
D | PrivateDnsPolicyTest.java | 62 private void setUserRestriction(String restriction, boolean add) { in setUserRestriction() argument 64 mDevicePolicyManager.addUserRestriction(getWho(), restriction); in setUserRestriction() local 66 mDevicePolicyManager.clearUserRestriction(getWho(), restriction); in setUserRestriction() local
|
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/ |
D | DeviceState.java | 1788 for (String restriction : userRestrictions.getValue()) { 1789 ensureDoesNotHaveUserRestriction(restriction, userRestrictions.getKey()); 1795 for (String restriction : userRestrictions.getValue()) { 1796 ensureHasUserRestriction(restriction, userRestrictions.getKey()); 2342 private void ensureHasUserRestriction(String restriction, UserType onUser) { 2343 ensureHasUserRestriction(restriction, resolveUserTypeToUser(onUser)); 2346 private void ensureHasUserRestriction(String restriction, UserReference onUser) { 2347 if (TestApis.devicePolicy().userRestrictions(onUser).isSet(restriction)) { 2356 TestApis.devicePolicy().userRestrictions(onUser).set(restriction, 2361 trySetUserRestriction(onUser, restriction); [all …]
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PackageManagerShellCommandUserRestrictionTest.java | 88 private boolean hasUserRestriction(int userId, String restriction) throws Exception { in hasUserRestriction() argument 90 String.format("pm get-user-restriction --user %d %s", userId, restriction)).trim(); in hasUserRestriction() 91 Log.d(TAG, "hasUserRestriction for userId=" + userId + " and restriction=" + restriction in hasUserRestriction()
|
/cts/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/src/com/android/cts/transferowner/ |
D | DeviceAndProfileOwnerTransferOutgoingTest.java | 141 private void setUserRestriction(String restriction, boolean add) { in setUserRestriction() argument 144 dpm.addUserRestriction(mOutgoingComponentName, restriction); in setUserRestriction() 146 dpm.clearUserRestriction(mOutgoingComponentName, restriction); in setUserRestriction()
|
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ |
D | ManagedProfileTest.java | 124 String restriction = "no_debugging_features"; // UserManager.DISALLOW_DEBUGGING_FEATURES in testNoDebuggingFeaturesRestriction() local 126 changeUserRestrictionOrFail(restriction, true, mProfileUserId); in testNoDebuggingFeaturesRestriction() 132 changeUserRestriction(restriction, true, mProfileUserId); in testNoDebuggingFeaturesRestriction()
|
/cts/hostsidetests/gputools/layers/ |
D | LICENSE_MIT | 3 deal in the Materials without restriction, including without limitation the
|
/cts/hostsidetests/sustainedperf/dhrystone/ |
D | LICENSE.TXT | 20 the Software without restriction, including without limitation the rights to
|