Home
last modified time | relevance | path

Searched refs:restriction (Results 1 – 22 of 22) sorted by relevance

/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/userrestrictions/
DBaseUserRestrictionsTest.java112 protected void assertLayeredRestriction(String restriction, boolean expected) { in assertLayeredRestriction() argument
113 assertEquals("Restriction " + restriction + ": expected=" + expected, in assertLayeredRestriction()
114 expected, mUserManager.hasUserRestriction(restriction)); in assertLayeredRestriction()
117 protected void assertOwnerRestriction(String restriction, boolean expected) { in assertOwnerRestriction() argument
118 assertEquals("Restriction " + restriction + ": expected=" + expected, in assertOwnerRestriction()
120 .getBoolean(restriction)); in assertOwnerRestriction()
124 protected boolean hasBaseUserRestriction(String restriction, UserHandle userHandle) { in hasBaseUserRestriction() argument
126 (um) -> um.hasBaseUserRestriction(restriction, userHandle)); in hasBaseUserRestriction()
146 protected void assertSetClearUserRestriction(String restriction) { in assertSetClearUserRestriction() argument
147 final boolean hadRestriction = mUserManager.hasUserRestriction(restriction); in assertSetClearUserRestriction()
[all …]
DProfileGlobalRestrictionsTest.java23 private void assertRestriction(String restriction, boolean expected) { in assertRestriction() argument
25 expected, mUserManager.hasUserRestriction(restriction)); in assertRestriction()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DOrgOwnedProfileOwnerParentTest.java105 for (String restriction : PROFILE_OWNER_ORGANIZATION_OWNED_GLOBAL_RESTRICTIONS) { in testAddGetAndClearUserRestriction_onParent()
106 testAddGetAndClearUserRestriction_onParent(restriction); in testAddGetAndClearUserRestriction_onParent()
108 for (String restriction : PROFILE_OWNER_ORGANIZATION_OWNED_LOCAL_RESTRICTIONS) { in testAddGetAndClearUserRestriction_onParent()
109 testAddGetAndClearUserRestriction_onParent(restriction); in testAddGetAndClearUserRestriction_onParent()
121 private void testAddGetAndClearUserRestriction_onParent(String restriction) { in testAddGetAndClearUserRestriction_onParent() argument
122 mParentDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in testAddGetAndClearUserRestriction_onParent()
126 assertThat(restrictions.get(restriction)).isNotNull(); in testAddGetAndClearUserRestriction_onParent()
128 mParentDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in testAddGetAndClearUserRestriction_onParent()
131 assertThat(restrictions.get(restriction)).isNull(); in testAddGetAndClearUserRestriction_onParent()
141 private void testUnableToAddBaseUserRestriction(String restriction) { in testUnableToAddBaseUserRestriction() argument
[all …]
DUserRestrictionsParentTest.java230 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 …]
DPolicyTransparencyTest.java73 private void runTestForRestriction(String restriction) throws Exception { in runTestForRestriction() argument
74 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in runTestForRestriction()
76 Intent intent = mDevicePolicyManager.createAdminSupportIntent(restriction); in runTestForRestriction()
80 assertEquals(restriction, intent.getStringExtra(DevicePolicyManager.EXTRA_RESTRICTION)); in runTestForRestriction()
82 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in runTestForRestriction()
83 intent = mDevicePolicyManager.createAdminSupportIntent(restriction); in runTestForRestriction()
DCustomizationRestrictionsTest.java49 RestrictionApplicator(String restriction) { in RestrictionApplicator() argument
50 mRestriction = restriction; in RestrictionApplicator()
DResetPasswordWithTokenTest.java631 private void assertPasswordFails(String password, String restriction) { in assertPasswordFails() argument
635 assertFalse("Password '" + password + "' should have failed on " + restriction, in assertPasswordFails()
642 private void assertPasswordSucceeds(String password, String restriction) { in assertPasswordSucceeds() argument
645 assertTrue("Password '" + password + "' failed on " + restriction, passwordResetResult); in assertPasswordSucceeds()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodHelperActivity.java340 final String restriction = intent.getStringExtra(EXTRA_PARAMETER_1); in onCreate() local
341 if (restriction != null) { in onCreate()
343 DeviceAdminTestReceiver.getReceiverComponentName(), restriction); in onCreate() local
346 final String restriction = intent.getStringExtra(EXTRA_PARAMETER_1); in onCreate() local
347 if (restriction != null) { in onCreate()
349 DeviceAdminTestReceiver.getReceiverComponentName(), restriction); in onCreate() local
548 private boolean isRestrictionSet(String restriction) { in isRestrictionSet() argument
552 return restrictions.getBoolean(restriction, false); in isRestrictionSet()
555 private void setRestriction(String restriction, boolean enabled) { in setRestriction() argument
557 mDevicePolicyManager.addUserRestriction(mAdminReceiverComponent, restriction); in setRestriction()
[all …]
DUserRestrictions.java187 public static String getRestrictionLabel(Context context, String restriction) { in getRestrictionLabel() argument
188 final UserRestrictionItem item = findRestrictionItem(restriction); in getRestrictionLabel()
192 public static String getUserAction(Context context, String restriction) { in getUserAction() argument
193 final UserRestrictionItem item = findRestrictionItem(restriction); in getUserAction()
197 private static UserRestrictionItem findRestrictionItem(String restriction) { in findRestrictionItem() argument
198 final UserRestrictionItem item = USER_RESTRICTION_ITEMS.get(restriction); in findRestrictionItem()
200 throw new IllegalArgumentException("Unknown restriction: " + restriction); in findRestrictionItem()
224 public static Intent getUserRestrictionTestIntent(Context context, String restriction) { in getUserRestrictionTestIntent() argument
225 final UserRestrictionItem item = USER_RESTRICTION_ITEMS.get(restriction); in getUserRestrictionTestIntent()
230 .putExtra(CommandReceiverActivity.EXTRA_USER_RESTRICTION, restriction) in getUserRestrictionTestIntent()
[all …]
DPolicyTransparencyTestListActivity.java141 for (String restriction : in addTestsToAdapter()
143 final Intent intent = UserRestrictions.getUserRestrictionTestIntent(this, restriction); in addTestsToAdapter()
144 if (!UserRestrictions.isRestrictionValid(this, restriction)) { in addTestsToAdapter()
147 final String title = UserRestrictions.getRestrictionLabel(this, restriction); in addTestsToAdapter()
DCommandReceiverActivity.java673 public static Intent createSetDeviceOwnerUserRestrictionIntent(String restriction, in createSetDeviceOwnerUserRestrictionIntent() argument
675 return createSetUserRestrictionIntent(restriction, enforced, /* currentUserDpm= */ false); in createSetDeviceOwnerUserRestrictionIntent()
681 public static Intent createSetCurrentUserRestrictionIntent(String restriction, in createSetCurrentUserRestrictionIntent() argument
683 return createSetUserRestrictionIntent(restriction, enforced, /* currentUserDpm= */ true); in createSetCurrentUserRestrictionIntent()
686 private static Intent createSetUserRestrictionIntent(String restriction, boolean enforced, in createSetUserRestrictionIntent() argument
694 .putExtra(EXTRA_USER_RESTRICTION, restriction) in createSetUserRestrictionIntent()
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/provisioning/
DUserRestrictionTest.java35 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/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DPrivateDnsPolicyTest.java61 private void setUserRestriction(String restriction, boolean add) { in setUserRestriction() argument
63 mDevicePolicyManager.addUserRestriction(getWho(), restriction); in setUserRestriction() local
65 mDevicePolicyManager.clearUserRestriction(getWho(), restriction); in setUserRestriction() local
DBluetoothRestrictionTest.java125 private void testOppDisabledWhenRestrictionSet(String restriction) { in testOppDisabledWhenRestrictionSet() argument
127 mDevicePolicyManager.addUserRestriction(getWho(), restriction); in testOppDisabledWhenRestrictionSet() local
134 mDevicePolicyManager.clearUserRestriction(getWho(), restriction); in testOppDisabledWhenRestrictionSet() local
/cts/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/src/com/android/cts/transferowner/
DDeviceAndProfileOwnerTransferOutgoingTest.java173 private void setUserRestriction(String restriction, boolean add) { in setUserRestriction() argument
176 dpm.addUserRestriction(mOutgoingComponentName, restriction); in setUserRestriction()
178 dpm.clearUserRestriction(mOutgoingComponentName, restriction); in setUserRestriction()
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DManagedProfileTest.java151 String restriction = "no_debugging_features"; // UserManager.DISALLOW_DEBUGGING_FEATURES in testNoDebuggingFeaturesRestriction() local
153 changeUserRestrictionOrFail(restriction, true, mProfileUserId); in testNoDebuggingFeaturesRestriction()
159 changeUserRestriction(restriction, true, mProfileUserId); in testNoDebuggingFeaturesRestriction()
DBaseDevicePolicyTest.java1258 protected boolean isRestrictionSetOnUser(int userId, String restriction) throws Exception { in isRestrictionSetOnUser() argument
1290 if (restrictionsFound && line.contains(restriction)) { in isRestrictionSetOnUser()
DDeviceAndProfileOwnerTest.java2074 String restriction = getDevice().executeShellCommand(RESTRICT_BACKGROUND_GET_CMD); in ensureRestrictBackgroundPolicyOff() local
2075 if (restriction.contains("enabled")) { in ensureRestrictBackgroundPolicyOff()
/cts/
DAndroid.bp7 // every license restriction, it may not be entirely correct.
/cts/hostsidetests/sustainedperf/dhrystone/
DLICENSE.TXT20 the Software without restriction, including without limitation the rights to
DRationale283 restriction does not hold for the string functions of the C version
/cts/apps/CtsVerifier/
DNOTICE.txt42 in the Software without restriction, including without limitation the rights
2566 in the Software without restriction, including without limitation the rights
2804 the Software without restriction, including without limitation the rights to
3648 the Software without restriction, including without limitation the rights to
4165 "Software"), to deal in the Software without restriction, including
4213 the Software without restriction, including without limitation the rights to
4710 the Software without restriction, including without limitation the rights to
4741 in the Software without restriction, including without limitation the rights
5106 without restriction, including without limitation the rights to use,
5148 "Software"), to deal in the Software without restriction, including
[all …]