Home
last modified time | relevance | path

Searched refs:setUserRestriction (Results 1 – 25 of 30) sorted by relevance

12

/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DDisallowAddUserTaskTest.java85 verify(mockUserManager).setUserRestriction(UserManager.DISALLOW_ADD_USER, true, in testMaybeDisallowAddUsers_normalSystem()
108 verify(mockUserManager, never()).setUserRestriction(anyString(), anyBoolean(), in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
126 verify(mockUserManager).setUserRestriction(UserManager.DISALLOW_ADD_USER, true, in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner()
128 verify(mockUserManager).setUserRestriction(UserManager.DISALLOW_ADD_USER, true, in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner()
145 verify(mockUserManager, never()).setUserRestriction(anyString(), anyBoolean(), in testMaybeDisallowAddUsers_splitUserSystem_systemDeviceOwner()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/users/
DPermissionsPreferenceControllerTest.java100 mCarUserManagerHelper.setUserRestriction(TEST_USER, TEST_RESTRICTION, true); in testRefreshUi_setToFalse()
110 mCarUserManagerHelper.setUserRestriction(TEST_USER, TEST_RESTRICTION, false); in testRefreshUi_setToTrue()
119 mCarUserManagerHelper.setUserRestriction(TEST_USER, TEST_RESTRICTION, true); in testOnPreferenceChange_changeToFalse()
128 mCarUserManagerHelper.setUserRestriction(TEST_USER, TEST_RESTRICTION, false); in testOnPreferenceChange_changeToTrue()
/packages/services/Car/user/car-user-lib/src/android/car/userlib/
DCarUserManagerHelper.java821 setUserRestriction(user, UserManager.DISALLOW_SMS, /* enable= */ false); in createNewNonAdminUser()
822 setUserRestriction(user, UserManager.DISALLOW_OUTGOING_CALLS, /* enable= */ false); in createNewNonAdminUser()
836 setUserRestriction(userInfo, restriction, enable); in setDefaultNonAdminRestrictions()
848 setUserRestriction(userInfo, restriction, enable); in setOptionalNonAdminRestrictions()
860 public void setUserRestriction(UserInfo userInfo, String restriction, boolean enable) { in setUserRestriction() method in CarUserManagerHelper
862 mUserManager.setUserRestriction(restriction, enable, userHandle); in setUserRestriction()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DExternalSourcesDetailsTest.java176 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference()
215 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference()
254 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference()
256 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/users/
DUserDetailsSettings.java153 mUserManager.setUserRestriction( in enableCallsAndSms()
160 mUserManager.setUserRestriction(UserManager.DISALLOW_OUTGOING_CALLS, !enabled, in enableCallsAndSms()
162 mUserManager.setUserRestriction(UserManager.DISALLOW_SMS, !enabled, userHandle); in enableCallsAndSms()
DRestrictionUtils.java81 um.setUserRestriction(entry.getKey(), !entry.getSelectedState(), user); in setRestrictions()
/packages/apps/Settings/src/com/android/settings/users/
DUserDetailsSettings.java153 mUserManager.setUserRestriction( in enableCallsAndSms()
160 mUserManager.setUserRestriction(UserManager.DISALLOW_OUTGOING_CALLS, !enabled, in enableCallsAndSms()
162 mUserManager.setUserRestriction(UserManager.DISALLOW_SMS, !enabled, userHandle); in enableCallsAndSms()
DRestrictionUtils.java81 um.setUserRestriction(entry.getKey(), !entry.getSelectedState(), user); in setRestrictions()
/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/
DCarUserManagerHelperTest.java639 mCarUserManagerHelper.setUserRestriction( in testSetUserRestriction()
641 verify(mUserManager).setUserRestriction( in testSetUserRestriction()
644 mCarUserManagerHelper.setUserRestriction( in testSetUserRestriction()
646 verify(mUserManager).setUserRestriction( in testSetUserRestriction()
660 verify(mUserManager).setUserRestriction( in testDefaultNonAdminRestrictions()
662 verify(mUserManager).setUserRestriction( in testDefaultNonAdminRestrictions()
664 verify(mUserManager).setUserRestriction( in testDefaultNonAdminRestrictions()
699 verify(mUserManager).setUserRestriction( in testGrantingAdminPermissionsRemovesNonAdminRestrictions()
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/
DUserCapabilitiesTest.java49 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in disallowUserSwitch_restrictionIsSet_true()
60 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in disallowUserSwitch_restrictionIsNotSet_false()
DMultiUserSwitchBarControllerTest.java64 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in onStart_disallowUserSwitch_shouldSetDisabledByAdmin()
75 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in onStart_allowUserSwitch_shouldNotSetDisabledByAdmin()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/system/
DDeveloperOptionsEntryPreferenceControllerTest.java71 new CarUserManagerHelper(mContext).setUserRestriction(mUserInfo, in setUp()
98 new CarUserManagerHelper(mContext).setUserRestriction(mUserInfo, in testGetAvailabilityStatus_devOptionsEnabled_hasUserRestriction_isUnavailable()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserServiceTest.java151 .setUserRestriction(systemUser, UserManager.DISALLOW_MODIFY_ACCOUNTS, true); in testDisableModifyAccountsForHeadlessSystemUserOnFirstRun()
169 .setUserRestriction(systemUser, UserManager.DISALLOW_MODIFY_ACCOUNTS, true); in testDisableModifyAccountsForRegularSystemUserOnFirstRun()
187 .setUserRestriction(systemUser, UserManager.DISALLOW_MODIFY_ACCOUNTS, true); in testDoesNotSetSystemUserRestrictions_IfRestrictionsAlreadySet()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/specialaccess/deviceadmin/
DDeviceAdminAdd.java506 mAppOps.setUserRestriction(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, true, mToken); in onResume()
507 mAppOps.setUserRestriction(AppOpsManager.OP_TOAST_WINDOW, true, mToken); in onResume()
516 mAppOps.setUserRestriction(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, false, mToken); in onPause()
517 mAppOps.setUserRestriction(AppOpsManager.OP_TOAST_WINDOW, false, mToken); in onPause()
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/deviceadmin/
DDeviceAdminAdd.java557 mAppOps.setUserRestriction(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, true, mToken); in onResume()
558 mAppOps.setUserRestriction(AppOpsManager.OP_TOAST_WINDOW, true, mToken); in onResume()
567 mAppOps.setUserRestriction(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, false, mToken); in onPause()
568 mAppOps.setUserRestriction(AppOpsManager.OP_TOAST_WINDOW, false, mToken); in onPause()
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/
DLocationForWorkPreferenceControllerTest.java97 .setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, false, mUserHandle); in handlePreferenceTreeClick_preferenceChecked_shouldSetRestrictionAndOnSummary()
109 .setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, true, mUserHandle); in handlePreferenceTreeClick_preferenceUnchecked_shouldSetRestritionAndOffSummary()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/ota/
DOtaControllerTest.java178 verify(mUserManager).setUserRestriction(UserManager.DISALLOW_WALLPAPER, true, in testManagedProfileWithoutMissingSystemIme()
215 verify(mUserManager).setUserRestriction(UserManager.DISALLOW_WALLPAPER, true, in testManagedProfileWithMissingSystemIme()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/
DRestrictionUtils.java73 um.setUserRestriction(entry.getKey(), !entry.getSelectedState(), user); in setRestrictions()
DRestrictedProfileModel.java149 mUserManager.setUserRestriction( in updateBackgroundRestriction()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
DDisallowAddUserTask.java73 mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_USER, true, userHandle); in run()
DManagedProfileSettingsTask.java80 um.setUserRestriction(UserManager.DISALLOW_WALLPAPER, true, UserHandle.of(userId)); in run()
/packages/apps/Settings/src/com/android/settings/location/
DLocationForWorkPreferenceController.java48 mUserManager.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, !switchState, in handlePreferenceTreeClick()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/location/
DLocationForWorkPreferenceController.java48 mUserManager.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, !switchState, in handlePreferenceTreeClick()
/packages/apps/Car/Settings/src/com/android/car/settings/users/
DPermissionsPreferenceController.java94 getCarUserManagerHelper().setUserRestriction(getUserInfo(), in PermissionsPreferenceController()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/
DUsersFragment.java79 userManager.setUserRestriction(item.getKey(), item.getIsChecked()); in onViewCreated()

12