Home
last modified time | relevance | path

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

123

/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/
H A DWifiEnterpriseRestrictionUtilsTest.java67 when(mUserManager.hasUserRestriction(DISALLOW_WIFI_TETHERING)).thenReturn(true); in isWifiTetheringAllowed_hasDisallowRestriction_shouldReturnFalse()
74 when(mUserManager.hasUserRestriction(DISALLOW_WIFI_TETHERING)).thenReturn(false); in isWifiTetheringAllowed_noDisallowRestriction_shouldReturnTrue()
81 when(mUserManager.hasUserRestriction(DISALLOW_WIFI_DIRECT)).thenReturn(true); in isWifiDirectAllowed_hasDisallowRestriction_shouldReturnFalse()
88 when(mUserManager.hasUserRestriction(DISALLOW_WIFI_DIRECT)).thenReturn(false); in isWifiDirectAllowed_noDisallowRestriction_shouldReturnTrue()
95 when(mUserManager.hasUserRestriction(DISALLOW_ADD_WIFI_CONFIG)).thenReturn(true); in isAddWifiConfigAllowed_hasDisallowRestriction_shouldReturnFalse()
102 when(mUserManager.hasUserRestriction(DISALLOW_ADD_WIFI_CONFIG)).thenReturn(false); in isAddWifiConfigAllowed_noDisallowRestriction_shouldReturnTrue()
109 when(mUserManager.hasUserRestriction(DISALLOW_CHANGE_WIFI_STATE)).thenReturn(true); in isChangeWifiStateAllowed_hasDisallowRestriction_shouldReturnFalse()
116 when(mUserManager.hasUserRestriction(DISALLOW_CHANGE_WIFI_STATE)).thenReturn(false); in isChangeWifiStateAllowed_noDisallowRestriction_shouldReturnTrue()
132 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false); in hasUserRestrictionFromT_setSDKForT_shouldReturnHasUserRestriction()
137 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true); in hasUserRestrictionFromT_setSDKForT_shouldReturnHasUserRestriction()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
H A DUserManagerServiceTest.java173 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, userId)).isTrue(); in assertHasUserRestriction()
176 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, userId)).isFalse(); in assertHasUserRestriction()
182 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, nonExistentUserId)) in testHasUserRestriction_NonExistentUserReturnsFalse()
192 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, incorrectId)) in testSetUserRestrictionWithIncorrectID()
195 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, incorrectId)) in testSetUserRestrictionWithIncorrectID()
H A DUserManagerServiceUserInfoTest.java318 assertFalse(mUserManagerService.hasUserRestriction(restriction, userId)); in testUserRestrictionsUpgradeFromV9()
337 assertTrue(mUserManagerService.hasUserRestriction(restriction, userId)); in testUserRestrictionsUpgradeFromV9()
/aosp14/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
H A DPackageHelperTestBase.kt100 whenever(rule.mocks().userManagerService.hasUserRestriction(
102 whenever(rule.mocks().userManagerService.hasUserRestriction(
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/development/
H A DDevelopmentSettingsEnabler.java47 final boolean hasRestriction = um.hasUserRestriction( in isDevelopmentSettingsEnabled()
/aosp14/frameworks/base/services/core/java/com/android/server/policy/
H A DPowerAction.java45 if (!um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { in onLongPress()
H A DRestartAction.java45 if (!um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { in onLongPress()
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
H A DWifiEnterpriseRestrictionUtils.java85 return userManager.hasUserRestriction(restrictionKey); in hasUserRestrictionFromT()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/
H A DAccessPointControllerImpl.java108 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_WIFI, in canConfigWifi()
113 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS, in canConfigMobileData()
/aosp14/frameworks/base/services/core/java/com/android/server/pm/
H A DRestrictionsSet.java193 boolean hasUserRestriction = mUserRestrictions.contains(userId); in remove()
195 return hasUserRestriction; in remove()
H A DUserRestrictionsUtils.java719 if (mUserManager.hasUserRestriction( in isSettingRestrictedForUser()
836 return mUserManager.hasUserRestriction(restriction, UserHandle.of(userId)); in isSettingRestrictedForUser()
898 return (newValue || UserManager.get(context).hasUserRestriction(userRestriction, in getNewUserRestrictionSetting()
H A DUserManagerInternal.java397 public abstract boolean hasUserRestriction(String restriction, int userId); in hasUserRestriction() method in UserManagerInternal
H A DSuspendPackageHelper.java482 || (!userManager.hasUserRestriction(UserManager.DISALLOW_APPS_CONTROL, userId) in isSuspendAllowedForUser()
483 && !userManager.hasUserRestriction(UserManager.DISALLOW_UNINSTALL_APPS, userId)); in isSuspendAllowedForUser()
/aosp14/frameworks/base/services/core/java/com/android/server/oemlock/
H A DPersistentDataBlockLock.java67 .hasUserRestriction(UserManager.DISALLOW_OEM_UNLOCK, UserHandle.SYSTEM); in isOemUnlockAllowedByCarrier()
H A DOemLockService.java258 .hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET, UserHandle.SYSTEM); in isOemUnlockAllowedByAdmin()
/aosp14/frameworks/base/services/tests/mockingservicestests/src/com/android/server/devicepolicy/
H A DFactoryResetterTest.java259 when(mUm.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)).thenReturn(false); in allowFactoryReset()
263 when(mUm.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)).thenReturn(true); in disallowFactoryReset()
/aosp14/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
H A DInstallNonMarketAppsDeprecationTest.java92 mHasUserRestriction = mUm.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES); in setUp()
/aosp14/frameworks/base/core/java/com/android/internal/app/
H A DConfirmUserCreationActivity.java105 boolean cantCreateUser = mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER) in checkUserCreationRequirements()
/aosp14/frameworks/base/packages/VpnDialogs/src/com/android/vpndialogs/
H A DConfirmDialog.java113 if (UserManager.get(this).hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN)) { in onCreate()
/aosp14/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
H A DFactoryResetter.java127 if (!mForce && um.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)) { in factoryResetInternalUnchecked()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DBluetoothControllerImpl.java120 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_BLUETOOTH, in canConfigBluetooth()
122 && !mUserManager.hasUserRestriction(UserManager.DISALLOW_BLUETOOTH, in canConfigBluetooth()
H A DLocationControllerImpl.java206 return um.hasUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, in isUserLocationRestricted()
/aosp14/frameworks/base/media/java/android/mtp/
H A DMtpDevice.java89 if (!userManager.hasUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER)) { in open()
/aosp14/frameworks/base/core/java/android/os/
H A DIUserManager.aidl93 boolean hasUserRestriction(in String restrictionKey, int userId); in hasUserRestriction() method
/aosp14/frameworks/base/services/core/java/com/android/server/timedetector/
H A DServiceConfigAccessorImpl.java275 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_DATE_TIME, userHandle); in isUserConfigAllowed()

123