Home
last modified time | relevance | path

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

1234

/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/
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()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerServiceTest.java172 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, userId)).isTrue(); in assertHasUserRestriction()
175 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, userId)).isFalse(); in assertHasUserRestriction()
181 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, nonExistentUserId)) in testHasUserRestriction_NonExistentUserReturnsFalse()
198 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, incorrectId)) in testSetUserRestrictionWithIncorrectID()
201 assertThat(mUserManagerService.hasUserRestriction(DISALLOW_USER_SWITCH, incorrectId)) in testSetUserRestrictionWithIncorrectID()
DUserManagerServiceUserInfoTest.java333 assertFalse(mUserManagerService.hasUserRestriction(restriction, userId)); in testUserRestrictionsUpgradeFromV9()
352 assertTrue(mUserManagerService.hasUserRestriction(restriction, userId)); in testUserRestrictionsUpgradeFromV9()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DTelephonyAdminReceiver.java42 mDisallowCellular2gRestriction = mUserManager.hasUserRestriction( in TelephonyAdminReceiver()
61 boolean shouldDisallow2g = mUserManager.hasUserRestriction( in onReceive()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DTelephonyAdminReceiverTest.java74 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_CELLULAR_2G)).thenReturn(false); in test_userRestrictionsNotChanged_noUpdate()
85 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_CELLULAR_2G)).thenReturn( in test_userRestrictionToggled_shouldUpdate()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
DPackageHelperTestBase.kt104 whenever(rule.mocks().userManagerService.hasUserRestriction( in setup()
106 whenever(rule.mocks().userManagerService.hasUserRestriction( in setup()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/development/
DDevelopmentSettingsEnabler.java47 final boolean hasRestriction = um.hasUserRestriction( in isDevelopmentSettingsEnabled()
/frameworks/base/services/core/java/com/android/server/policy/
DPowerAction.java45 if (!um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { in onLongPress()
DRestartAction.java45 if (!um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { in onLongPress()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
DWifiEnterpriseRestrictionUtils.java85 return userManager.hasUserRestriction(restrictionKey); in hasUserRestrictionFromT()
/frameworks/base/services/core/java/com/android/server/oemlock/
DPersistentDataBlockLock.java67 .hasUserRestriction(UserManager.DISALLOW_OEM_UNLOCK, UserHandle.SYSTEM); in isOemUnlockAllowedByCarrier()
DOemLockService.java258 .hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET, UserHandle.SYSTEM); in isOemUnlockAllowedByAdmin()
/frameworks/base/services/core/java/com/android/server/pm/
DRestrictionsSet.java193 boolean hasUserRestriction = mUserRestrictions.contains(userId); in remove()
195 return hasUserRestriction; in remove()
DUserManagerInternal.java398 public abstract boolean hasUserRestriction(String restriction, int userId); in hasUserRestriction() method in UserManagerInternal
DUserRestrictionsUtils.java792 if (mUserManager.hasUserRestriction( in isSettingRestrictedForUser()
908 return mUserManager.hasUserRestriction(restriction, UserHandle.of(userId)); in isSettingRestrictedForUser()
970 return (newValue || UserManager.get(context).hasUserRestriction(userRestriction, in getNewUserRestrictionSetting()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/
DAccessPointControllerImpl.java108 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_WIFI, in canConfigWifi()
113 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS, in canConfigMobileData()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/devicepolicy/
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()
/frameworks/base/core/java/com/android/internal/app/
DConfirmUserCreationActivity.java105 boolean cantCreateUser = mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER) in checkUserCreationRequirements()
/frameworks/base/packages/VpnDialogs/src/com/android/vpndialogs/
DConfirmDialog.java113 if (UserManager.get(this).hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN)) { in onCreate()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DInstallNonMarketAppsDeprecationTest.java104 mHasUserRestriction = mUm.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES); in setUp()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DFactoryResetter.java127 if (!mForce && um.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)) { in factoryResetInternalUnchecked()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImpl.java122 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_BLUETOOTH, in canConfigBluetooth()
124 && !mUserManager.hasUserRestriction(UserManager.DISALLOW_BLUETOOTH, in canConfigBluetooth()
/frameworks/base/media/java/android/mtp/
DMtpDevice.java89 if (!userManager.hasUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER)) { in open()
/frameworks/base/core/java/android/os/
DIUserManager.aidl95 boolean hasUserRestriction(in String restrictionKey, int userId); in hasUserRestriction() method
/frameworks/opt/net/wifi/libs/WifiTrackerLib/src/com/android/wifitrackerlib/
DOsuWifiEntry.java83 mHasAddConfigUserRestriction = mUserManager.hasUserRestriction( in OsuWifiEntry()

1234