Home
last modified time | relevance | path

Searched refs:userInfo (Results 1 – 25 of 39) sorted by relevance

12

/frameworks/base/apct-tests/perftests/multiuser/src/android/multiuser/
DUserLifecycleTest.java107 final UserInfo userInfo = mUm.createUser("TestUser", 0); in createAndStartUserPerf() local
110 registerBroadcastReceiver(Intent.ACTION_USER_STARTED, latch, userInfo.id); in createAndStartUserPerf()
111 mIam.startUserInBackground(userInfo.id); in createAndStartUserPerf()
115 removeUser(userInfo.id); in createAndStartUserPerf()
125 final UserInfo userInfo = mUm.createUser("TestUser", 0); in switchUserPerf() local
128 switchUser(userInfo.id); in switchUserPerf()
132 removeUser(userInfo.id); in switchUserPerf()
141 final UserInfo userInfo = mUm.createUser("TestUser", 0); in stopUserPerf() local
143 registerBroadcastReceiver(Intent.ACTION_USER_STARTED, latch, userInfo.id); in stopUserPerf()
144 mIam.startUserInBackground(userInfo.id); in stopUserPerf()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerTest.java125 UserInfo userInfo = createUser("Guest 1", UserInfo.FLAG_GUEST); in testAddUser() local
126 assertTrue(userInfo != null); in testAddUser()
131 if (user.id == userInfo.id && user.name.equals("Guest 1") in testAddUser()
159 UserInfo userInfo = createUser("Guest 1", UserInfo.FLAG_GUEST); in testRemoveUser() local
160 removeUser(userInfo.id); in testRemoveUser()
162 assertFalse(findUser(userInfo.id)); in testRemoveUser()
177 UserInfo userInfo = createProfileForUser("Profile", in testGetProfileParent() local
179 assertNotNull(userInfo); in testGetProfileParent()
181 UserInfo parentProfileInfo = mUserManager.getProfileParent(userInfo.id); in testGetProfileParent()
184 removeUser(userInfo.id); in testGetProfileParent()
[all …]
DUserManagerServiceUserInfoTest.java110 UserInfo userInfo = mUserManagerService.getUserInfo(UserHandle.USER_SYSTEM); in testGetUserName() local
112 TextUtils.isEmpty(userInfo.name)); in testGetUserName()
114 userInfo = createUser(); in testGetUserName()
115 userInfo.partial = false; in testGetUserName()
117 userInfo.id = TEST_ID; in testGetUserName()
118 mUserManagerService.putUserInfo(userInfo); in testGetUserName()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java116 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() local
119 userInfo, profileInfo})); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
145 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() local
148 userInfo, profileInfo})); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
169 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile() local
172 userInfo, profileInfo})); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile()
206 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy() local
209 userInfo, profileInfo})); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy()
227 UserInfo userInfo = new UserInfo(userId, "primary", 0); in setUpUser() local
228 when(mUserManager.getUserInfo(userId)).thenReturn(userInfo); in setUpUser()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DUserManagerService.java627 UserInfo userInfo = mUsers.get(profileId).info; in getProfilesLU() local
630 userInfo = new UserInfo(userInfo); in getProfilesLU()
631 userInfo.name = null; in getProfilesLU()
632 userInfo.iconPath = null; in getProfilesLU()
634 userInfo = userWithName(userInfo); in getProfilesLU()
636 users.add(userInfo); in getProfilesLU()
695 UserInfo userInfo = getUserInfoLU(userId); in isSameProfileGroupNoChecks() local
696 if (userInfo == null || userInfo.profileGroupId == UserInfo.NO_PROFILE_GROUP_ID) { in isSameProfileGroupNoChecks()
704 return userInfo.profileGroupId == otherUserInfo.profileGroupId; in isSameProfileGroupNoChecks()
921 UserInfo userInfo = getUserInfoLU(userId); in getManagedProfileBadge() local
[all …]
DLauncherAppsService.java697 UserInfo userInfo = mUm.getUserInfo(user.getIdentifier()); in isEnabledProfileOf() local
699 if (userInfo == null || listeningUserInfo == null in isEnabledProfileOf()
700 || userInfo.profileGroupId == UserInfo.NO_PROFILE_GROUP_ID in isEnabledProfileOf()
701 || userInfo.profileGroupId != listeningUserInfo.profileGroupId in isEnabledProfileOf()
702 || !userInfo.isEnabled()) { in isEnabledProfileOf()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DRestrictedLockUtils.java447 final UserInfo userInfo = profiles.get(i); in checkIfMaximumTimeToLockIsSet() local
448 final List<ComponentName> admins = dpm.getActiveAdminsAsUser(userInfo.id); in checkIfMaximumTimeToLockIsSet()
453 if (dpm.getMaximumTimeToLock(admin, userInfo.id) > 0) { in checkIfMaximumTimeToLockIsSet()
455 enforcedAdmin = new EnforcedAdmin(admin, userInfo.id); in checkIfMaximumTimeToLockIsSet()
465 if (userInfo.isManagedProfile()) { in checkIfMaximumTimeToLockIsSet()
468 DevicePolicyManager parentDpm = sProxy.getParentProfileInstance(dpm, userInfo); in checkIfMaximumTimeToLockIsSet()
469 if (parentDpm.getMaximumTimeToLock(admin, userInfo.id) > 0) { in checkIfMaximumTimeToLockIsSet()
471 enforcedAdmin = new EnforcedAdmin(admin, userInfo.id); in checkIfMaximumTimeToLockIsSet()
503 for (UserInfo userInfo : UserManager.get(context).getProfiles(userId)) { in checkForLockSetting()
504 final List<ComponentName> admins = dpm.getActiveAdminsAsUser(userInfo.id); in checkForLockSetting()
[all …]
DSuggestionParser.java228 UserInfo userInfo = userManager.getUserInfo(UserHandle.myUserId()); in satisifesRequiredUserType() local
230 final boolean primaryUserCondtionMet = userInfo.isPrimary() in satisifesRequiredUserType()
232 final boolean adminUserConditionMet = userInfo.isAdmin() in satisifesRequiredUserType()
234 final boolean guestUserCondtionMet = userInfo.isGuest() in satisifesRequiredUserType()
236 final boolean restrictedUserCondtionMet = userInfo.isRestricted() in satisifesRequiredUserType()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DBaseLockSettingsServiceTests.java124 final UserInfo userInfo = new UserInfo( in installChildProfile() local
126 mPrimaryUserProfiles.add(userInfo); in installChildProfile()
127 when(mUserManager.getUserInfo(eq(profileId))).thenReturn(userInfo); in installChildProfile()
131 return userInfo; in installChildProfile()
135 final UserInfo userInfo = installChildProfile(profileId); in installAndTurnOffChildProfile() local
136 userInfo.flags |= UserInfo.FLAG_QUIET_MODE; in installAndTurnOffChildProfile()
139 return userInfo; in installAndTurnOffChildProfile()
/frameworks/base/services/core/java/com/android/server/trust/
DTrustManagerService.java194 for (UserInfo userInfo : userInfos) { in updateTrustAll()
195 updateTrust(userInfo.id, 0); in updateTrustAll()
270 for (UserInfo userInfo : userInfos) { in refreshAgentList()
271 if (userInfo == null || userInfo.partial || !userInfo.isEnabled() in refreshAgentList()
272 || userInfo.guestToRemove) continue; in refreshAgentList()
273 if (!userInfo.supportsSwitchToByUser()) { in refreshAgentList()
274 if (DEBUG) Slog.d(TAG, "refreshAgentList: skipping user " + userInfo.id in refreshAgentList()
278 if (!mActivityManager.isUserRunning(userInfo.id)) { in refreshAgentList()
279 if (DEBUG) Slog.d(TAG, "refreshAgentList: skipping user " + userInfo.id in refreshAgentList()
283 if (!lockPatternUtils.isSecure(userInfo.id)) { in refreshAgentList()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DUserInfoControllerImpl.java119 UserInfo userInfo; in queryForUserInformation() local
121 userInfo = ActivityManager.getService().getCurrentUser(); in queryForUserInformation()
123 new UserHandle(userInfo.id)); in queryForUserInformation()
131 final int userId = userInfo.id; in queryForUserInformation()
132 final boolean isGuest = userInfo.isGuest(); in queryForUserInformation()
133 final String userName = userInfo.name; in queryForUserInformation()
DUserSwitcherController.java470 UserInfo userInfo = mUserManager.getUserInfo(currentUserId);
471 if (userInfo != null && userInfo.isGuest()) {
491 UserInfo userInfo = mUserManager.getUserInfo(currentUser);
492 if (userInfo != null && userInfo.isGuest()) {
505 final UserInfo userInfo = mUserManager.getUserInfo(currentId);
517 if ((userInfo == null || !userInfo.isAdmin()) && record.isRestricted) {
533 if (userInfo != null && userInfo.id != UserHandle.USER_SYSTEM) {
535 UserHandle.of(userInfo.id));
536 mSecondaryUser = userInfo.id;
539 if (UserManager.isSplitSystemUser() && userInfo != null && !userInfo.isGuest()
[all …]
DSecurityControllerImpl.java179 for (final UserInfo userInfo : mUserManager.getProfiles(userId)) { in getWorkProfileUserId()
180 if (userInfo.isManagedProfile()) { in getWorkProfileUserId()
181 return userInfo.id; in getWorkProfileUserId()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/drawer/
DUserAdapter.java55 UserInfo userInfo = um.getUserInfo(mUserHandle.getIdentifier()); in UserDetails() local
57 if (userInfo.isManagedProfile()) { in UserDetails()
62 mName = userInfo.name; in UserDetails()
63 final int userId = userInfo.id; in UserDetails()
/frameworks/base/core/java/com/android/internal/app/
DIntentForwarderActivity.java179 for (UserInfo userInfo : relatedUsers) { in getManagedProfile()
180 if (userInfo.isManagedProfile()) return userInfo.id; in getManagedProfile()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/drawer/
DProfileSelectDialogTest.java54 final UserInfo userInfo = new UserInfo( in setUp() local
56 when(mUserManager.getUserInfo(NORMAL_USER.getIdentifier())).thenReturn(userInfo); in setUp()
/frameworks/base/core/java/android/provider/
DCallLog.java775 final UserInfo userInfo = users.get(i); in addCall() local
776 final UserHandle userHandle = userInfo.getUserHandle(); in addCall()
821 final UserInfo userInfo = userManager.getUserInfo(userId); in shouldHaveSharedCallLogEntries() local
822 return userInfo != null && !userInfo.isManagedProfile(); in shouldHaveSharedCallLogEntries()
/frameworks/base/services/tests/servicestests/src/com/android/server/retaildemo/
DRetailDemoModeServiceTest.java155 final UserInfo userInfo = new UserInfo(); in testDemoUserSetup() local
156 userInfo.id = TEST_DEMO_USER; in testDemoUserSetup()
157 when(mUm.createUser(anyString(), anyInt())).thenReturn(userInfo); in testDemoUserSetup()
260 final UserInfo userInfo = new UserInfo(TEST_DEMO_USER, "demo_user", in testSwitchToDemoUser() local
262 when(mUm.getUserInfo(TEST_DEMO_USER)).thenReturn(userInfo); in testSwitchToDemoUser()
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbDebuggingManager.java327 UserInfo userInfo = UserManager.get(mContext).getUserInfo(currentUserId); in startConfirmation() local
329 if (userInfo.isAdmin()) { in startConfirmation()
339 if (startConfirmationActivity(componentName, userInfo.getUserHandle(), key, fingerprints) in startConfirmation()
340 || startConfirmationService(componentName, userInfo.getUserHandle(), in startConfirmation()
/frameworks/base/services/retaildemo/java/com/android/server/retaildemo/
DRetailDemoModeService.java340 private void setupDemoUser(UserInfo userInfo) { in setupDemoUser() argument
342 final UserHandle user = UserHandle.of(userInfo.id); in setupDemoUser()
359 Settings.Secure.SKIP_FIRST_USE_HINTS, 1, userInfo.id); in setupDemoUser()
377 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0, userInfo.id); in setupDemoUser()
379 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0, userInfo.id, null); in setupDemoUser()
389 carrierDemoModeSetting, 1, userInfo.id); in setupDemoUser()
400 PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0, userInfo.id, null); in setupDemoUser()
/frameworks/base/core/tests/coretests/src/android/content/
DAbstractCrossUserContentResolverTest.java60 final UserInfo userInfo = createUser(); in setUp() local
61 mCrossUserId = userInfo.id; in setUp()
/frameworks/base/services/core/java/com/android/server/am/
DUserController.java411 final UserInfo userInfo = getUserInfo(userId); in finishUserUnlockedCompleted()
412 if (userInfo == null) { in finishUserUnlockedCompleted()
422 if (!userInfo.isInitialized()) { in finishUserUnlockedCompleted()
435 mInjector.getUserManager().makeInitialized(userInfo.id); in finishUserUnlockedCompleted()
745 UserInfo userInfo = getUserInfo(oldUserId);
746 if (userInfo.isEphemeral()) {
750 if (userInfo.isGuest() || userInfo.isEphemeral()) {
839 final UserInfo userInfo = getUserInfo(userId);
840 if (userInfo == null) {
844 if (foreground && userInfo.isManagedProfile()) {
[all …]
/frameworks/base/services/core/java/com/android/server/media/
DMediaSessionService.java328 for (UserInfo userInfo : allUsers) { in updateUser()
329 if (userInfo.isManagedProfile()) { in updateUser()
330 mFullUserIds.put(userInfo.id, userInfo.profileGroupId); in updateUser()
332 mFullUserIds.put(userInfo.id, userInfo.id); in updateUser()
333 if (mUserRecords.get(userInfo.id) == null) { in updateUser()
334 mUserRecords.put(userInfo.id, new FullUserRecord(userInfo.id)); in updateUser()
/frameworks/base/services/core/java/com/android/server/webkit/
DSystemImpl.java243 for(UserInfo userInfo : userManager.getUsers()) { in enablePackageForAllUsers()
244 enablePackageForUser(packageName, enable, userInfo.id); in enablePackageForAllUsers()
/frameworks/base/services/core/java/com/android/server/om/
DOverlayManagerService.java283 final UserInfo userInfo = users.get(i); in initIfNeeded() local
284 if (!userInfo.supportsSwitchTo() && userInfo.id != UserHandle.USER_SYSTEM) { in initIfNeeded()

12