Home
last modified time | relevance | path

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

/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/userrestrictions/
DBaseUserRestrictionsTest.java107 protected void assertLayeredRestriction(String restriction, boolean expected) { in assertLayeredRestriction() argument
108 assertEquals("Restriction " + restriction + ": expected=" + expected, in assertLayeredRestriction()
109 expected, mUserManager.hasUserRestriction(restriction)); in assertLayeredRestriction()
112 protected void assertOwnerRestriction(String restriction, boolean expected) { in assertOwnerRestriction() argument
113 assertEquals("Restriction " + restriction + ": expected=" + expected, in assertOwnerRestriction()
115 .getBoolean(restriction)); in assertOwnerRestriction()
127 protected void assertSetClearUserRestriction(String restriction) { in assertSetClearUserRestriction() argument
128 final boolean hadRestriction = mUserManager.hasUserRestriction(restriction); in assertSetClearUserRestriction()
130 assertOwnerRestriction(restriction, false); in assertSetClearUserRestriction()
133 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, 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/
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.java541 private void assertPasswordFails(String password, String restriction) { in assertPasswordFails() argument
545 assertFalse("Password '" + password + "' should have failed on " + restriction, in assertPasswordFails()
552 private void assertPasswordSucceeds(String password, String restriction) { in assertPasswordSucceeds() argument
555 assertTrue("Password '" + password + "' failed on " + restriction, passwordResetResult); in assertPasswordSucceeds()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodHelperActivity.java356 final String restriction = intent.getStringExtra(EXTRA_PARAMETER_1); in onCreate() local
357 if (restriction != null) { in onCreate()
359 DeviceAdminTestReceiver.getReceiverComponentName(), restriction); in onCreate() local
362 final String restriction = intent.getStringExtra(EXTRA_PARAMETER_1); in onCreate() local
363 if (restriction != null) { in onCreate()
365 DeviceAdminTestReceiver.getReceiverComponentName(), restriction); in onCreate() local
538 private boolean isRestrictionSet(String restriction) { in isRestrictionSet() argument
542 return restrictions.getBoolean(restriction, false); in isRestrictionSet()
545 private void setRestriction(String restriction, boolean enabled) { in setRestriction() argument
547 mDevicePolicyManager.addUserRestriction(mAdminReceiverComponent, restriction); in setRestriction()
[all …]
DUserRestrictions.java181 public static String getRestrictionLabel(Context context, String restriction) { in getRestrictionLabel() argument
182 final UserRestrictionItem item = findRestrictionItem(restriction); in getRestrictionLabel()
186 public static String getUserAction(Context context, String restriction) { in getUserAction() argument
187 final UserRestrictionItem item = findRestrictionItem(restriction); in getUserAction()
191 private static UserRestrictionItem findRestrictionItem(String restriction) { in findRestrictionItem() argument
192 final UserRestrictionItem item = USER_RESTRICTION_ITEMS.get(restriction); in findRestrictionItem()
194 throw new IllegalArgumentException("Unknown restriction: " + restriction); in findRestrictionItem()
220 public static Intent getUserRestrictionTestIntent(Context context, String restriction) { in getUserRestrictionTestIntent() argument
221 final UserRestrictionItem item = USER_RESTRICTION_ITEMS.get(restriction); in getUserRestrictionTestIntent()
225 .putExtra(CommandReceiverActivity.EXTRA_USER_RESTRICTION, restriction) in getUserRestrictionTestIntent()
[all …]
DPolicyTransparencyTestListActivity.java145 for (String restriction : in addTestsToAdapter()
147 final Intent intent = UserRestrictions.getUserRestrictionTestIntent(this, restriction); in addTestsToAdapter()
148 if (!UserRestrictions.isRestrictionValid(this, restriction)) { in addTestsToAdapter()
151 final String title = UserRestrictions.getRestrictionLabel(this, restriction); in addTestsToAdapter()
DCommandReceiverActivity.java636 public static Intent createSetUserRestrictionIntent(String restriction, boolean enforced) { in createSetUserRestrictionIntent() argument
639 .putExtra(EXTRA_USER_RESTRICTION, restriction) in createSetUserRestrictionIntent()
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/provisioning/
DUserRestrictionTest.java52 private void setUserRestriction(String restriction, boolean add) { in setUserRestriction() argument
56 dpm.addUserRestriction(admin, restriction); in setUserRestriction()
58 dpm.clearUserRestriction(admin, restriction); in setUserRestriction()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DPrivateDnsPolicyTest.java62 private void setUserRestriction(String restriction, boolean add) { in setUserRestriction() argument
65 dpm.addUserRestriction(getWho(), restriction); in setUserRestriction() local
67 dpm.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.java183 private void setUserRestriction(String restriction, boolean add) { in setUserRestriction() argument
186 dpm.addUserRestriction(mOutgoingComponentName, restriction); in setUserRestriction()
188 dpm.clearUserRestriction(mOutgoingComponentName, restriction); in setUserRestriction()
/cts/hostsidetests/devicepolicy/app/DeviceAdmin/src/com.android.cts.deviceadmin/
DDeviceOwnerPasswordTest.java364 private void assertPasswordFails(String password, String restriction) { in assertPasswordFails() argument
367 assertFalse("Password '" + password + "' should have failed on " + restriction, in assertPasswordFails()
374 private void assertPasswordSucceeds(String password, String restriction) { in assertPasswordSucceeds() argument
376 assertTrue("Password '" + password + "' failed on " + restriction, passwordResetResult); in assertPasswordSucceeds()
/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/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DManagedProfileTest.java755 String restriction = "no_debugging_features"; // UserManager.DISALLOW_DEBUGGING_FEATURES in testNoDebuggingFeaturesRestriction() local
757 changeUserRestrictionOrFail(restriction, true, mProfileUserId); in testNoDebuggingFeaturesRestriction()
763 changeUserRestriction(restriction, true, mProfileUserId); in testNoDebuggingFeaturesRestriction()
DDeviceAndProfileOwnerTest.java1961 String restriction = getDevice().executeShellCommand(RESTRICT_BACKGROUND_GET_CMD); in ensureRestrictBackgroundPolicyOff() local
1962 if (restriction.contains("enabled")) { in ensureRestrictBackgroundPolicyOff()