Searched refs:restrictionKey (Results 1 – 2 of 2) sorted by relevance
240 String restrictionKey = "restriction key"; in addUserRestrictionShouldWorkAsIntendedForDeviceOwner() local246 devicePolicyManager.addUserRestriction(testComponent, restrictionKey); in addUserRestrictionShouldWorkAsIntendedForDeviceOwner()250 assertThat(restrictions.getBoolean(restrictionKey)).isTrue(); in addUserRestrictionShouldWorkAsIntendedForDeviceOwner()257 String restrictionKey = "restriction key"; in addUserRestrictionShouldWorkAsIntendedForProfileOwner() local263 devicePolicyManager.addUserRestriction(testComponent, restrictionKey); in addUserRestrictionShouldWorkAsIntendedForProfileOwner()267 assertThat(restrictions.getBoolean(restrictionKey)).isTrue(); in addUserRestrictionShouldWorkAsIntendedForProfileOwner()277 String restrictionKey = "restriction key"; in clearUserRestrictionShouldWorkAsIntendedForActiveAdmins() local278 devicePolicyManager.addUserRestriction(testComponent, restrictionKey); in clearUserRestrictionShouldWorkAsIntendedForActiveAdmins()281 devicePolicyManager.clearUserRestriction(testComponent, restrictionKey); in clearUserRestrictionShouldWorkAsIntendedForActiveAdmins()285 assertThat(restrictions.getBoolean(restrictionKey)).isFalse(); in clearUserRestrictionShouldWorkAsIntendedForActiveAdmins()
152 protected boolean hasUserRestriction(String restrictionKey, UserHandle userHandle) { in hasUserRestriction() argument154 return bundle != null && bundle.getBoolean(restrictionKey); in hasUserRestriction()157 public void setUserRestriction(UserHandle userHandle, String restrictionKey, boolean value) { in setUserRestriction() argument159 bundle.putBoolean(restrictionKey, value); in setUserRestriction()