Home
last modified time | relevance | path

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

/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/
DDisabledByPolicyInteractor.kt45 suspend fun isDisabled(user: UserHandle, userRestriction: String?): PolicyResult in isDisabled()
79 override suspend fun isDisabled(user: UserHandle, userRestriction: String?): PolicyResult = in isDisabled()
82 restrictedLockProxy.getEnforcedAdmin(user.identifier, userRestriction) in isDisabled()
86 !restrictedLockProxy.hasBaseUserRestriction(user.identifier, userRestriction) in isDisabled()
111 fun hasBaseUserRestriction(userId: Int, userRestriction: String?): Boolean =
114 userRestriction,
119 fun getEnforcedAdmin(userId: Int, userRestriction: String?): EnforcedAdmin? =
122 userRestriction,
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/
DInjectedSetting.java72 public final String userRestriction; field in InjectedSetting
81 this.userRestriction = builder.mUserRestriction; in InjectedSetting()
93 ", userRestriction='" + userRestriction + in toString()
119 && Objects.equals(userRestriction, that.userRestriction); in equals()
130 result = 31 * result + (userRestriction == null ? 0 : userRestriction.hashCode()); in hashCode()
173 public Builder setUserRestriction(String userRestriction) { in setUserRestriction() argument
174 mUserRestriction = userRestriction; in setUserRestriction()
DSettingsInjector.java282 final String userRestriction = sa.getString( in parseAttributes() local
295 .setUserRestriction(userRestriction) in parseAttributes()
/frameworks/base/packages/SystemUI/src/com/android/systemui/utils/
DUserRestrictionChecker.kt12 userRestriction: String, in checkIfRestrictionEnforced()
17 userRestriction, in checkIfRestrictionEnforced()
22 fun hasBaseUserRestriction(context: Context, userRestriction: String, userId: Int): Boolean { in hasBaseUserRestriction()
23 return RestrictedLockUtilsInternal.hasBaseUserRestriction(context, userRestriction, userId) in hasBaseUserRestriction()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/base/interactor/
DFakeDisabledByPolicyInteractor.kt26 userRestriction: String? in isDisabled()
28 if (userRestriction == DISABLED_RESTRICTION || userRestriction == DISABLED_RESTRICTION_2) { in isDisabled()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DRestrictedPreferenceHelper.java80 final TypedValue userRestriction = in RestrictedPreferenceHelper() local
83 if (userRestriction != null && userRestriction.type == TypedValue.TYPE_STRING) { in RestrictedPreferenceHelper()
84 if (userRestriction.resourceId != 0) { in RestrictedPreferenceHelper()
85 data = context.getText(userRestriction.resourceId); in RestrictedPreferenceHelper()
87 data = userRestriction.string; in RestrictedPreferenceHelper()
189 public void checkRestrictionAndSetDisabled(String userRestriction, int userId) { in checkRestrictionAndSetDisabled() argument
191 userRestriction, userId); in checkRestrictionAndSetDisabled()
DRestrictedTopLevelPreference.java77 public void checkRestrictionAndSetDisabled(String userRestriction) { in checkRestrictionAndSetDisabled() argument
78 mHelper.checkRestrictionAndSetDisabled(userRestriction, UserHandle.myUserId()); in checkRestrictionAndSetDisabled()
87 public void checkRestrictionAndSetDisabled(String userRestriction, int userId) { in checkRestrictionAndSetDisabled() argument
88 mHelper.checkRestrictionAndSetDisabled(userRestriction, userId); in checkRestrictionAndSetDisabled()
DRestrictedSelectorWithWidgetPreference.java113 public void checkRestrictionAndSetDisabled(@NonNull String userRestriction) { in checkRestrictionAndSetDisabled() argument
114 mHelper.checkRestrictionAndSetDisabled(userRestriction, UserHandle.myUserId()); in checkRestrictionAndSetDisabled()
123 public void checkRestrictionAndSetDisabled(@NonNull String userRestriction, int userId) { in checkRestrictionAndSetDisabled() argument
124 mHelper.checkRestrictionAndSetDisabled(userRestriction, userId); in checkRestrictionAndSetDisabled()
DRestrictedPreference.java92 public void checkRestrictionAndSetDisabled(String userRestriction) { in checkRestrictionAndSetDisabled() argument
93 mHelper.checkRestrictionAndSetDisabled(userRestriction, UserHandle.myUserId()); in checkRestrictionAndSetDisabled()
96 public void checkRestrictionAndSetDisabled(String userRestriction, int userId) { in checkRestrictionAndSetDisabled() argument
97 mHelper.checkRestrictionAndSetDisabled(userRestriction, userId); in checkRestrictionAndSetDisabled()
DRestrictedSwitchPreference.java192 public void checkRestrictionAndSetDisabled(String userRestriction) { in checkRestrictionAndSetDisabled() argument
193 mHelper.checkRestrictionAndSetDisabled(userRestriction, UserHandle.myUserId()); in checkRestrictionAndSetDisabled()
196 public void checkRestrictionAndSetDisabled(String userRestriction, int userId) { in checkRestrictionAndSetDisabled() argument
197 mHelper.checkRestrictionAndSetDisabled(userRestriction, userId); in checkRestrictionAndSetDisabled()
DRestrictedLockUtilsInternal.java170 String userRestriction, int userId) { in checkIfRestrictionEnforced() argument
180 um.getUserRestrictionSources(userRestriction, userHandle); in checkIfRestrictionEnforced()
189 .createDefaultEnforcedAdminWithRestriction(userRestriction); in checkIfRestrictionEnforced()
193 + userRestriction + "' on user " + userHandle + "; returning default admin " in checkIfRestrictionEnforced()
206 getProfileOrDeviceOwner(context, userRestriction, enforcingUser.getUserHandle()); in checkIfRestrictionEnforced()
210 return EnforcedAdmin.createDefaultEnforcedAdminWithRestriction(userRestriction); in checkIfRestrictionEnforced()
214 String userRestriction, int userId) { in hasBaseUserRestriction() argument
216 return um.hasBaseUserRestriction(userRestriction, UserHandle.of(userId)); in hasBaseUserRestriction()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java93 final String userRestriction = UserManager.DISALLOW_UNINSTALL_APPS; in checkIfRestrictionEnforced_deviceOwner() local
94 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_deviceOwner()
105 .checkIfRestrictionEnforced(mContext, userRestriction, mUserId); in checkIfRestrictionEnforced_deviceOwner()
108 assertThat(enforcedAdmin.enforcedRestriction).isEqualTo(userRestriction); in checkIfRestrictionEnforced_deviceOwner()
117 final String userRestriction = UserManager.DISALLOW_UNINSTALL_APPS; in checkIfRestrictionEnforced_profileOwner() local
118 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_profileOwner()
129 .checkIfRestrictionEnforced(mContext, userRestriction, mUserId); in checkIfRestrictionEnforced_profileOwner()
132 assertThat(enforcedAdmin.enforcedRestriction).isEqualTo(userRestriction); in checkIfRestrictionEnforced_profileOwner()
/frameworks/base/core/java/android/app/admin/
DDevicePolicyManagerInternal.java140 public abstract Intent createUserRestrictionSupportIntent(int userId, String userRestriction); in createUserRestrictionSupportIntent() argument
/frameworks/base/services/core/java/com/android/server/pm/
DUserTypeDetails.java395 for (String userRestriction : defaultFirstUserRestrictions) { in dump()
396 if (UserRestrictionsUtils.isValidRestriction(userRestriction)) { in dump()
397 restrictions.putBoolean(userRestriction, true); in dump()
DUserRestrictionsUtils.java969 String userRestriction, boolean newValue) { in getNewUserRestrictionSetting() argument
970 return (newValue || UserManager.get(context).hasUserRestriction(userRestriction, in getNewUserRestrictionSetting()
DUserManagerService.java4710 for (String userRestriction : defaultFirstUserRestrictions) { in fallbackToSingleUserLP()
4711 if (UserRestrictionsUtils.isValidRestriction(userRestriction)) { in fallbackToSingleUserLP()
4712 restrictions.putBoolean(userRestriction, true); in fallbackToSingleUserLP()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/
DBluetoothTileTest.kt288 userRestriction: String? in checkIfRestrictionEnforcedByAdminOnly()
290 restrictionChecked = userRestriction in checkIfRestrictionEnforcedByAdminOnly()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/
DQSTileImpl.java523 protected void checkIfRestrictionEnforcedByAdminOnly(State state, String userRestriction) { in checkIfRestrictionEnforcedByAdminOnly() argument
525 userRestriction, mHost.getUserId()); in checkIfRestrictionEnforcedByAdminOnly()
527 userRestriction, mHost.getUserId())) { in checkIfRestrictionEnforcedByAdminOnly()
/frameworks/base/services/core/java/com/android/server/pdb/
DPersistentDataBlockService.java387 private void enforceUserRestriction(String userRestriction) { in enforceUserRestriction() argument
388 if (UserManager.get(mContext).hasUserRestriction(userRestriction)) { in enforceUserRestriction()
390 "OEM unlock is disallowed by user restriction: " + userRestriction); in enforceUserRestriction()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DDevicePolicyManagerService.java12818 @Nullable ComponentName admin, String userRestriction, int userId) {
12819 switch (mUserManager.getUserRestrictionSource(userRestriction, UserHandle.of(userId))) {
13843 String userRestriction, String callerPackageName, int userId) { in enforcePermissionForUserRestriction() argument
13844 String[] permissions = USER_RESTRICTION_PERMISSIONS.get(userRestriction); in enforcePermissionForUserRestriction()
13851 + "user restriction: " + userRestriction + ".\n" + e.getMessage()); in enforcePermissionForUserRestriction()
13855 + userRestriction); in enforcePermissionForUserRestriction()
15752 public Intent createUserRestrictionSupportIntent(int userId, String userRestriction) { in createUserRestrictionSupportIntent() argument
15754 if (getEnforcingAdminAndUserDetailsInternal(userId, userRestriction) != null) { in createUserRestrictionSupportIntent()
15756 intent.putExtra(DevicePolicyManager.EXTRA_RESTRICTION, userRestriction); in createUserRestrictionSupportIntent()
/frameworks/base/core/api/
Dsystem-current.txt451 field public static final int userRestriction = 16844164; // 0x1010584
/frameworks/base/boot/hiddenapi/
Dhiddenapi-max-target-o.txt76058 Lcom/android/internal/R$attr;->userRestriction:I