/packages/apps/Car/Settings/src/com/android/car/settings/enterprise/ |
D | EnterpriseUtils.java | 127 public static int getAvailabilityStatusRestricted(Context context, String restriction) { in getAvailabilityStatusRestricted() argument 128 if (hasUserRestrictionByUm(context, restriction)) { in getAvailabilityStatusRestricted() 131 if (hasUserRestrictionByDpm(context, restriction)) { in getAvailabilityStatusRestricted() 144 public static boolean hasUserRestrictionByDpm(Context context, String restriction) { in hasUserRestrictionByDpm() argument 145 if (hasUserRestrictionByUm(context, restriction)) { in hasUserRestrictionByDpm() 148 return getUserManager(context).hasUserRestriction(restriction); in hasUserRestrictionByDpm() 155 public static boolean hasUserRestrictionByUm(Context context, String restriction) { in hasUserRestrictionByUm() argument 157 .hasBaseUserRestriction(restriction, UserHandle.of(context.getUserId())); in hasUserRestrictionByUm() 162 String restriction) { in onClickWhileDisabled() argument 163 if (hasUserRestrictionByDpm(context, restriction)) { in onClickWhileDisabled() [all …]
|
D | ActionDisabledByAdminDialogFragment.java | 78 public static ActionDisabledByAdminDialogFragment newInstance(String restriction, in newInstance() argument 80 return newInstance(restriction, null, userId); in newInstance() 86 public static ActionDisabledByAdminDialogFragment newInstance(String restriction, in newInstance() argument 89 instance.mRestriction = restriction; in newInstance() 216 String restriction) { in setAdminSupportTitle() argument 217 builder.setTitle(mActionDisabledByAdminController.getAdminSupportTitle(restriction)); in setAdminSupportTitle()
|
D | ActionDisabledByAdminActivity.java | 45 String restriction = getRestrictionFromIntent(getIntent()); in onCreate() local 47 EnterpriseUtils.getActionDisabledByAdminDialog(this, restriction); in onCreate()
|
/packages/modules/Telephony/services/QualifiedNetworksService/src/com/android/telephony/qns/ |
D | RestrictManager.java | 235 Restriction restriction = (Restriction) message.obj; in handleMessage() local 241 + restrictTypeToString(restriction.mRestrictType)); in handleMessage() 242 if (restriction in handleMessage() 246 .get(restriction.mRestrictType)) { in handleMessage() 247 releaseRestriction(transportType, restriction.mRestrictType); in handleMessage() 249 .getOrDefault(restriction, INVALID_ID)); in handleMessage() 250 mRestrictionTimers.remove(restriction); in handleMessage() 450 for (Restriction restriction : mRestrictionMap.values()) { in toString() 451 builder.append(restriction.toString()).append(" "); in toString() 684 Restriction restriction = in onLowRtpQualityEvent() local [all …]
|
/packages/apps/Settings/src/com/android/settings/enterprise/ |
D | ActionDisabledByAdminDialogHelper.java | 65 public ActionDisabledByAdminDialogHelper(Activity activity, String restriction) { in ActionDisabledByAdminDialogHelper() argument 70 .createInstance(mActivity, restriction, in ActionDisabledByAdminDialogHelper() 90 public AlertDialog.Builder prepareDialogBuilder(String restriction, in prepareDialogBuilder() argument 98 prepareDialogBuilder(builder, restriction, enforcedAdmin); in prepareDialogBuilder() 103 void prepareDialogBuilder(AlertDialog.Builder builder, String restriction, in prepareDialogBuilder() argument 109 mRestriction = restriction; in prepareDialogBuilder() 115 public void updateDialog(String restriction, EnforcedAdmin admin) { in updateDialog() argument 116 if (mEnforcedAdmin.equals(admin) && Objects.equals(mRestriction, restriction)) { in updateDialog() 120 mRestriction = restriction; in updateDialog() 126 String restriction) { in initializeDialogViews() argument [all …]
|
D | ActionDisabledByAdminDialog.java | 39 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/Car/Settings/tests/unit/src/com/android/car/settings/testutils/ |
D | EnterpriseTestUtils.java | 29 public static void mockUserRestrictionSetByUm(UserManager um, String restriction, in mockUserRestrictionSetByUm() argument 31 when(um.hasBaseUserRestriction(eq(restriction), any())) in mockUserRestrictionSetByUm() 36 when(um.hasUserRestriction(restriction)).thenReturn(restricted); in mockUserRestrictionSetByUm() 40 public static void mockUserRestrictionSetByDpm(UserManager um, String restriction, in mockUserRestrictionSetByDpm() argument 42 mockUserRestrictionSetByUm(um, restriction, false); in mockUserRestrictionSetByDpm() 43 when(um.hasUserRestriction(restriction)).thenReturn(restricted); in mockUserRestrictionSetByDpm()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/ |
D | ActionDisabledByAdminDialogHelper.java | 71 public AlertDialog.Builder prepareDialogBuilder(String restriction, in prepareDialogBuilder() argument 74 mRestriction = restriction; in prepareDialogBuilder() 100 public void updateDialog(String restriction, EnforcedAdmin admin) { in updateDialog() argument 101 if (mEnforcedAdmin.equals(admin) && Objects.equals(mRestriction, restriction)) { in updateDialog() 105 mRestriction = restriction; in updateDialog() 111 String restriction) { in initializeDialogViews() argument 116 setAdminSupportTitle(root, restriction); in initializeDialogViews() 129 void setAdminSupportTitle(View root, String restriction) { in setAdminSupportTitle() argument 134 if (restriction == null) { in setAdminSupportTitle() 138 switch (restriction) { in setAdminSupportTitle()
|
D | ActionDisabledByAdminDialog.java | 41 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/libs/car-helper-lib/src/com/android/car/internal/user/ |
D | UserHelper.java | 86 for (String restriction : DEFAULT_NON_ADMIN_RESTRICTIONS) { in grantAdminPermissions() 87 userManager.setUserRestriction(restriction, /* enable= */ false, user); in grantAdminPermissions() 89 for (String restriction : OPTIONAL_NON_ADMIN_RESTRICTIONS) { in grantAdminPermissions() 90 userManager.setUserRestriction(restriction, /* enable= */ false, user); in grantAdminPermissions() 107 for (String restriction : DEFAULT_NON_ADMIN_RESTRICTIONS) { in setDefaultNonAdminRestrictions() 108 userManager.setUserRestriction(restriction, enable, user); in setDefaultNonAdminRestrictions()
|
/packages/modules/DeviceLock/DeviceLockController/src/com/android/devicelockcontroller/policy/ |
D | UserRestrictionsPolicyHandler.java | 165 String restriction = restrictions.valueAt(i); 166 if (userRestrictionBundle.getBoolean(restriction, false) != enable) { 168 mDpm.addUserRestriction(null /* admin */, restriction); 169 LogUtil.v(TAG, String.format(Locale.US, "enable %s restriction", restriction)); 171 mDpm.clearUserRestriction(null /* admin */, restriction); 172 LogUtil.v(TAG, String.format(Locale.US, "clear %s restriction", restriction));
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/qc/ |
D | BaseSettingsQCItemTestCase.java | 53 protected void setBaseUserRestriction(String restriction, boolean restricted) { in setBaseUserRestriction() argument 54 when(mUm.hasBaseUserRestriction(eq(restriction), any())).thenReturn(restricted); in setBaseUserRestriction() 58 protected void setUserRestriction(String restriction, boolean restricted) { in setUserRestriction() argument 59 when(mUm.hasUserRestriction(restriction)).thenReturn(restricted); in setUserRestriction()
|
/packages/apps/Settings/tests/robotests/testutils/com/android/settings/testutils/shadow/ |
D | ShadowUserManager.java | 147 public void addBaseUserRestriction(String restriction) { in addBaseUserRestriction() argument 148 mBaseRestrictions.add(restriction); in addBaseUserRestriction() 167 public void addGuestUserRestriction(String restriction) { in addGuestUserRestriction() argument 168 mDefaultGuestUserRestriction.putBoolean(restriction, true); in addGuestUserRestriction() 171 public boolean hasGuestUserRestriction(String restriction, boolean expectedValue) { in hasGuestUserRestriction() argument 172 return mDefaultGuestUserRestriction.containsKey(restriction) in hasGuestUserRestriction() 173 && mDefaultGuestUserRestriction.getBoolean(restriction) == expectedValue; in hasGuestUserRestriction()
|
/packages/apps/Car/Settings/src/com/android/car/settings/qc/ |
D | QCUtils.java | 53 public static PendingIntent getActionDisabledDialogIntent(Context context, String restriction) { in getActionDisabledDialogIntent() argument 54 return getActionDisabledDialogIntent(context, restriction, /* requestCode= */ 0); in getActionDisabledDialogIntent() 61 public static PendingIntent getActionDisabledDialogIntent(Context context, String restriction, in getActionDisabledDialogIntent() argument 65 intent.putExtra(DevicePolicyManager.EXTRA_RESTRICTION, restriction); in getActionDisabledDialogIntent()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
D | ActionDisabledByAdminDialogTest.java | 65 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/services/Car/tests/carservice_unit_test/src/com/android/car/internal/user/ |
D | UserHelperTest.java | 156 for (String restriction : UserHelper.DEFAULT_NON_ADMIN_RESTRICTIONS) { in testGrantingAdminPermissionsRemovesNonAdminRestrictions() 157 verify(mUserManager).setUserRestriction(restriction, restrictionEnabled, in testGrantingAdminPermissionsRemovesNonAdminRestrictions() 160 for (String restriction : UserHelper.DEFAULT_NON_ADMIN_RESTRICTIONS) { in testGrantingAdminPermissionsRemovesNonAdminRestrictions() 161 verify(mUserManager).setUserRestriction(restriction, restrictionEnabled, in testGrantingAdminPermissionsRemovesNonAdminRestrictions()
|
/packages/services/Car/tests/CarTestDpc/src/com/android/car/testdpc/ |
D | DpcShellCommand.java | 193 String restriction = mArgs[3]; in runAddUserRestriction() local 203 Log.d(TAG, targetDpm.getUser() + ": addUserRestriction(" + restriction + ")"); in runAddUserRestriction() 205 targetDpm.addUserRestriction(restriction); in runAddUserRestriction() 209 String restriction = mArgs[1]; in runClearUserRestriction() local 210 Log.i(TAG, "Calling clearUserRestriction(" + restriction + ")"); in runClearUserRestriction() 211 mDpm.clearUserRestriction(mAdmin, restriction); in runClearUserRestriction()
|
D | DpcActivity.java | 108 String restriction = mKey.getText().toString(); in uiAddUserRestriction() local 124 targetDpm.addUserRestriction(restriction); in uiAddUserRestriction() 125 showToast("%s: addUserRestriction(%s)", targetDpm.getUser(), restriction); in uiAddUserRestriction() 127 showToast(e, "Exception when calling addUserRestriction(%s)", restriction); in uiAddUserRestriction()
|
/packages/apps/Car/Launcher/libs/car-launcher-common/src/com/android/car/carlaunchercommon/shortcuts/ |
D | ForceStopShortcutItem.kt | 163 val restriction = UserManager.DISALLOW_APPS_CONTROL in <lambda>() constant 169 if (!userManager.hasUserRestriction(restriction)) { in <lambda>() 173 if (hasBaseUserRestriction(userManager, restriction, user)) { in <lambda>() 174 if (DEBUG) Log.d(TAG, " Disabled because $user has $restriction restriction") in <lambda>()
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | RestrictionUtils.java | 38 public EnforcedAdmin checkIfRestrictionEnforced(Context context, String restriction) { in checkIfRestrictionEnforced() argument 40 context, restriction, UserHandle.myUserId()); in checkIfRestrictionEnforced()
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/enterprise/ |
D | ManagedDeviceActionDisabledByAdminController.java | 125 public String getAdminSupportTitle(@Nullable String restriction) { in getAdminSupportTitle() argument 126 if (restriction == null) { in getAdminSupportTitle() 129 switch (restriction) { in getAdminSupportTitle()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/ |
D | UserRestrictionsFragment.java | 90 String restriction = item.getKey(); in onViewCreated() 92 userManager.setUserRestriction(restriction, added); in onViewCreated() 94 restrictions.add(restriction); in onViewCreated()
|
/packages/apps/Settings/src/com/android/settings/display/ |
D | TopLevelWallpaperPreferenceController.java | 132 final String restriction = DISALLOW_SET_WALLPAPER; in disablePreferenceIfManaged() local 136 restriction, UserHandle.myUserId())) { in disablePreferenceIfManaged() 140 pref.checkRestrictionAndSetDisabled(restriction); in disablePreferenceIfManaged()
|
D | WallpaperPreferenceController.java | 137 final String restriction = DISALLOW_SET_WALLPAPER; in disablePreferenceIfManaged() local 141 restriction, UserHandle.myUserId())) { in disablePreferenceIfManaged() 144 pref.checkRestrictionAndSetDisabled(restriction); in disablePreferenceIfManaged()
|
/packages/apps/Car/Launcher/libs/hidden-apis-compat/hidden-apis-enabled/src/com/android/car/hidden/apis/ |
D | HiddenApiAccess.java | 58 public static boolean hasBaseUserRestriction(UserManager userManager, String restriction, in hasBaseUserRestriction() argument 60 return userManager.hasBaseUserRestriction(restriction, user); in hasBaseUserRestriction()
|