Home
last modified time | relevance | path

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

12

/packages/apps/Settings/src/com/android/settings/enterprise/
DActionDisabledByAdminDialogHelper.java62 public ActionDisabledByAdminDialogHelper(Activity activity, String restriction) { in ActionDisabledByAdminDialogHelper() argument
67 .createInstance(mActivity, restriction, in ActionDisabledByAdminDialogHelper()
80 public AlertDialog.Builder prepareDialogBuilder(String restriction, in prepareDialogBuilder() argument
87 prepareDialogBuilder(builder, restriction, enforcedAdmin); in prepareDialogBuilder()
92 void prepareDialogBuilder(AlertDialog.Builder builder, String restriction, in prepareDialogBuilder() argument
98 mRestriction = restriction; in prepareDialogBuilder()
104 public void updateDialog(String restriction, EnforcedAdmin admin) { in updateDialog() argument
105 if (mEnforcedAdmin.equals(admin) && Objects.equals(mRestriction, restriction)) { in updateDialog()
109 mRestriction = restriction; in updateDialog()
115 String restriction) { in initializeDialogViews() argument
[all …]
DActionDisabledByAdminDialog.java39 final String restriction = getRestrictionFromIntent(getIntent()); in onCreate() local
40 mDialogHelper = new ActionDisabledByAdminDialogHelper(this, restriction); in onCreate()
41 mDialogHelper.prepareDialogBuilder(restriction, enforcedAdmin) in onCreate()
50 final String restriction = getRestrictionFromIntent(intent); in onNewIntent() local
51 mDialogHelper.updateDialog(restriction, admin); in onNewIntent()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/
DActionDisabledByAdminDialogHelper.java71 public AlertDialog.Builder prepareDialogBuilder(String restriction, in prepareDialogBuilder() argument
74 mRestriction = restriction; in prepareDialogBuilder()
98 public void updateDialog(String restriction, EnforcedAdmin admin) { in updateDialog() argument
99 if (mEnforcedAdmin.equals(admin) && Objects.equals(mRestriction, restriction)) { in updateDialog()
103 mRestriction = restriction; in updateDialog()
109 String restriction) { in initializeDialogViews() argument
114 setAdminSupportTitle(root, restriction); in initializeDialogViews()
127 void setAdminSupportTitle(View root, String restriction) { in setAdminSupportTitle() argument
132 if (restriction == null) { in setAdminSupportTitle()
136 switch (restriction) { in setAdminSupportTitle()
DActionDisabledByAdminDialog.java41 final String restriction = getRestrictionFromIntent(getIntent()); in onCreate() local
43 AlertDialog dialog = mDialogHelper.prepareDialogBuilder(restriction, enforcedAdmin) in onCreate()
53 final String restriction = getRestrictionFromIntent(intent); in onNewIntent() local
54 mDialogHelper.updateDialog(restriction, admin); in onNewIntent()
/packages/services/Car/user/car-user-lib/src/android/car/userlib/
DUserHelper.java91 for (String restriction : DEFAULT_NON_ADMIN_RESTRICTIONS) { in grantAdminPermissions()
92 userManager.setUserRestriction(restriction, /* enable= */ false, userHandle); in grantAdminPermissions()
95 for (String restriction : OPTIONAL_NON_ADMIN_RESTRICTIONS) { in grantAdminPermissions()
96 userManager.setUserRestriction(restriction, /* enable= */ false, userHandle); in grantAdminPermissions()
113 for (String restriction : DEFAULT_NON_ADMIN_RESTRICTIONS) { in setDefaultNonAdminRestrictions()
114 userManager.setUserRestriction(restriction, enable, user.getUserHandle()); in setDefaultNonAdminRestrictions()
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/shadow/
DShadowUserManager.java93 public void addBaseUserRestriction(String restriction) { in addBaseUserRestriction() argument
94 mBaseRestrictions.add(restriction); in addBaseUserRestriction()
100 mGuestRestrictions.forEach(restriction -> bundle.putBoolean(restriction, true)); in getDefaultGuestRestrictions()
104 public void addGuestUserRestriction(String restriction) { in addGuestUserRestriction() argument
105 mGuestRestrictions.add(restriction); in addGuestUserRestriction()
DShadowRestrictionUtils.java16 protected EnforcedAdmin checkIfRestrictionEnforced(Context context, String restriction) { in checkIfRestrictionEnforced() argument
/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/
DUserHelperTest.java147 for (String restriction : UserHelper.DEFAULT_NON_ADMIN_RESTRICTIONS) { in testGrantingAdminPermissionsRemovesNonAdminRestrictions()
148 verify(mUserManager).setUserRestriction(restriction, restrictionEnabled, in testGrantingAdminPermissionsRemovesNonAdminRestrictions()
151 for (String restriction : UserHelper.DEFAULT_NON_ADMIN_RESTRICTIONS) { in testGrantingAdminPermissionsRemovesNonAdminRestrictions()
152 verify(mUserManager).setUserRestriction(restriction, restrictionEnabled, in testGrantingAdminPermissionsRemovesNonAdminRestrictions()
/packages/services/Car/car-lib/src/android/car/drivingstate/
DCarUxRestrictionsConfiguration.java133 RestrictionsPerSpeedRange restriction = null; in getUxRestrictions() local
135 restriction = findUxRestrictionsInList(currentSpeed, in getUxRestrictions()
139 if (restriction == null) { in getUxRestrictions()
148 restriction = findUxRestrictionsInList( in getUxRestrictions()
154 if (restriction == null) { in getUxRestrictions()
161 return createUxRestrictionsEvent(restriction.mReqOpt, restriction.mRestrictions); in getUxRestrictions()
860 restriction -> restriction.mSpeedRange == null)) { in validateBaselineModeRestrictions()
862 for (RestrictionsPerSpeedRange restriction : restrictions) { in validateBaselineModeRestrictions()
863 error.append(restriction.toString()).append('\n'); in validateBaselineModeRestrictions()
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/
DActionDisabledByAdminDialogTest.java65 final String restriction = "someRestriction"; in testGetRestrictionFromIntent() local
68 intent.putExtra(DevicePolicyManager.EXTRA_RESTRICTION, restriction); in testGetRestrictionFromIntent()
69 assertEquals(restriction, mDialog.getRestrictionFromIntent(intent)); in testGetRestrictionFromIntent()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/
DApplicationActionButtonsPreferenceControllerTest.java663 private void testShowingDisabledByDeviceAdminDialogWhenUninstallClicked(String restriction) { in testShowingDisabledByDeviceAdminDialogWhenUninstallClicked() argument
664 mockDisabledByDevicePolicyManagerRestriction(restriction); in testShowingDisabledByDeviceAdminDialogWhenUninstallClicked()
747 private void mockDisabledByUserManagerRestriction(String restriction) { in mockDisabledByUserManagerRestriction() argument
748 when(mMockUserManager.hasUserRestriction(restriction)).thenReturn(true); in mockDisabledByUserManagerRestriction()
749 when(mMockUserManager.hasBaseUserRestriction(eq(restriction), any())).thenReturn(true); in mockDisabledByUserManagerRestriction()
752 private void mockDisabledByDevicePolicyManagerRestriction(String restriction) { in mockDisabledByDevicePolicyManagerRestriction() argument
753 when(mMockUserManager.hasUserRestriction(restriction)).thenReturn(true); in mockDisabledByDevicePolicyManagerRestriction()
754 when(mMockUserManager.hasBaseUserRestriction(eq(restriction), any())).thenReturn(false); in mockDisabledByDevicePolicyManagerRestriction()
/packages/apps/Car/Settings/src/com/android/car/settings/enterprise/
DActionDisabledByAdminDialogFragment.java70 public static ActionDisabledByAdminDialogFragment newInstance(String restriction, in newInstance() argument
73 instance.mRestriction = restriction; in newInstance()
173 String restriction) { in setAdminSupportTitle() argument
174 builder.setTitle(mActionDisabledByAdminController.getAdminSupportTitle(restriction)); in setAdminSupportTitle()
DActionDisabledByAdminActivity.java43 String restriction = getRestrictionFromIntent(getIntent()); in onCreate() local
44 ActionDisabledByAdminDialogFragment.newInstance(restriction, getUserId()) in onCreate()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/
DApplicationActionButtonsPreferenceController.java451 private Boolean shouldDisableButtonBecauseOfUserRestriction(String button, String restriction) { in shouldDisableButtonBecauseOfUserRestriction() argument
452 if (!mUserManager.hasUserRestriction(restriction)) return null; in shouldDisableButtonBecauseOfUserRestriction()
456 if (mUserManager.hasBaseUserRestriction(restriction, user)) { in shouldDisableButtonBecauseOfUserRestriction()
457 LOG.d(button + " disabled because " + user + " has " + restriction + " restriction"); in shouldDisableButtonBecauseOfUserRestriction()
461 LOG.d(button + " NOT disabled because " + user + " has " + restriction + " restriction but " in shouldDisableButtonBecauseOfUserRestriction()
463 mRestriction = restriction; in shouldDisableButtonBecauseOfUserRestriction()
/packages/apps/Settings/src/com/android/settings/display/
DTopLevelWallpaperPreferenceController.java124 final String restriction = DISALLOW_SET_WALLPAPER; in disablePreferenceIfManaged() local
128 restriction, UserHandle.myUserId())) { in disablePreferenceIfManaged()
132 pref.checkRestrictionAndSetDisabled(restriction); in disablePreferenceIfManaged()
DWallpaperPreferenceController.java128 final String restriction = DISALLOW_SET_WALLPAPER; in disablePreferenceIfManaged() local
132 restriction, UserHandle.myUserId())) { in disablePreferenceIfManaged()
135 pref.checkRestrictionAndSetDisabled(restriction); in disablePreferenceIfManaged()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/
DFactoryResetEntryPreferenceControllerTest.java295 private void addBaseUserRestriction(String restriction) { in addBaseUserRestriction() argument
297 restriction, UserHandle.of(mContext.getUserId()))).thenReturn(true); in addBaseUserRestriction()
300 private void addUserRestriction(String restriction) { in addUserRestriction() argument
301 when(mMockUserManager.hasUserRestriction(restriction)).thenReturn(true); in addUserRestriction()
/packages/apps/Settings/src/com/android/settings/bluetooth/
DRestrictionUtils.java38 public EnforcedAdmin checkIfRestrictionEnforced(Context context, String restriction) { in checkIfRestrictionEnforced() argument
40 context, restriction, UserHandle.myUserId()); in checkIfRestrictionEnforced()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/
DPermissionsPreferenceControllerTest.java136 PreferenceGroup preferenceGroup, String restriction) { in getPreferenceForRestriction() argument
139 if (restriction.equals(preference.getExtras().getString( in getPreferenceForRestriction()
/packages/apps/EmergencyInfo/src/com/android/emergency/preferences/
DEditUserPhotoController.java420 public RestrictedMenuItem(Context context, String title, String restriction, in RestrictedMenuItem() argument
428 restriction, myUserId); in RestrictedMenuItem()
430 restriction, myUserId); in RestrictedMenuItem()
/packages/apps/Settings/src/com/android/settings/
DUserCredentialsSettings.java148 final String restriction = UserManager.DISALLOW_CONFIG_CREDENTIALS; in onCreateDialog() local
150 if (!RestrictedLockUtilsInternal.hasBaseUserRestriction(getContext(), restriction, in onCreateDialog()
155 .checkIfRestrictionEnforced(getContext(), restriction, myUserId); in onCreateDialog()
/packages/modules/Wifi/framework/java/android/net/wifi/hotspot2/pps/
DUpdateParameter.java119 public void setRestriction(String restriction) { in setRestriction() argument
120 mRestriction = restriction; in setRestriction()
/packages/apps/Contacts/
DAndroid.bp7 // every license restriction, it may not be entirely correct.
/packages/apps/SecureElement/
DAndroid.bp7 // every license restriction, it may not be entirely correct.
/packages/modules/GeoTZ/
DAndroid.bp22 // every license restriction, it may not be entirely correct.

12