Home
last modified time | relevance | path

Searched refs:user (Results 1 – 25 of 567) sorted by relevance

12345678910>>...23

/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarDevicePolicyManagerTest.java66 UserInfo user = createUser(); in testRemoveUser() local
67 Log.d(TAG, "removing user " + user.toFullString()); in testRemoveUser()
68 RemoveUserResult result = mCarDpm.removeUser(user.getUserHandle()); in testRemoveUser()
71 assertWithMessage("Result of removeUser %s: %s", user.toFullString(), result) in testRemoveUser()
90 UserInfo user = createUser(); in testRemoveUser_currentUserSetEphemeral() local
91 Log.d(TAG, "switching to user " + user.toFullString()); in testRemoveUser_currentUserSetEphemeral()
92 switchUser(user.id); in testRemoveUser_currentUserSetEphemeral()
94 Log.d(TAG, "removing user " + user.toFullString()); in testRemoveUser_currentUserSetEphemeral()
95 RemoveUserResult result = mCarDpm.removeUser(user.getUserHandle()); in testRemoveUser_currentUserSetEphemeral()
97 assertWithMessage("status of remove user %s (%s)", user.toFullString(), result) in testRemoveUser_currentUserSetEphemeral()
[all …]
DCarMultiUserTestBase.java19 import static android.car.user.CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING;
32 import android.car.user.CarUserManager;
33 import android.car.user.UserCreationResult;
34 import android.car.user.UserRemovalResult;
35 import android.car.user.UserSwitchResult;
109 for (UserInfo user : users) { in setMultiUserFixtures()
110 if (user.id == currentUserId) { in setMultiUserFixtures()
111 mInitialUser = user; in setMultiUserFixtures()
120 for (UserInfo user : users) { in setMultiUserFixtures()
121 if (user.id != UserHandle.USER_SYSTEM && !isUserCreatedByTheseTests(user)) { in setMultiUserFixtures()
[all …]
/packages/apps/Messaging/src/com/android/messaging/util/
DEmailAddress.java69 public EmailAddress(final String user, final String host) { in EmailAddress() argument
70 this(user, host, false); in EmailAddress()
80 public EmailAddress(final String user, final String host, final boolean i18n) { in EmailAddress() argument
82 this.user = user; in EmailAddress()
101 user = emailString.substring(0, atIndex); in parseEmail()
109 return user + "@" + host; in toString()
118 if ((user == null) || (host == null)) { in isValidInternal()
122 if ((user.length() == 0) || (host.length() == 0)) { in isValidInternal()
167 if (user.startsWith("\"")) { in isValidInternal()
173 if (ANY_WHITESPACE.indexIn(user) >= 0) { in isValidInternal()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/model/
DUnusedAppsViewModel.kt72 val user: UserHandle, in <lambda>() constant in com.android.permissioncontroller.permission.ui.model.UnusedAppsViewModel.UnusedPackageInfo
112 for ((user, packageList) in AllPackageInfosLiveData.value!!) { in <lambda>() constant
114 val key = packageInfo.packageName to user in <lambda>()
125 for ((user, stats) in usageStatsLiveData.value!!) { in <lambda>() constant
127 val statPackage = stat.packageName to user in <lambda>()
133 UnusedPackageInfo(stat.packageName, user, in <lambda>()
141 overSixMonthApps.forEach { (packageName, user) -> in <lambda>() method
143 for (pI in AllPackageInfosLiveData.value!![user]!!) { in <lambda>()
155 val userPackage = packageName to user in <lambda>()
157 UnusedPackageInfo(packageName, user, disableActionApps.contains(userPackage), in <lambda>()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/model/
DAllAppsList.java136 if (findAppInfo(info.componentName, info.user) != null) { in add()
149 .isAppInstalled(installInfo.packageName, installInfo.user)) { in addPromiseApp()
162 UserHandle user = installInfo.user; in updatePromiseInstallInfo() local
167 && appInfo.user.equals(user)) { in updatePromiseInstallInfo()
205 Context context, String packageName, UserHandle user) { in addPackage() argument
207 .getActivityList(packageName, user); in addPackage()
210 add(new AppInfo(context, info, user), info); in addPackage()
219 public void removePackage(String packageName, UserHandle user) { in removePackage() argument
223 if (info.user.equals(user) && packageName.equals(info.componentName.getPackageName())) { in removePackage()
243 public void updateIconsAndLabels(HashSet<String> packages, UserHandle user) { in updateIconsAndLabels() argument
[all …]
DItemInstallQueue.java145 public void removeFromInstallQueue(HashSet<String> packageNames, UserHandle user) { in removeFromInstallQueue() argument
151 item.user.equals(user) && packageNames.contains(getIntentPackage(item.intent)))) { in removeFromInstallQueue()
181 public Stream<ShortcutKey> getPendingShortcuts(UserHandle user) { in getPendingShortcuts() argument
184 .filter(item -> item.itemType == ITEM_TYPE_DEEP_SHORTCUT && user.equals(item.user)) in getPendingShortcuts()
185 .map(item -> ShortcutKey.fromIntent(item.intent, user)); in getPendingShortcuts()
246 user = userHandle; in PendingInstallShortcutInfo()
255 user = info.getUserHandle(); in PendingInstallShortcutInfo()
268 user = info.getProfile(); in PendingInstallShortcutInfo()
284 .getActivityList(packageName, user); in getItemInfo()
287 si.user = user; in getItemInfo()
[all …]
DLoaderTask.java264 new ShortcutCachingLogic(), (pkgs, user) -> { }); in run()
389 for (UserHandle user : mUserCache.getUserProfiles()) { in loadWorkspace()
390 long serialNo = mUserCache.getSerialNumberForUser(user); in loadWorkspace()
391 boolean userUnlocked = mUserManager.isUserUnlocked(user); in loadWorkspace()
395 QueryResult pinnedShortcuts = new ShortcutRequest(context, user) in loadWorkspace()
420 if (c.user == null) { in loadWorkspace()
451 mLauncherApps.isPackageEnabled(targetPkg, c.user); in loadWorkspace()
460 if (mLauncherApps.isActivityEnabled(cn, c.user)) { in loadWorkspace()
465 intent = pmHelper.getAppLaunchIntent(targetPkg, c.user); in loadWorkspace()
490 tempPackageKey.update(targetPkg, c.user); in loadWorkspace()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DLauncherModel.java154 public void onPackageChanged(String packageName, UserHandle user) { in onPackageChanged() argument
156 enqueueModelUpdateTask(new PackageUpdatedTask(op, user, packageName)); in onPackageChanged()
160 public void onPackageRemoved(String packageName, UserHandle user) { in onPackageRemoved() argument
161 onPackagesRemoved(user, packageName); in onPackageRemoved()
164 public void onPackagesRemoved(UserHandle user, String... packages) { in onPackagesRemoved() argument
167 enqueueModelUpdateTask(new PackageUpdatedTask(op, user, packages)); in onPackagesRemoved()
171 public void onPackageAdded(String packageName, UserHandle user) { in onPackageAdded() argument
173 enqueueModelUpdateTask(new PackageUpdatedTask(op, user, packageName)); in onPackageAdded()
177 public void onPackagesAvailable(String[] packageNames, UserHandle user, in onPackagesAvailable() argument
180 new PackageUpdatedTask(PackageUpdatedTask.OP_UPDATE, user, packageNames)); in onPackagesAvailable()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DUserCache.java100 public @NonNull Context getContextForUser(@NonNull UserHandle user) { in getContextForUser() argument
103 userContext = mUserContexts.get(user.getIdentifier()); in getContextForUser()
109 userContext = mContext.createPackageContextAsUser("system", 0, user); in getContextForUser()
111 mUserContexts.put(user.getIdentifier(), userContext); in getContextForUser()
115 throw new RuntimeException("Failed to create context for user " + user, e); in getContextForUser()
125 public boolean userSharesMediaWithParent(@NonNull UserHandle user) { in userSharesMediaWithParent() argument
126 if (Process.myUserHandle().equals(user)) { in userSharesMediaWithParent()
130 boolean found = userSharesMediaWithParentCached(user); in userSharesMediaWithParent()
134 found = userSharesMediaWithParentCached(user); in userSharesMediaWithParent()
147 public boolean userSharesMediaWithParentCached(@NonNull UserHandle user) { in userSharesMediaWithParentCached() argument
[all …]
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/shadows/
DLShadowLauncherApps.java60 protected List<ShortcutInfo> getShortcuts(LauncherApps.ShortcutQuery query, UserHandle user) { in getShortcuts() argument
62 return super.getShortcuts(query, user); in getShortcuts()
69 protected boolean isPackageEnabled(String packageName, UserHandle user) { in isPackageEnabled() argument
70 return !disabledApps.contains(new PackageUserKey(packageName, user)); in isPackageEnabled()
74 protected boolean isActivityEnabled(ComponentName component, UserHandle user) { in isActivityEnabled() argument
75 return !disabledActivities.contains(new ComponentKey(component, user)); in isActivityEnabled()
79 protected LauncherActivityInfo resolveActivity(Intent intent, UserHandle user) { in resolveActivity() argument
82 return ri == null ? null : getLauncherActivityInfo(ri.activityInfo, user); in resolveActivity()
86 ActivityInfo activityInfo, UserHandle user) { in getLauncherActivityInfo() argument
90 ClassParameter.from(UserHandle.class, user)); in getLauncherActivityInfo()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/
DLocationAccessCheck.java226 UserHandle user = mUserManager.getUserForSerialNumber( in loadAlreadyNotifiedPackagesLocked() local
229 if (user != null) { in loadAlreadyNotifiedPackagesLocked()
230 packages.add(new UserPackage(mContext, pkg, user)); in loadAlreadyNotifiedPackagesLocked()
268 Long.valueOf(mUserManager.getSerialNumberForUser(userPkg.user)).toString()); in safeAlreadyNotifiedPackagesLocked()
282 private void markAsNotified(@NonNull String pkg, @NonNull UserHandle user) { in markAsNotified() argument
285 alreadyNotifiedPackages.add(new UserPackage(mContext, pkg, user)); in markAsNotified()
295 private void createPermissionReminderChannel(@NonNull UserHandle user) { in createPermissionReminderChannel() argument
297 NotificationManager.class, user); in createPermissionReminderChannel()
397 LocationManager.class, pkg.user); in addLocationNotificationIfNeeded()
447 UserHandle user = getUserHandleForUid(packageOps.getUid()); in getLocationUsersWithNoNotificationYetLocked() local
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/hibernation/
DHibernationPolicy.kt242 for ((user, stats) in userStats) { in getAppsToHibernate() constant
249 for (user in unusedApps.keys.toList()) { in getAppsToHibernate() method
250 if (user !in userStats.keys) { in getAppsToHibernate()
254 unusedApps.remove(user) in getAppsToHibernate()
258 for ((user, stats) in userStats) { in getAppsToHibernate() method
259 var unusedUserApps = unusedApps[user] ?: continue in getAppsToHibernate()
264 val uidPackages = allPackagesByUserByUid[user]!![packageInfo.uid] in getAppsToHibernate()
281 if (otherUser == user) { in getAppsToHibernate()
293 unusedApps[user] = unusedUserApps in getAppsToHibernate()
302 for ((user, userApps) in unusedApps) { in getAppsToHibernate() constant
[all …]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/
DUsersSpinner.java60 UserInfo user = mUsers[i]; in init() local
61 StringBuilder entry = new StringBuilder().append(user.id).append('-'); in init()
62 if (!TextUtils.isEmpty(user.name)) { in init()
63 entry.append(user.name); in init()
65 if (user.id == UserHandle.USER_SYSTEM) { in init()
68 entry.append(UserInfo.flagsToString(user.flags)); in init()
79 UserInfo user = getSelectedUser(); in init()
80 Log.v(TAG, "onItemSelected(): index=" + position + ", user=" + user); in init()
82 mListener.onUserSelected(user); in init()
97 UserInfo user = getSelectedUser(); in getSelectedUserId() local
[all …]
/packages/apps/Settings/src/com/android/settings/users/
DUserSettings.java423 UserInfo user = mUserManager.getUserInfo(UserHandle.myUserId()); in loadProfile() local
424 if (user.iconPath == null || user.iconPath.equals("")) { in loadProfile()
426 copyMeProfilePhoto(getActivity(), user); in loadProfile() local
428 return user.name; in loadProfile()
693 UserInfo user = mUserManager.getUserInfo(Process.myUserHandle().getIdentifier()); in buildEditCurrentUserDialog() local
694 Drawable userIcon = Utils.getUserIcon(activity, mUserManager, user); in buildEditCurrentUserDialog()
700 user.name, in buildEditCurrentUserDialog()
705 mUserManager.setUserIcon(user.id, in buildEditCurrentUserDialog()
710 if (!TextUtils.isEmpty(newUserName) && !newUserName.equals(user.name)) { in buildEditCurrentUserDialog()
712 mUserManager.setUserName(user.id, newUserName); in buildEditCurrentUserDialog()
[all …]
/packages/services/Car/service/src/com/android/car/user/
DCarUserService.java17 package com.android.car.user;
41 import android.car.user.CarUserManager;
42 import android.car.user.CarUserManager.UserIdentificationAssociationSetValue;
43 import android.car.user.CarUserManager.UserIdentificationAssociationType;
44 import android.car.user.CarUserManager.UserLifecycleEvent;
45 import android.car.user.CarUserManager.UserLifecycleListener;
46 import android.car.user.UserCreationResult;
47 import android.car.user.UserIdentificationAssociationResponse;
48 import android.car.user.UserRemovalResult;
49 import android.car.user.UserStartResult;
[all …]
DUserPreCreator.java17 package com.android.car.user;
92 UserInfo user = allUsers.get(i); in managePreCreatedUsers() local
93 if (!user.preCreated) continue; in managePreCreatedUsers()
94 if (!user.isInitialized()) { in managePreCreatedUsers()
96 + user.toFullString()); in managePreCreatedUsers()
97 invalidPreCreatedUsers.append(user.id, /* notUsed=*/ true); in managePreCreatedUsers()
100 boolean isGuest = user.isGuest(); in managePreCreatedUsers()
101 existingPrecreatedUsers.put(user.id, isGuest); in managePreCreatedUsers()
105 extraPreCreatedUsers.add(user.id); in managePreCreatedUsers()
110 extraPreCreatedUsers.add(user.id); in managePreCreatedUsers()
[all …]
DInitialUserSetter.java16 package com.android.car.user;
421 UserInfo user = mUm.getUserInfo(userId); in switchUser() local
422 if (user == null) { in switchUser()
427 UserInfo actualUser = user; in switchUser()
429 if (user.isGuest() && replaceGuest) { in switchUser()
430 actualUser = replaceGuestIfNeeded(user); in switchUser()
434 + user.toFullString()); in switchUser()
472 public boolean canReplaceGuestUser(UserInfo user) { in canReplaceGuestUser() argument
473 if (!user.isGuest()) return false; in canReplaceGuestUser()
475 if (mLockPatternUtils.isSecure(user.id)) { in canReplaceGuestUser()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/model/data/
DAppInfo.java50 int uc = a.user.hashCode() - b.user.hashCode();
76 public AppInfo(Context context, LauncherActivityInfo info, UserHandle user) { in AppInfo() argument
77 this(info, user, context.getSystemService(UserManager.class).isQuietModeEnabled(user)); in AppInfo()
80 public AppInfo(LauncherActivityInfo info, UserHandle user, boolean quietModeEnabled) { in AppInfo() argument
83 this.user = user; in AppInfo()
101 UserHandle user, Intent intent) { in AppInfo() argument
104 this.user = user; in AppInfo()
116 user = installInfo.user; in AppInfo()
143 return new ComponentKey(componentName, user); in toComponentKey()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/model/
DRole.java370 public boolean isAvailableAsUser(@NonNull UserHandle user, @NonNull Context context) { in isAvailableAsUser() argument
375 return mBehavior.isAvailableAsUser(this, user, context); in isAvailableAsUser()
510 public boolean isVisibleAsUser(@NonNull UserHandle user, @NonNull Context context) { in isVisibleAsUser() argument
511 return mVisible && (mBehavior == null || mBehavior.isVisibleAsUser(this, user, context)); in isVisibleAsUser()
534 public Intent getManageIntentAsUser(@NonNull UserHandle user, @NonNull Context context) { in getManageIntentAsUser() argument
536 return mBehavior.getManageIntentAsUser(this, user, context); in getManageIntentAsUser()
549 @NonNull UserHandle user, @NonNull Context context) { in preparePreferenceAsUser() argument
551 mBehavior.preparePreferenceAsUser(this, preference, user, context); in preparePreferenceAsUser()
565 @NonNull UserHandle user, @NonNull Context context) { in isApplicationVisibleAsUser() argument
567 return mBehavior.isApplicationVisibleAsUser(this, applicationInfo, user, context); in isApplicationVisibleAsUser()
[all …]
/packages/services/Car/user/car-user-lib/src/android/car/userlib/
DUserHelper.java76 public static void grantAdminPermissions(@NonNull Context context, @NonNull UserInfo user) { in grantAdminPermissions() argument
78 Preconditions.checkArgument(user != null, "User cannot be null"); in grantAdminPermissions()
87 userManager.setUserAdmin(user.id); in grantAdminPermissions()
89 UserHandle userHandle = user.getUserHandle(); in grantAdminPermissions()
108 @NonNull UserInfo user, boolean enable) { in setDefaultNonAdminRestrictions() argument
110 Preconditions.checkArgument(user != null, "User cannot be null"); in setDefaultNonAdminRestrictions()
114 userManager.setUserRestriction(restriction, enable, user.getUserHandle()); in setDefaultNonAdminRestrictions()
126 public static Bitmap assignDefaultIcon(@NonNull Context context, @NonNull UserInfo user) { in assignDefaultIcon() argument
128 Preconditions.checkArgument(user != null, "User cannot be null"); in assignDefaultIcon()
130 int idForIcon = user.isGuest() ? UserHandle.USER_NULL : user.id; in assignDefaultIcon()
[all …]
/packages/services/Car/service/src/com/android/car/pm/
DVendorServiceController.java22 import android.car.user.CarUserManager;
23 import android.car.user.CarUserManager.UserLifecycleEvent;
24 import android.car.user.CarUserManager.UserLifecycleListener;
44 import com.android.car.user.CarUserService;
194 private void startOrBindServicesForUser(UserHandle user) { in startOrBindServicesForUser() argument
195 boolean unlocked = mUserManager.isUserUnlockingOrUnlocked(user); in startOrBindServicesForUser()
196 boolean systemUser = UserHandle.SYSTEM.equals(user); in startOrBindServicesForUser()
204 startOrBindService(service, user); in startOrBindServicesForUser()
217 private void startOrBindService(VendorServiceInfo service, UserHandle user) { in startOrBindService() argument
218 ConnectionKey key = ConnectionKey.of(service, user); in startOrBindService()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DInitialUserSetterTest.java16 package com.android.car.user;
61 import com.android.car.user.InitialUserSetter.Builder;
62 import com.android.car.user.InitialUserSetter.InitialUserInfo;
155 UserInfo user = expectUserExists(USER_ID); in testSwitchUser_ok_nonGuest() local
165 assertInitialUserSet(user); in testSwitchUser_ok_nonGuest()
170 UserInfo user = expectUserExists(UserHandle.USER_SYSTEM); in testSwitchUser_ok_systemUser() local
180 assertInitialUserSet(user); in testSwitchUser_ok_systemUser()
301 UserInfo user = newSecondaryUser(USER_ID); in testReplaceGuestIfNeeded_nonGuest() local
303 assertThat(mSetter.replaceGuestIfNeeded(user)).isSameInstanceAs(user); in testReplaceGuestIfNeeded_nonGuest()
312 UserInfo user = newGuestUser(USER_ID, /* ephemeral= */ false); in testReplaceGuestIfNeeded_ok_nonEphemeralGuest() local
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/
DAddNewProfileTask.java19 import android.car.user.CarUserManager;
20 import android.car.user.UserCreationResult;
55 UserInfo user = result.getUser(); in doInBackground() local
56 if (user != null) { in doInBackground()
57 UserHelper.setDefaultNonAdminRestrictions(mContext, user, /* enable= */ true); in doInBackground()
58 UserHelper.assignDefaultIcon(mContext, user); in doInBackground()
63 return user; in doInBackground()
78 protected void onPostExecute(UserInfo user) { in onPostExecute() argument
79 if (user != null) { in onPostExecute()
81 mCarUserManager.switchUser(user.id); in onPostExecute()
/packages/apps/Dialer/java/com/android/dialer/logging/
Ddialer_impression.proto27 // Number not identified as spam and the user tapped the block/report spam
31 // Number identified as spam and the user tapped on the block number call
36 // This does not deal with whether the user reported this spam or not while
38 // REPORT_AS_NOT_SPAM_VIA_UNBLOCK_NUMBER. If the user had not reported it as
43 // Number was identified as spam, and the user tapped that it was not spam
46 // Confirmation dialog in which the user confirmed that the number was not
51 // This happens when the user had initially blocked a number and also
57 // A number that was identified as spam and the user proceeded to block it.
59 // the user also acknowledged that they were going to be reporting this as
60 // spam. There is no option for the user in this case to not report it as
[all …]
/packages/modules/Permission/framework-s/java/android/app/role/
DRoleManager.java305 public List<String> getRoleHoldersAsUser(@NonNull String roleName, @NonNull UserHandle user) { in getRoleHoldersAsUser() argument
307 Objects.requireNonNull(user, "user cannot be null"); in getRoleHoldersAsUser()
309 return mService.getRoleHoldersAsUser(roleName, user.getIdentifier()); in getRoleHoldersAsUser()
339 @ManageHoldersFlags int flags, @NonNull UserHandle user, in addRoleHolderAsUser() argument
343 Objects.requireNonNull(user, "user cannot be null"); in addRoleHolderAsUser()
347 mService.addRoleHolderAsUser(roleName, packageName, flags, user.getIdentifier(), in addRoleHolderAsUser()
377 @ManageHoldersFlags int flags, @NonNull UserHandle user, in removeRoleHolderAsUser() argument
381 Objects.requireNonNull(user, "user cannot be null"); in removeRoleHolderAsUser()
385 mService.removeRoleHolderAsUser(roleName, packageName, flags, user.getIdentifier(), in removeRoleHolderAsUser()
414 @NonNull UserHandle user, @CallbackExecutor @NonNull Executor executor, in clearRoleHoldersAsUser() argument
[all …]

12345678910>>...23