Home
last modified time | relevance | path

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

1234

/packages/services/Car/user/car-user-lib/src/android/car/userlib/
DCarUserManagerHelper.java270 for (UserInfo userInfo : allUsers) { in userInfoListToUserIdList()
271 list.add(userInfo.id); in userInfoListToUserIdList()
385 UserInfo userInfo = iterator.next(); in getAllPersistentUsers() local
386 if (userInfo.isEphemeral()) { in getAllPersistentUsers()
403 UserInfo userInfo = iterator.next(); in getAllAdminUsers() local
404 if (!userInfo.isAdmin()) { in getAllAdminUsers()
421 UserInfo userInfo = iterator.next(); in getAllUsersExceptGuests() local
422 if (userInfo.isGuest()) { in getAllUsersExceptGuests()
440 UserInfo userInfo = iterator.next(); in getAllUsersExceptSpecifiedUser() local
441 if (userInfo.id == userId) { in getAllUsersExceptSpecifiedUser()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/users/
DEditUserNameEntryPreferenceControllerTest.java86 UserInfo userInfo = new UserInfo(/* id= */ 10, TEST_USERNAME, /* flags= */ 0); in testOnButtonClick_isCurrentUser_launchesEditUsernameFragment() local
87 when(mCarUserManagerHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in testOnButtonClick_isCurrentUser_launchesEditUsernameFragment()
88 mController.setUserInfo(userInfo); in testOnButtonClick_isCurrentUser_launchesEditUsernameFragment()
97 UserInfo userInfo = new UserInfo(/* id= */ 10, TEST_USERNAME, /* flags= */ 0); in testOnButtonClick_isNotCurrentUser_doesNothing() local
98 when(mCarUserManagerHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in testOnButtonClick_isNotCurrentUser_doesNothing()
99 mController.setUserInfo(userInfo); in testOnButtonClick_isNotCurrentUser_doesNothing()
108 UserInfo userInfo = new UserInfo(/* id= */ 10, TEST_USERNAME, /* flags= */ 0); in testRefreshUi_elementHasTitle() local
109 when(mCarUserManagerHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in testRefreshUi_elementHasTitle()
110 mController.setUserInfo(userInfo); in testRefreshUi_elementHasTitle()
118 UserInfo userInfo = new UserInfo(/* id= */ 10, TEST_USERNAME, /* flags= */ 0); in testRefreshUi_userNotSetup_setsSummary() local
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accounts/
DAccountPreferenceController.java121 public UserInfo userInfo; field in AccountPreferenceController.ProfileData
179 UserInfo userInfo = profiles.get(i); in updateRawDataToIndex() local
180 if (userInfo.isEnabled()) { in updateRawDataToIndex()
181 if (!mHelper.hasBaseUserRestriction(DISALLOW_MODIFY_ACCOUNTS, userInfo.id)) { in updateRawDataToIndex()
187 if (userInfo.isManagedProfile()) { in updateRawDataToIndex()
235 intent.putExtra(EXTRA_USER, profileData.userInfo.getUserHandle()); in onPreferenceClick()
241 final int userId = profileData.userInfo.id; in onPreferenceClick()
248 arguments.putParcelable(Intent.EXTRA_USER, profileData.userInfo.getUserHandle()); in onPreferenceClick()
274 UserInfo userInfo = mUm.getUserInfo(UserHandle.myUserId()); in updateUi() local
275 updateProfileUi(userInfo); in updateUi()
[all …]
/packages/apps/Settings/src/com/android/settings/accounts/
DAccountPreferenceController.java121 public UserInfo userInfo; field in AccountPreferenceController.ProfileData
179 UserInfo userInfo = profiles.get(i); in updateRawDataToIndex() local
180 if (userInfo.isEnabled()) { in updateRawDataToIndex()
181 if (!mHelper.hasBaseUserRestriction(DISALLOW_MODIFY_ACCOUNTS, userInfo.id)) { in updateRawDataToIndex()
187 if (userInfo.isManagedProfile()) { in updateRawDataToIndex()
235 intent.putExtra(EXTRA_USER, profileData.userInfo.getUserHandle()); in onPreferenceClick()
241 final int userId = profileData.userInfo.id; in onPreferenceClick()
248 arguments.putParcelable(Intent.EXTRA_USER, profileData.userInfo.getUserHandle()); in onPreferenceClick()
274 UserInfo userInfo = mUm.getUserInfo(UserHandle.myUserId()); in updateUi() local
275 updateProfileUi(userInfo); in updateUi()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/users/
DUsersPreferenceProvider.java45 void onUserClicked(UserInfo userInfo); in onUserClicked() argument
95 for (UserInfo userInfo : infos) { in createUserList()
96 if (!userInfo.isGuest()) { // Do not show guest users. in createUserList()
97 users.add(createUserPreference(userInfo)); in createUserList()
109 private Preference createUserPreference(UserInfo userInfo) { in createUserPreference() argument
112 new UserIconProvider(mCarUserManagerHelper).getUserIcon(userInfo, mContext)); in createUserPreference()
114 UserUtils.getUserDisplayName(mContext, mCarUserManagerHelper, userInfo)); in createUserPreference()
116 if (!userInfo.isInitialized()) { in createUserPreference()
119 if (userInfo.isAdmin()) { in createUserPreference()
121 isCurrentUser(userInfo) ? R.string.signed_in_admin_user : R.string.user_admin); in createUserPreference()
[all …]
DUserGridRecyclerView.java112 for (UserInfo userInfo : userInfoList) { in createUserRecords()
114 mCarUserManagerHelper.getCurrentForegroundUserId() == userInfo.id; in createUserRecords()
116 if (!isForeground && userInfo.isGuest()) { in createUserRecords()
121 UserRecord record = new UserRecord(userInfo, false /* isStartGuestSession */, in createUserRecords()
164 UserInfo userInfo = new UserInfo(); in createStartGuestUserRecord() local
165 userInfo.name = mContext.getString(R.string.start_guest_session); in createStartGuestUserRecord()
166 return new UserRecord(userInfo, true /* isStartGuestSession */, in createStartGuestUserRecord()
174 UserInfo userInfo = new UserInfo(); in createAddUserRecord() local
175 userInfo.name = mContext.getString(R.string.user_add_user_menu); in createAddUserRecord()
176 return new UserRecord(userInfo, false /* isStartGuestSession */, in createAddUserRecord()
[all …]
DUserUtils.java49 CarUserManagerHelper carUserManagerHelper, UserInfo userInfo) { in getUserDisplayName() argument
50 return carUserManagerHelper.isCurrentProcessUser(userInfo) ? context.getString( in getUserDisplayName()
51 R.string.current_user_name, userInfo.name) : userInfo.name; in getUserDisplayName()
59 UserInfo userInfo) { in isAdminViewingNonAdmin() argument
60 return carUserManagerHelper.isCurrentProcessAdminUser() && !userInfo.isAdmin(); in isAdminViewingNonAdmin()
DUsersListPreferenceController.java34 protected void userClicked(UserInfo userInfo) { in userClicked() argument
35 if (UserUtils.isAdminViewingNonAdmin(getCarUserManagerHelper(), userInfo)) { in userClicked()
38 UserDetailsPermissionsFragment.newInstance(userInfo.id)); in userClicked()
40 getFragmentController().launchFragment(UserDetailsFragment.newInstance(userInfo.id)); in userClicked()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowCarUserManagerHelper.java72 protected boolean isCurrentProcessUser(UserInfo userInfo) { in isCurrentProcessUser() argument
73 return sMockInstance.isCurrentProcessUser(userInfo); in isCurrentProcessUser()
132 protected boolean canUserBeRemoved(UserInfo userInfo) { in canUserBeRemoved() argument
133 return sMockInstance.canUserBeRemoved(userInfo); in canUserBeRemoved()
162 protected boolean removeUser(UserInfo userInfo, String guestUserName) { in removeUser() argument
163 return sMockInstance.removeUser(userInfo, guestUserName); in removeUser()
167 protected void setUserRestriction(UserInfo userInfo, String restriction, boolean enable) { in setUserRestriction() argument
168 Map<String, Boolean> permissionsMap = sUserRestrictionMap.getOrDefault(userInfo.id, in setUserRestriction()
171 sUserRestrictionMap.put(userInfo.id, permissionsMap); in setUserRestriction()
175 protected boolean hasUserRestriction(String restriction, UserInfo userInfo) { in hasUserRestriction() argument
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/
DSettingsInitialize.java61 UserInfo userInfo = um.getUserInfo(UserHandle.myUserId()); in onReceive() local
63 managedProfileSetup(context, pm, broadcast, userInfo); in onReceive()
64 webviewSettingSetup(context, pm, userInfo); in onReceive()
69 UserInfo userInfo) { in managedProfileSetup() argument
70 if (userInfo == null || !userInfo.isManagedProfile()) { in managedProfileSetup()
76 pm.clearCrossProfileIntentFilters(userInfo.id); in managedProfileSetup()
94 pm.addCrossProfileIntentFilter(info.filter, userInfo.id, in managedProfileSetup()
95 userInfo.profileGroupId, PackageManager.SKIP_CURRENT_PROFILE); in managedProfileSetup()
112 private void webviewSettingSetup(Context context, PackageManager pm, UserInfo userInfo) { in webviewSettingSetup() argument
113 if (userInfo == null) { in webviewSettingSetup()
[all …]
/packages/apps/Settings/src/com/android/settings/
DSettingsInitialize.java61 UserInfo userInfo = um.getUserInfo(UserHandle.myUserId()); in onReceive() local
63 managedProfileSetup(context, pm, broadcast, userInfo); in onReceive()
64 webviewSettingSetup(context, pm, userInfo); in onReceive()
69 UserInfo userInfo) { in managedProfileSetup() argument
70 if (userInfo == null || !userInfo.isManagedProfile()) { in managedProfileSetup()
76 pm.clearCrossProfileIntentFilters(userInfo.id); in managedProfileSetup()
94 pm.addCrossProfileIntentFilter(info.filter, userInfo.id, in managedProfileSetup()
95 userInfo.profileGroupId, PackageManager.SKIP_CURRENT_PROFILE); in managedProfileSetup()
112 private void webviewSettingSetup(Context context, PackageManager pm, UserInfo userInfo) { in webviewSettingSetup() argument
113 if (userInfo == null) { in webviewSettingSetup()
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DUserUtil.java35 UserInfo userInfo = getUserInfoFromUserHandle(context, userHandle); in isManagedProfile() local
36 return userInfo != null && userInfo.isManagedProfile(); in isManagedProfile()
40 UserInfo userInfo = getUserInfoFromUserHandle(context, userHandle); in isProfile() local
41 return userInfo != null && userInfo.profileGroupId != userInfo.id; in isProfile()
/packages/apps/Settings/src/com/android/settings/enterprise/
DEnterprisePrivacyFeatureProviderImpl.java216 for (final UserInfo userInfo : mUm.getProfiles(MY_USER_ID)) { in getNumberOfActiveDeviceAdminsForCurrentUserAndManagedProfile()
218 = mDpm.getActiveAdminsAsUser(userInfo.id); in getNumberOfActiveDeviceAdminsForCurrentUserAndManagedProfile()
240 final UserInfo userInfo = getManagedProfileUserInfo(); in showWorkPolicyInfo() local
241 if (intent != null && userInfo != null) { in showWorkPolicyInfo()
242 mContext.startActivityAsUser(intent, userInfo.getUserHandle()); in showWorkPolicyInfo()
257 for (final UserInfo userInfo : mUm.getProfiles(MY_USER_ID)) { in getManagedProfileUserInfo()
258 if (userInfo.isManagedProfile()) { in getManagedProfileUserInfo()
259 return userInfo; in getManagedProfileUserInfo()
266 final UserInfo userInfo = getManagedProfileUserInfo(); in getManagedProfileUserId() local
267 if (userInfo != null) { in getManagedProfileUserId()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/
DUserAppInfo.java30 public final UserInfo userInfo; field in UserAppInfo
34 this.userInfo = mUserInfo; in UserAppInfo()
50 return that.userInfo.id == userInfo.id && TextUtils.equals(that.appInfo.packageName, in equals()
56 return Objects.hash(userInfo.id, appInfo.packageName); in hashCode()
/packages/apps/Settings/src/com/android/settings/applications/
DUserAppInfo.java30 public final UserInfo userInfo; field in UserAppInfo
34 this.userInfo = mUserInfo; in UserAppInfo()
50 return that.userInfo.id == userInfo.id && TextUtils.equals(that.appInfo.packageName, in equals()
56 return Objects.hash(userInfo.id, appInfo.packageName); in hashCode()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ota/
DOtaController.java115 for (UserInfo userInfo : mUserManager.getUsers()) { in run()
116 if (userInfo.isManagedProfile()) { in run()
117 addManagedProfileTasks(userInfo.id, mContext); in run()
118 } else if (mDevicePolicyManager.getProfileOwnerAsUser(userInfo.id) != null) { in run()
119 addManagedUserTasks(userInfo.id, mContext); in run()
123 mCrossProfileIntentFiltersSetter.resetFilters(userInfo.id); in run()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/preprovisioning/
DPreProvisioningController.java747 UserInfo userInfo = mUserManager.createUser( in doInBackground() local
751 if (userInfo != null) { in doInBackground()
752 ProvisionLogger.logi("Created user " + userInfo.id + " to hold the device owner"); in doInBackground()
754 return userInfo; in doInBackground()
758 protected void onPostExecute(UserInfo userInfo) { in onPostExecute() argument
759 if (userInfo == null) { in onPostExecute()
764 mActivityManager.switchUser(userInfo.id); in onPostExecute()
767 mUi.startProvisioning(userInfo.id, mParams); in onPostExecute()
793 UserInfo userInfo = mUserManager.getUserInfo(mUserManager.getUserHandle()); in showManagedProfileErrorAndClose() local
804 if (!userInfo.canHaveProfile()) { in showManagedProfileErrorAndClose()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
DCreateManagedProfileTask.java75 UserInfo userInfo = mUserManager.createProfileForUserEvenWhenDisallowed( in run() local
79 if (userInfo == null) { in run()
83 mProfileUserId = userInfo.id; in run()
84 mNonRequiredAppsLogic.maybeTakeSystemAppsSnapshot(userInfo.id); in run()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/
DApplicationsUtilsTest.java78 UserInfo userInfo = new UserInfo(); in isProfileOrDeviceOwner_profileOwner_returnsTrue() local
79 userInfo.id = 123; in isProfileOrDeviceOwner_profileOwner_returnsTrue()
82 when(um.getAllUsers()).thenReturn(Collections.singletonList(userInfo)); in isProfileOrDeviceOwner_profileOwner_returnsTrue()
83 when(dpm.getProfileOwnerAsUser(userInfo.id)).thenReturn( in isProfileOrDeviceOwner_profileOwner_returnsTrue()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/enterprise/
DEnterprisePrivacyFeatureProviderImpl.java71 for (final UserInfo userInfo : mUm.getProfiles(MY_USER_ID)) { in getManagedProfileUserId()
72 if (userInfo.isManagedProfile()) { in getManagedProfileUserId()
73 return userInfo.id; in getManagedProfileUserId()
227 for (final UserInfo userInfo : mUm.getProfiles(MY_USER_ID)) { in getNumberOfActiveDeviceAdminsForCurrentUserAndManagedProfile()
229 = mDpm.getActiveAdminsAsUser(userInfo.id); in getNumberOfActiveDeviceAdminsForCurrentUserAndManagedProfile()
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/
DUserIconLoader.java69 for (UserInfo userInfo : um.getUsers()) { in loadUserIconsWithContext()
70 value.put(userInfo.id, Utils.getUserIcon(context, um, userInfo)); in loadUserIconsWithContext()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/storage/
DUserIconLoader.java69 for (UserInfo userInfo : um.getUsers()) { in loadUserIconsWithContext()
70 value.put(userInfo.id, Utils.getUserIcon(context, um, userInfo)); in loadUserIconsWithContext()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/dashboard/profileselector/
DUserAdapter.java54 UserInfo userInfo = um.getUserInfo(mUserHandle.getIdentifier()); in UserDetails() local
56 if (userInfo.isManagedProfile()) { in UserDetails()
61 mName = userInfo.name; in UserDetails()
62 final int userId = userInfo.id; in UserDetails()
/packages/apps/Settings/src/com/android/settings/dashboard/profileselector/
DUserAdapter.java54 UserInfo userInfo = um.getUserInfo(mUserHandle.getIdentifier()); in UserDetails() local
56 if (userInfo.isManagedProfile()) { in UserDetails()
61 mName = userInfo.name; in UserDetails()
62 final int userId = userInfo.id; in UserDetails()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/
DVpnPreferenceController.java147 final UserInfo userInfo = mUserManager.getUserInfo(UserHandle.myUserId()); in updateSummary() local
149 if (userInfo.isRestricted()) { in updateSummary()
150 uid = userInfo.restrictedProfileParentId; in updateSummary()
152 uid = userInfo.id; in updateSummary()

1234