Home
last modified time | relevance | path

Searched refs:hasUserRestriction (Results 1 – 25 of 92) sorted by relevance

1234

/packages/apps/Settings/tests/robotests/src/com/android/settings/development/
DBugReportInPowerPreferenceControllerTest.java73 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()
DBugReportPreferenceControllerTest.java53 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/
DLocationEnablerTest.java125 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/
DExternalSourcesDetailsTest.java188 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/
DCarUserManagerHelperTest.java222 .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/
DNetworkResetRestrictionChecker.java49 boolean hasUserRestriction() { in hasUserRestriction() method in NetworkResetRestrictionChecker
55 return hasUserRestriction() in hasRestriction()
DNetworkResetPreferenceController.java36 return !mRestrictionChecker.hasUserRestriction(); in isAvailable()
/packages/apps/Settings/src/com/android/settings/network/
DNetworkResetRestrictionChecker.java49 boolean hasUserRestriction() { in hasUserRestriction() method in NetworkResetRestrictionChecker
55 return hasUserRestriction() in hasRestriction()
DNetworkResetPreferenceController.java36 return !mRestrictionChecker.hasUserRestriction(); in isAvailable()
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DNetworkResetPreferenceControllerTest.java52 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/
DFirmwareVersionDetailPreferenceControllerTest.java74 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/
DFeatures.java109 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/
DCarUserManagerHelper.java610 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/
DPermissionsPreferenceControllerTest.java121 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/
DDisallowAddUserTaskTest.java68 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/
DRestrictedDashboardFragment.java190 return mUserManager.hasUserRestriction(mRestrictionKey) in isRestrictedAndNotProviderProtected()
206 || mUserManager.hasUserRestriction(mRestrictionKey); in shouldBeProviderProtected()
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/usb/
DUsbBackendTest.java161 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/
DRestrictedSettingsFragment.java196 return mUserManager.hasUserRestriction(mRestrictionKey) in isRestrictedAndNotProviderProtected()
212 || mUserManager.hasUserRestriction(mRestrictionKey); in shouldBeProviderProtected()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/connecteddevice/usb/
DUsbBackend.java181 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/
DRestrictedDashboardFragment.java190 return mUserManager.hasUserRestriction(mRestrictionKey) in isRestrictedAndNotProviderProtected()
206 || mUserManager.hasUserRestriction(mRestrictionKey); in shouldBeProviderProtected()
/packages/apps/Settings/src/com/android/settings/connecteddevice/usb/
DUsbBackend.java181 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/
DRestrictedSettingsFragment.java196 return mUserManager.hasUserRestriction(mRestrictionKey) in isRestrictedAndNotProviderProtected()
212 || mUserManager.hasUserRestriction(mRestrictionKey); in shouldBeProviderProtected()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothDevicePreferenceTest.java153 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/
DApnSettingsActivity.java156 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/
DAboutFragment.java261 if (mUm.hasUserRestriction(UserManager.DISALLOW_FUN)) { in onPreferenceTreeClick()
284 if (mUm.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES)) { in onPreferenceTreeClick()

1234