/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | BugReportInPowerPreferenceControllerTest.java | 73 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true); in isAvailable_hasDebugRestriction_shouldReturnFalse() 80 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in isAvailable_noDebugRestriction_shouldReturnTrue() 87 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in onDeveloperOptionsSwitchDisabled_preferenceShouldNotBeChecked() 97 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in onPreferenceChanged_settingDisabled_shouldDisableBugReportInPowerSetting() 109 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in onPreferenceChanged_settingEnabled_shouldEnableBugReportInPowerSetting() 122 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in updateState_settingsOn_preferenceShouldBeChecked() 134 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in updateState_settingsOff_preferenceShouldNotBeChecked() 146 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in onDeveloperOptionsSwitchDisabled_shouldTurnOffPreference()
|
D | BugReportPreferenceControllerTest.java | 53 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true); in isAvailable_hasDebugRestriction_shouldBeFalse() 60 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in isAvailable_noDebugRestriction_shouldBeTrue()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/ |
D | LocationEnablerTest.java | 125 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true); in isEnabled_restricted_shouldReturnFalse() 132 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in isEnabled_locationNotRestricted_shouldReturnTrue() 146 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in setLocationEnabled_notRestricted_shouldRefreshLocation() 156 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in setLocationEnabled_notRestricted_shouldBroadcastUpdateAndSetChanger()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | ExternalSourcesDetailsTest.java | 188 assertThat(userManager.hasUserRestriction( in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 227 assertThat(userManager.hasUserRestriction( in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference() 268 assertThat(userManager.hasUserRestriction( in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference() 271 assertThat(userManager.hasUserRestriction( in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference()
|
/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/ |
D | CarUserManagerHelperTest.java | 222 .hasUserRestriction(UserManager.DISALLOW_ADD_USER); in testCurrentProcessCanAddUsers() 226 .hasUserRestriction(UserManager.DISALLOW_ADD_USER); in testCurrentProcessCanAddUsers() 233 .hasUserRestriction(UserManager.DISALLOW_REMOVE_USER); in testCurrentProcessCanRemoveUsers() 237 .hasUserRestriction(UserManager.DISALLOW_REMOVE_USER); in testCurrentProcessCanRemoveUsers() 244 .hasUserRestriction(UserManager.DISALLOW_USER_SWITCH); in testCurrentProcessCanSwitchUsers() 248 .hasUserRestriction(UserManager.DISALLOW_USER_SWITCH); in testCurrentProcessCanSwitchUsers() 275 .hasUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS); in testCurrentDisallowModifyAccountsProcessIsEnforced() 582 doReturn(true).when(mUserManager).hasUserRestriction(UserManager.DISALLOW_USER_SWITCH); in testCannotSwitchIfSwitchingNotAllowed()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/ |
D | NetworkResetRestrictionChecker.java | 49 boolean hasUserRestriction() { in hasUserRestriction() method in NetworkResetRestrictionChecker 55 return hasUserRestriction() in hasRestriction()
|
D | NetworkResetPreferenceController.java | 36 return !mRestrictionChecker.hasUserRestriction(); in isAvailable()
|
/packages/apps/Settings/src/com/android/settings/network/ |
D | NetworkResetRestrictionChecker.java | 49 boolean hasUserRestriction() { in hasUserRestriction() method in NetworkResetRestrictionChecker 55 return hasUserRestriction() in hasRestriction()
|
D | NetworkResetPreferenceController.java | 36 return !mRestrictionChecker.hasUserRestriction(); in isAvailable()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | NetworkResetPreferenceControllerTest.java | 52 when(mRestrictionChecker.hasUserRestriction()).thenReturn(true); in testIsAvailable_shouldReturnTrueWhenNoUserRestriction() 56 when(mRestrictionChecker.hasUserRestriction()).thenReturn(false); in testIsAvailable_shouldReturnTrueWhenNoUserRestriction()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/ |
D | FirmwareVersionDetailPreferenceControllerTest.java | 74 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_FUN)).thenReturn(true); in handleSettingClicked_userRestricted_shouldDoNothing() 85 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_FUN)).thenReturn(false); in handleSettingClicked_userNotRestricted_shouldStartActivity()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | Features.java | 109 return !mUserMgr.hasUserRestriction(UserManager.DISALLOW_FUN); in isFunPolicyEnabled() 113 return !mUserMgr.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES); in isDebugPolicyEnabled()
|
/packages/services/Car/user/car-user-lib/src/android/car/userlib/ |
D | CarUserManagerHelper.java | 610 public boolean hasUserRestriction(String restriction, UserInfo userInfo) { in hasUserRestriction() method in CarUserManagerHelper 611 return mUserManager.hasUserRestriction(restriction, userInfo.getUserHandle()); in hasUserRestriction() 621 return hasUserRestriction(restriction, getCurrentForegroundUserInfo()); in foregroundUserHasUserRestriction() 702 return mUserManager.hasUserRestriction(restriction); in isCurrentProcessUserHasRestriction()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/users/ |
D | PermissionsPreferenceControllerTest.java | 121 assertThat(mCarUserManagerHelper.hasUserRestriction(TEST_RESTRICTION, TEST_USER)).isFalse(); in testOnPreferenceChange_changeToFalse() 130 assertThat(mCarUserManagerHelper.hasUserRestriction(TEST_RESTRICTION, TEST_USER)).isTrue(); in testOnPreferenceChange_changeToTrue()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | DisallowAddUserTaskTest.java | 68 when(mockUserManager.hasUserRestriction(anyString(), any(UserHandle.class))) in setUp() 100 when(mockUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER, in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/dashboard/ |
D | RestrictedDashboardFragment.java | 190 return mUserManager.hasUserRestriction(mRestrictionKey) in isRestrictedAndNotProviderProtected() 206 || mUserManager.hasUserRestriction(mRestrictionKey); in shouldBeProviderProtected()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/usb/ |
D | UsbBackendTest.java | 161 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER)) in areFunctionsSupported_fileTransferDisallowed_shouldReturnFalse() 174 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER)) in areFunctionsSupported_fileTransferAllowed_shouldReturnTrue()
|
/packages/apps/Settings/src/com/android/settings/ |
D | RestrictedSettingsFragment.java | 196 return mUserManager.hasUserRestriction(mRestrictionKey) in isRestrictedAndNotProviderProtected() 212 || mUserManager.hasUserRestriction(mRestrictionKey); in shouldBeProviderProtected()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/connecteddevice/usb/ |
D | UsbBackend.java | 181 return userManager.hasUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER); in isUsbFileTransferRestricted() 185 return userManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING); in isUsbTetheringRestricted()
|
/packages/apps/Settings/src/com/android/settings/dashboard/ |
D | RestrictedDashboardFragment.java | 190 return mUserManager.hasUserRestriction(mRestrictionKey) in isRestrictedAndNotProviderProtected() 206 || mUserManager.hasUserRestriction(mRestrictionKey); in shouldBeProviderProtected()
|
/packages/apps/Settings/src/com/android/settings/connecteddevice/usb/ |
D | UsbBackend.java | 181 return userManager.hasUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER); in isUsbFileTransferRestricted() 185 return userManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING); in isUsbTetheringRestricted()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/ |
D | RestrictedSettingsFragment.java | 196 return mUserManager.hasUserRestriction(mRestrictionKey) in isRestrictedAndNotProviderProtected() 212 || mUserManager.hasUserRestriction(mRestrictionKey); in shouldBeProviderProtected()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothDevicePreferenceTest.java | 153 when(um.hasUserRestriction(UserManager.DISALLOW_CONFIG_BLUETOOTH)).thenReturn(true); in shouldHideSecondTarget_hasUserRestriction_shouldReturnTrue() 163 when(um.hasUserRestriction(UserManager.DISALLOW_CONFIG_BLUETOOTH)).thenReturn(false); in shouldHideSecondTarget_hasBoundDeviceAndNoRestriction_shouldReturnFalse()
|
/packages/apps/Messaging/src/com/android/messaging/ui/appsettings/ |
D | ApnSettingsActivity.java | 156 if (!mUm.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS)) { in onCreate() 176 mUm.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS)) { in onActivityCreated()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/about/ |
D | AboutFragment.java | 261 if (mUm.hasUserRestriction(UserManager.DISALLOW_FUN)) { in onPreferenceTreeClick() 284 if (mUm.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES)) { in onPreferenceTreeClick()
|