Home
last modified time | relevance | path

Searched refs:mUserManager (Results 1 – 25 of 123) sorted by relevance

12345

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerTest.java83 private UserManager mUserManager = null; field in UserManagerTest
89 mUserManager = UserManager.get(mContext); in setUp()
125 List<UserInfo> list = mUserManager.getUsers(); in removeExistingUsers()
146 List<UserInfo> list = mUserManager.getUsers(); in testAddGuest()
187 mUserManager.removeUser(user); in testRemoveUserByHandle()
189 while (mUserManager.getUserInfo(user.getIdentifier()) != null) { in testRemoveUserByHandle()
208 assertThrows(IllegalArgumentException.class, () -> mUserManager.removeUser(null)); in testRemoveUserByHandle_ThrowsException()
282 UserInfo foundGuest = mUserManager.findCurrentGuestUser(); in testFindExistingGuest_guestExists()
289 UserInfo foundGuest = mUserManager.findCurrentGuestUser(); in testFindExistingGuest_guestDoesNotExist()
299 mUserManager.setUserAdmin(userInfo.id); in testSetUserAdmin()
[all …]
DUserLifecycleStressTest.java55 private UserManager mUserManager; field in UserLifecycleStressTest
61 mUserManager = mContext.getSystemService(UserManager.class); in setup()
73 final UserInfo userInfo = mUserManager.createProfileForUser("TestUser", in stopManagedProfileStressTest()
85 mUserManager.removeUser(userInfo.id); in stopManagedProfileStressTest()
/frameworks/opt/tv/tvsystem/java/com/android/libraries/tv/tvsystem/user/
DTvUserManager.java36 private final UserManager mUserManager; field in TvUserManager
44 mUserManager = context.getSystemService(UserManager.class); in TvUserManager()
63 UserInfo profileInfo = mUserManager.createProfileForUser(name, in createManagedProfile()
90 int[] userIds = mUserManager.getProfileIds(mUserId, enabledOnly); in getUserProfiles()
101 return mUserManager.getUserInfo(mUserId).name; in getUserName()
106 mUserManager.setUserName(mUserId, name); in setUserName()
112 return mUserManager.getUserIcon(mUserId); in getUserIcon()
117 mUserManager.setUserIcon(mUserId, icon); in setUserIcon()
122 return mUserManager.isManagedProfile(mUserId); in isManagedProfile()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/
DEnableAdbPreferenceControllerTest.java49 private UserManager mUserManager; field in EnableAdbPreferenceControllerTest
61 shadowContext.setSystemService(Context.USER_SERVICE, mUserManager); in setUp()
72 when(mUserManager.isAdminUser()).thenReturn(false); in displayPreference_isNotAdmin_shouldRemovePreference()
81 when(mUserManager.isAdminUser()).thenReturn(true); in displayPreference_isAdmin_shouldNotRemovePreference()
90 when(mUserManager.isAdminUser()).thenReturn(true); in resetPreference_shouldUncheck()
101 when(mUserManager.isAdminUser()).thenReturn(true); in handlePreferenceTreeClick_shouldUpdateSettings()
117 when(mUserManager.isAdminUser()).thenReturn(true); in handlePreferenceTreeClick_isMonkeyUser_shouldBeFalse()
127 when(mUserManager.isAdminUser()).thenReturn(true); in updateState_settingsOn_shouldCheck()
140 when(mUserManager.isAdminUser()).thenReturn(true); in updateState_settingsOff_shouldUncheck()
DDevelopmentSettingsEnablerTest.java37 private ShadowUserManager mUserManager; field in DevelopmentSettingsEnablerTest
42 mUserManager = Shadow.extract(mContext.getSystemService(UserManager.class)); in setUp()
43 mUserManager.setIsAdminUser(true); in setUp()
74 mUserManager.setIsAdminUser(false); in isEnabled_settingsOn_noRestriction_notAdmin_shouldReturnFalse()
/frameworks/base/core/java/com/android/internal/app/
DConfirmUserCreationActivity.java50 private UserManager mUserManager; field in ConfirmUserCreationActivity
63 mUserManager = getSystemService(UserManager.class); in onCreate()
99 boolean cantCreateUser = mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER) in checkUserCreationRequirements()
100 || !mUserManager.isAdminUser(); in checkUserCreationRequirements()
102 boolean cantCreateAnyMoreUsers = !mUserManager.canAddMoreUsers(); in checkUserCreationRequirements()
107 | mUserManager.someUserHasSeedAccount(mAccountName, mAccountType)); in checkUserCreationRequirements()
129 UserInfo user = mUserManager.createUser(mUserName, 0); in onClick()
135 mUserManager.setSeedAccountData(user.id, mAccountName, mAccountType, mAccountOptions); in onClick()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
DCleanupManagerTest.java57 @Mock private UserManager mUserManager; field in CleanupManagerTest
64 mManager = new CleanupManager(mContext, mRecoverySnapshotStorage, mDatabase, mUserManager, in setUp()
71 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in registerRecoveryAgent_unknownUser_storesInDb()
73 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID_2)))) in registerRecoveryAgent_unknownUser_storesInDb()
87 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in registerRecoveryAgent_registersSameUser_doesntChangeDb()
105 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in verifyKnownUsers_newSerialNumber_deletesData()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DBaseLockSettingsServiceTests.java95 UserManager mUserManager; field in BaseLockSettingsServiceTests
118 mUserManager = mock(UserManager.class); in setUp_baseServices()
140 mContext = new MockLockSettingsContext(InstrumentationRegistry.getContext(), mUserManager, in setUp_baseServices()
154 mUserManager, mPasswordSlotManager); in setUp_baseServices()
161 when(mUserManager.getUserInfo(eq(PRIMARY_USER_ID))).thenReturn(PRIMARY_USER_INFO); in setUp_baseServices()
166 when(mUserManager.getProfiles(eq(profile.id))).thenReturn(mPrimaryUserProfiles); in setUp_baseServices()
168 when(mUserManager.getUserInfo(eq(SECONDARY_USER_ID))).thenReturn(SECONDARY_USER_INFO); in setUp_baseServices()
172 when(mUserManager.getUsers(anyBoolean())).thenReturn(allUsers); in setUp_baseServices()
202 when(mUserManager.getUserInfo(eq(profileId))).thenReturn(userInfo); in installChildProfile()
203 when(mUserManager.getProfileParent(eq(profileId))).thenReturn(PRIMARY_USER_INFO); in installChildProfile()
[all …]
DMockLockSettingsContext.java33 private UserManager mUserManager; field in MockLockSettingsContext
49 mUserManager = userManager; in MockLockSettingsContext()
63 return mUserManager; in getSystemService()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DTaskPersisterTest.java50 private UserManager mUserManager; field in TaskPersisterTest
55 mUserManager = UserManager.get(context); in setUp()
90 UserInfo user = mUserManager.createUser(name, flags); in createUser()
96 boolean userRemoved = mUserManager.removeUser(userId); in removeUser()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/bluetooth/
DBluetoothEventManagerIntegTest.java56 private UserManager mUserManager; field in BluetoothEventManagerIntegTest
65 mUserManager = UserManager.get(mContext); in setUp()
72 mOtherUser = mUserManager.createUser("TestUser", /* flags= */ 0); in setUp()
83 mUserManager.removeUser(mOtherUser.id); in tearDown()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java64 private UserManager mUserManager; field in RestrictedLockUtilsTest
82 .thenReturn(mUserManager); in setUp()
94 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_deviceOwner()
112 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_profileOwner()
186 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
214 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
237 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile()
273 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(userInfo, profileInfo)); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy()
312 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpUser()
319 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpManagedProfile()
DTetherUtilTest.java49 private UserManager mUserManager; field in TetherUtilTest
58 doReturn(mUserManager) in setUp()
133 when(mUserManager.getUserRestrictionSources( in setupIsTetherAvailable()
138 when(mUserManager.hasBaseUserRestriction( in setupIsTetherAvailable()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DMultiUserSwitch.java51 final UserManager mUserManager; field in MultiUserSwitch
59 mUserManager = UserManager.get(getContext()); in MultiUserSwitch()
99 return whitelistIpcs(() -> mUserManager.isUserSwitcherEnabled( in isMultiUserEnabled()
104 if (mUserManager.isUserSwitcherEnabled() && mUserListener == null) { in registerListener()
152 if (whitelistIpcs(() -> mUserManager.isUserSwitcherEnabled()) in refreshContentDescription()
DManagedProfileControllerImpl.java44 private final UserManager mUserManager; field in ManagedProfileControllerImpl
55 mUserManager = UserManager.get(mContext); in ManagedProfileControllerImpl()
77 if (!mUserManager.requestQuietModeEnabled(!enableWorkMode, UserHandle.of(ui.id))) { in setWorkModeEnabled()
92 for (UserInfo ui : mUserManager.getEnabledProfiles(user)) { in reloadManagedProfiles()
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/
DUserGridRecyclerView.java74 private UserManager mUserManager; field in UserGridRecyclerView
89 mUserManager = UserManager.get(mContext); in UserGridRecyclerView()
124 return mUserManager.getUsers(/* excludeDying= */ true) in getUsersForUserGrid()
136 if (mUserManager.getUserSwitchability(fgUserHandle) != SWITCHABILITY_STATUS_OK) { in createUserRecords()
157 if (!mUserManager.hasUserRestriction(DISALLOW_ADD_USER, fgUserHandle)) { in createUserRecords()
165 return new UserRecord(mUserManager.getUserInfo(ActivityManager.getCurrentUser()), in createForegroundUserRecord()
299 if (!mUserManager.canAddMoreUsers()) { in handleAddUserClicked()
322 List<UserInfo> users = mUserManager.getUsers(/* excludeDying= */ true); in getMaxSupportedRealUsers()
434 UserInfo newGuest = mUserManager.createGuest(context, mGuestName); in createNewOrFindExistingGuest()
437 mUserManager, context.getResources(), newGuest); in createNewOrFindExistingGuest()
[all …]
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbSettingsManager.java54 private UserManager mUserManager; field in UsbSettingsManager
62 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in UsbSettingsManager()
94 UserInfo parentUserInfo = mUserManager.getProfileParent(user.getIdentifier()); in getSettingsForProfileGroup()
146 List<UserInfo> users = mUserManager.getUsers(); in dump()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DCleanupManager.java39 private final UserManager mUserManager; field in CleanupManager
74 mUserManager = userManager; in CleanupManager()
96 long currentSerialNumber = mUserManager.getSerialNumberForUser(UserHandle.of(userId)); in registerRecoveryAgent()
114 long currentSerialNumber = mUserManager.getSerialNumberForUser(UserHandle.of(userId)); in verifyKnownUsers()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DCrossProfileAppsTest.java59 private UserManager mUserManager; field in CrossProfileAppsTest
77 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in mockContext()
89 when(mUserManager.isManagedProfile(PERSONAL_PROFILE.getIdentifier())).thenReturn(false); in initUsers()
90 when(mUserManager.isManagedProfile(MANAGED_PROFILE.getIdentifier())).thenReturn(true); in initUsers()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DSecurityControllerImpl.java86 private final UserManager mUserManager; field in SecurityControllerImpl
118 mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in SecurityControllerImpl()
164 for (int profileId : mUserManager.getProfileIdsWithDisabled(mCurrentUserId)) { in getProfileOwnerName()
196 for (final UserInfo userInfo : mUserManager.getProfiles(userId)) { in getWorkProfileUserId()
232 for (int profileId : mUserManager.getProfileIdsWithDisabled(mVpnUserId)) { in isVpnEnabled()
243 return mUserManager.getUserInfo(mCurrentUserId).isRestricted() in isVpnRestricted()
244 || mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN, currentUser); in isVpnRestricted()
297 final UserInfo newUserInfo = mUserManager.getUserInfo(newUserId); in onUserSwitched()
355 for (UserInfo user : mUserManager.getUsers()) { in updateState()
DUserSwitcherController.java99 protected final UserManager mUserManager; field in UserSwitcherController
134 mUserManager = UserManager.get(context); in UserSwitcherController()
209 List<UserInfo> infos = mUserManager.getUsers(true); in refreshUsers()
217 boolean canSwitchUsers = mUserManager.getUserSwitchability( in refreshUsers()
238 picture = mUserManager.getUserIcon(info.id); in refreshUsers()
257 boolean systemCanCreateUsers = !mUserManager.hasBaseUserRestriction( in refreshUsers()
267 && mUserManager.canAddMoreUsers(); in refreshUsers()
361 if (mUserManager.removeUser(userId)) { in removeUserId()
372 guest = mUserManager.createGuest(mContext, in switchTo()
401 UserInfo currUserInfo = mUserManager.getUserInfo(currUserId); in switchTo()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DNotificationFilter.java57 private NotificationLockscreenUserManager mUserManager; field in NotificationFilter
89 if (mUserManager == null) { in getUserManager()
90 mUserManager = Dependency.get(NotificationLockscreenUserManager.class); in getUserManager()
92 return mUserManager; in getUserManager()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DSecurityControllerTest.java67 private final UserManager mUserManager = mock(UserManager.class); field in SecurityControllerTest
78 mContext.addMockSystemService(Context.USER_SERVICE, mUserManager); in setUp()
85 when(mUserManager.getUserInfo(anyInt())).thenReturn(new UserInfo()); in setUp()
86 when(mUserManager.isUserUnlocked(any())).thenReturn(true); in setUp()
139 when(mUserManager.getProfiles(anyInt())).thenReturn(profiles); in testWorkAccount()
/frameworks/base/services/core/java/com/android/server/location/
DUserInfoHelper.java80 @Nullable private UserManager mUserManager; field in UserInfoHelper
96 mUserManager = mContext.getSystemService(UserManager.class); in onSystemReady()
196 Preconditions.checkState(mUserManager != null); in getProfileIds()
201 return mUserManager.getEnabledProfileIds(userId); in getProfileIds()
/frameworks/libs/systemui/iconloaderlib/src_full_lib/com/android/launcher3/icons/
DSimpleIconCache.java48 private final UserManager mUserManager; field in SimpleIconCache
53 mUserManager = context.getSystemService(UserManager.class); in SimpleIconCache()
73 long serial = mUserManager.getSerialNumberForUser(user); in getSerialNumberForUser()

12345