Home
last modified time | relevance | path

Searched refs:restrictionKey (Results 1 – 2 of 2) sorted by relevance

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowDevicePolicyManagerTest.java240 String restrictionKey = "restriction key"; in addUserRestrictionShouldWorkAsIntendedForDeviceOwner() local
246 devicePolicyManager.addUserRestriction(testComponent, restrictionKey); in addUserRestrictionShouldWorkAsIntendedForDeviceOwner()
250 assertThat(restrictions.getBoolean(restrictionKey)).isTrue(); in addUserRestrictionShouldWorkAsIntendedForDeviceOwner()
257 String restrictionKey = "restriction key"; in addUserRestrictionShouldWorkAsIntendedForProfileOwner() local
263 devicePolicyManager.addUserRestriction(testComponent, restrictionKey); in addUserRestrictionShouldWorkAsIntendedForProfileOwner()
267 assertThat(restrictions.getBoolean(restrictionKey)).isTrue(); in addUserRestrictionShouldWorkAsIntendedForProfileOwner()
277 String restrictionKey = "restriction key"; in clearUserRestrictionShouldWorkAsIntendedForActiveAdmins() local
278 devicePolicyManager.addUserRestriction(testComponent, restrictionKey); in clearUserRestrictionShouldWorkAsIntendedForActiveAdmins()
281 devicePolicyManager.clearUserRestriction(testComponent, restrictionKey); in clearUserRestrictionShouldWorkAsIntendedForActiveAdmins()
285 assertThat(restrictions.getBoolean(restrictionKey)).isFalse(); in clearUserRestrictionShouldWorkAsIntendedForActiveAdmins()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowUserManager.java152 protected boolean hasUserRestriction(String restrictionKey, UserHandle userHandle) { in hasUserRestriction() argument
154 return bundle != null && bundle.getBoolean(restrictionKey); in hasUserRestriction()
157 public void setUserRestriction(UserHandle userHandle, String restrictionKey, boolean value) { in setUserRestriction() argument
159 bundle.putBoolean(restrictionKey, value); in setUserRestriction()