/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/permission/ |
D | GrantTimePersistenceUnitTest.java | 90 private final UserHandle mUser = UserHandle.of(UserHandle.myUserId()); field in GrantTimePersistenceUnitTest 111 datastore.writeForUser(DEFAULT_STATE, mUser, DATA_TYPE_CURRENT); in testWriteReadData_packageAndSharedUserState_restoredCorrectly() 112 UserGrantTimeState restoredState = datastore.readForUser(mUser, DATA_TYPE_CURRENT); in testWriteReadData_packageAndSharedUserState_restoredCorrectly() 119 datastore.writeForUser(SHARED_USERS_STATE, mUser, DATA_TYPE_CURRENT); in testWriteReadData_multipleSharedUserState_restoredCorrectly() 120 UserGrantTimeState restoredState = datastore.readForUser(mUser, DATA_TYPE_CURRENT); in testWriteReadData_multipleSharedUserState_restoredCorrectly() 127 datastore.writeForUser(PACKAGES_STATE, mUser, DATA_TYPE_CURRENT); in testWriteReadData_multiplePackagesState_restoredCorrectly() 128 UserGrantTimeState restoredState = datastore.readForUser(mUser, DATA_TYPE_CURRENT); in testWriteReadData_multiplePackagesState_restoredCorrectly() 135 datastore.writeForUser(EMPTY_STATE, mUser, DATA_TYPE_CURRENT); in testWriteReadData_emptyState_restoredCorrectly() 136 UserGrantTimeState restoredState = datastore.readForUser(mUser, DATA_TYPE_CURRENT); in testWriteReadData_emptyState_restoredCorrectly() 143 datastore.writeForUser(PACKAGES_STATE, mUser, DATA_TYPE_CURRENT); in testWriteReadData_overwroteState_restoredCorrectly() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/ |
D | MockedUserHandleBuilder.java | 25 private final UserHandle mUser; field in MockedUserHandleBuilder 31 mUser = UserHandle.of(userId); in MockedUserHandleBuilder() 33 when(mUserHandleHelper.isEnabledUser(mUser)).thenReturn(true); in MockedUserHandleBuilder() 34 when(mUserHandleHelper.getExistingUserHandle(userId)).thenReturn(mUser); in MockedUserHandleBuilder() 38 when(mUserHandleHelper.isEnabledUser(mUser)).thenReturn(false); in setDisabled() 43 when(mUserHandleHelper.isAdminUser(mUser)).thenReturn(true); in setAdmin() 48 when(mUserHandleHelper.isGuestUser(mUser)).thenReturn(true); in setGuest() 53 when(mUserHandleHelper.isEphemeralUser(mUser)).thenReturn(true); in setEphemeral() 58 when(mUserHandleHelper.isManagedProfile(mUser)).thenReturn(true); in setManagedProfile() 64 when(mUserHandleHelper.isAdminUser(mUser)).thenThrow(exception); in expectGettersFail() [all …]
|
/packages/modules/AppSearch/testing/mockingservicestests/src/com/android/server/appsearch/ |
D | AppSearchModuleTest.java | 62 private TargetUser mUser; field in AppSearchModuleTest 75 mUser = new TargetUser(userInfo); in setUp() 128 mLifecycle.onUserUnlocking(mUser); in testBothIndexersEnabled() 129 verify(mContactsIndexerService).onUserUnlocking(mUser); in testBothIndexersEnabled() 130 verify(mAppsIndexerService).onUserUnlocking(mUser); in testBothIndexersEnabled() 132 mLifecycle.onUserStopping(mUser); in testBothIndexersEnabled() 133 verify(mContactsIndexerService).onUserStopping(mUser); in testBothIndexersEnabled() 134 verify(mAppsIndexerService).onUserStopping(mUser); in testBothIndexersEnabled() 150 mLifecycle.onUserUnlocking(mUser); in testContactsIndexerDisabled() 151 verify(mAppsIndexerService).onUserUnlocking(mUser); in testContactsIndexerDisabled() [all …]
|
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/service/ |
D | RoleControllerServiceImpl.java | 53 private UserHandle mUser; field in RoleControllerServiceImpl 71 mUser = user; in init() 81 Log.i(LOG_TAG, "Granting default roles, user: " + mUser.myUserId()); in onGrantDefaultRoles() 93 if (!role.isAvailableAsUser(mUser, mContext)) { in onGrantDefaultRoles() 114 role.onRoleAddedAsUser(mUser, mContext); in onGrantDefaultRoles() 133 if (role.isPackageQualifiedAsUser(packageName, mUser, mContext)) { in onGrantDefaultRoles() 155 packageNamesToAdd = role.getDefaultHoldersAsUser(mUser, mContext); in onGrantDefaultRoles() 159 role.getFallbackHolderAsUser(mUser, mContext)); in onGrantDefaultRoles() 172 if (!role.isPackageQualifiedAsUser(packageName, mUser, mContext)) { in onGrantDefaultRoles() 222 if (!role.isAvailableAsUser(mUser, mContext)) { in onAddRoleHolder() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | PackageUpdatedTask.java | 92 private final UserHandle mUser; field in PackageUpdatedTask 100 mUser = user; in PackageUpdatedTask() 116 ? ItemInfoMatcher.ofUser(mUser) // We want to update all packages for this user in execute() 117 : ItemInfoMatcher.ofPackages(packageSet, mUser); in execute() 127 iconCache.updateIconsForPkg(packages[i], mUser); in execute() 133 appsList.removePackage(packages[i], mUser); in execute() 136 appsList.addPackage(context, packages[i], mUser)); in execute() 150 iconCache.updateIconsForPkg(packages[i], mUser); in execute() 152 appsList.updatePackage(context, packages[i], mUser)); in execute() 160 iconCache.removeIconsForPkg(packages[i], mUser); in execute() [all …]
|
D | ShortcutsChangedTask.java | 51 private final UserHandle mUser; field in ShortcutsChangedTask 60 mUser = user; in ShortcutsChangedTask() 73 dataModel.forAllWorkspaceItemInfos(mUser, si -> { in execute() 86 if (!packageManagerHelper.isAppInstalled(mPackageName, mUser) in execute() 87 && !packageManagerHelper.isAppArchivedForUser(mPackageName, mUser)) { in execute() 97 List<ShortcutInfo> shortcuts = new ShortcutRequest(context, mUser) in execute() 124 .map(id -> new ShortcutKey(mPackageName, mUser, id)) in execute() 132 dataModel.updateDeepShortcutCounts(mPackageName, mUser, mShortcuts); in execute()
|
D | UserLockStateChangedTask.java | 47 private final UserHandle mUser; field in UserLockStateChangedTask 51 mUser = user; in UserLockStateChangedTask() 63 QueryResult shortcuts = new ShortcutRequest(context, mUser) in execute() 82 dataModel.forAllWorkspaceItemInfos(mUser, si -> { in execute() 114 if (keysIter.next().user.equals(mUser)) { in execute() 121 null, mUser, in execute() 122 new ShortcutRequest(context, mUser).query(ShortcutRequest.ALL)); in execute()
|
D | CacheDataUpdatedTask.java | 42 private final UserHandle mUser; field in CacheDataUpdatedTask 50 mUser = user; in CacheDataUpdatedTask() 61 dataModel.forAllWorkspaceItemInfos(mUser, si -> { in execute() 70 apps.updateIconsAndLabels(mPackages, mUser); in execute()
|
D | PackageIncrementalDownloadUpdatedTask.java | 37 private final UserHandle mUser; field in PackageIncrementalDownloadUpdatedTask 46 mUser = user; in PackageIncrementalDownloadUpdatedTask() 58 mUser); in execute() 74 dataModel.forAllWorkspaceItemInfos(mUser, si -> { in execute()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/ |
D | RoleListLiveData.java | 49 private final UserHandle mUser; field in RoleListLiveData 55 mUser = user; in RoleListLiveData() 65 mUser); in onActive() local 71 roleManager.removeOnRoleHoldersChangedListenerAsUser(this, mUser); in onInactive() 95 if (!role.isAvailableAsUser(mUser, mContext)) { in loadValueInBackground() 99 if (!role.isVisibleAsUser(mUser, mContext)) { in loadValueInBackground() 103 if (mExclusive && role.getQualifyingPackagesAsUser(mUser, mContext).isEmpty()) { in loadValueInBackground() 109 mUser); in loadValueInBackground() 116 holderPackageName, mUser, mContext); in loadValueInBackground() 119 + holderPackageName + ", user id: " + mUser.getIdentifier()); in loadValueInBackground()
|
D | DefaultAppViewModel.java | 47 private final UserHandle mUser; field in DefaultAppViewModel 61 mUser = user; in DefaultAppViewModel() 63 mRoleLiveData = Transformations.map(new RoleLiveData(mRole, mUser, application), in DefaultAppViewModel() 88 mUser, getApplication()); in setDefaultApp() local 96 mRole.onNoneHolderSelectedAsUser(mUser, context); in setNoneDefaultApp() 101 mManageRoleHolderStateLiveData.clearRoleHoldersAsUser(mRole.getName(), 0, mUser, context); in setNoneDefaultApp() local 113 private UserHandle mUser; field in DefaultAppViewModel.Factory 121 mUser = user; in Factory() 129 return (T) new DefaultAppViewModel(mRole, mUser, mApplication); in create()
|
D | RoleLiveData.java | 49 private final UserHandle mUser; field in RoleLiveData 55 mUser = user; in RoleLiveData() 64 roleManager.addOnRoleHoldersChangedListenerAsUser(mContext.getMainExecutor(), this, mUser); in onActive() local 70 roleManager.removeOnRoleHoldersChangedListenerAsUser(this, mUser); in onInactive() 82 List<String> holderPackageNames = roleManager.getRoleHoldersAsUser(mRole.getName(), mUser); in loadValueInBackground() 84 List<String> qualifyingPackageNames = mRole.getQualifyingPackagesAsUser(mUser, mContext); in loadValueInBackground() 91 qualifyingPackageName, mUser, mContext); in loadValueInBackground() 97 if (!mRole.isApplicationVisibleAsUser(qualifyingApplicationInfo, mUser, mContext)) { in loadValueInBackground()
|
D | DefaultAppListViewModel.java | 42 private final UserHandle mUser; field in DefaultAppListViewModel 57 mUser = Process.myUserHandle(); in DefaultAppListViewModel() 59 mLiveData = Transformations.map(new RoleListLiveData(true, mUser, application), in DefaultAppListViewModel() 78 return mUser; in getUser()
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaVolume.java | 54 private final @Nullable UserHandle mUser; field in MediaVolume 81 return mUser; in getUser() 103 this.mUser = user; in MediaVolume() 112 this.mUser = in.readParcelable(null); in MediaVolume() 129 Objects.equals(mUser, that.mUser) && in equals() 136 return Objects.hash(mName, mUser, mId, mExternallyManaged); in hashCode() 140 return mUser == null || user.equals(mUser); in isVisibleToUser() 187 dest.writeParcelable(mUser, flags); in writeToParcel() 196 return "MediaVolume name: [" + mName + "] id: [" + mId + "] user: [" + mUser + "] path: [" in toString()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/ |
D | RestrictedButtonTest.java | 52 private UserHandle mUser; field in RestrictedButtonTest 61 mUser = UserHandle.of(userId); in setUp() 67 mUser, in setUp() 80 mButton.init(mUser, UserManager.DISALLOW_ADJUST_VOLUME); in performClick_noRestriction_shouldCallListener() 89 mButton.init(mUser, UserManager.DISALLOW_MODIFY_ACCOUNTS); in performClick_hasRestriction_shouldNotCallListener() 98 mButton.init(mUser, UserManager.DISALLOW_ADJUST_VOLUME); in updateState_noRestriction_shouldEnableButton() 107 mButton.init(mUser, UserManager.DISALLOW_MODIFY_ACCOUNTS); in updateState_noRestriction_shoulddisableButton()
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/ |
D | NonCurrentUserController.java | 52 UserInfo mUser; field in NonCurrentUserController 95 mUser = info; in NonCurrentUserController() 110 mUser = info; in NonCurrentUserController() 122 mStoragePreference.setTitle(mUser.name); in displayPreference() 123 mStoragePreference.setKey(PREFERENCE_KEY_BASE + mUser.id); in displayPreference() 147 return mUser; in getUser() 204 mUserIcon = fetchedIcons.get(mUser.id); in handleUserIcons()
|
/packages/services/Car/car-lib/src/android/car/user/ |
D | UserCreationResult.java | 110 private final UserHandle mUser; field in UserCreationResult 244 this.mUser = user; in UserCreationResult() 282 return mUser; in getUser() 313 ", user = " + mUser + ", " + in toString() 327 if (mUser != null) flg |= 0x4; in writeToParcel() 333 if (mUser != null) dest.writeTypedObject(mUser, flags); in writeToParcel() 369 this.mUser = user; in UserCreationResult()
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/migration/ |
D | MigrationBroadcast.java | 58 private final UserHandle mUser; field in MigrationBroadcast 68 mUser = user; in MigrationBroadcast() 115 Context userContext = mContext.createContextAsUser(mUser, 0); in sendInvocationBroadcast() 126 mContext.sendBroadcastAsUser(intent, mUser); in sendInvocationBroadcast() 131 Slog.d(TAG, "User " + mUser + " is not currently active"); in sendInvocationBroadcast() 165 mUser); in queryAndSetComponentForIntent()
|
/packages/apps/Launcher3/src/com/android/launcher3/util/ |
D | PackageUserKey.java | 22 public UserHandle mUser; field in PackageUserKey 58 mUser = user; in update() 86 && Objects.equals(mUser, otherKey.mUser); in equals() 92 return mPackageName + "#" + mUser + ",category=" + mWidgetCategory; in toString()
|
/packages/apps/Settings/src/com/android/settings/users/ |
D | AppCopyFragment.java | 52 protected UserHandle mUser; field in AppCopyFragment 93 mUser = new UserHandle(icicle.getInt(EXTRA_USER_ID)); in init() 98 mUser = new UserHandle(args.getInt(EXTRA_USER_ID)); in init() 102 if (mUser == null) { in init() 106 mHelper = new AppCopyHelper(getContext(), mUser); in init() 122 outState.putInt(EXTRA_USER_ID, mUser.getIdentifier()); in onSaveInstanceState() 194 if (Utils.getExistingUser(mUserManager, mUser) == null) { in populateApps()
|
D | AppRestrictionsFragment.java | 85 protected UserHandle mUser; field in AppRestrictionsFragment 218 mUser = new UserHandle(icicle.getInt(EXTRA_USER_ID)); in init() 223 mUser = new UserHandle(args.getInt(EXTRA_USER_ID)); in init() 229 if (mUser == null) { in init() 230 mUser = android.os.Process.myUserHandle(); in init() 233 mHelper = new AppRestrictionsHelper(getContext(), mUser); in init() 237 mRestrictedProfile = mUserManager.getUserInfo(mUser.getIdentifier()).isRestricted(); in init() 257 outState.putInt(EXTRA_USER_ID, mUser.getIdentifier()); in onSaveInstanceState() 355 final int userId = mUser.getIdentifier(); in populateApps() 358 if (Utils.getExistingUser(mUserManager, mUser) == null) { in populateApps() [all …]
|
/packages/modules/IntentResolver/java/src/com/android/intentresolver/model/ |
D | AppPredictionServiceResolverComparator.java | 62 private final UserHandle mUser; field in AppPredictionServiceResolverComparator 83 mUser = user; in AppPredictionServiceResolverComparator() 106 mUser) in doCompute() 138 mUser, in onAppTargetsSorted() 230 mAppPredictor, mResolverRankerService, mUser, mTargetRanks); in buildUpdatedModel() 238 private final UserHandle mUser; field in AppPredictionServiceResolverComparator.AppPredictionServiceComparatorModel 248 mUser = user; in AppPredictionServiceComparatorModel() 296 new AppTarget.Builder(targetId, targetComponent.getPackageName(), mUser) in notifyOnTargetSelected()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/ |
D | AllAppPermissionsFragment.java | 72 private UserHandle mUser; field in AllAppPermissionsFragment 107 mUser = getArguments().getParcelable(Intent.EXTRA_USER); in onCreate() 108 if (mPackageName == null || mUser == null) { in onCreate() 115 mPackageName, mUser, mFilterGroup); in onCreate() 176 mPackageName, mUser); in updateUi() 178 mPackageName, mUser); in updateUi() 185 setHeader(icon, label, infoIntent, mUser, false); in updateUi() 251 getActivity().getApplication(), mPackageName, groupName, mUser, false); in getPreference()
|
D | PermissionControlPreference.java | 72 private @NonNull UserHandle mUser; field in PermissionControlPreference 100 mUser = user; in PermissionControlPreference() 220 mContext.startActivityAsUser(intent, mUser); in onBindViewHolder() 224 LocationUtils.startLocationControllerExtraPackageSettings(mContext, mUser); in onBindViewHolder() 227 Utils.navigateToAppNotificationSettings(mContext, mPackageName, mUser); in onBindViewHolder() 232 Utils.navigateToAppHealthConnectSettings(mContext, mPackageName, mUser); in onBindViewHolder() 238 args.putParcelable(Intent.EXTRA_USER, mUser); in onBindViewHolder() 251 intent.putExtra(Intent.EXTRA_USER, mUser); in onBindViewHolder()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/ |
D | AppRestrictionsFragment.java | 97 private UserHandle mUser; field in AppRestrictionsFragment 267 mUser = new UserHandle(savedInstanceState.getInt(EXTRA_USER_ID)); in onCreate() 278 mUser = new UserHandle(args.getInt(EXTRA_USER_ID)); in onCreate() 285 if (mUser == null) { in onCreate() 286 mUser = android.os.Process.myUserHandle(); in onCreate() 289 mHelper = new AppRestrictionsHelper(getContext(), mUser); in onCreate() 294 mRestrictedProfile = mUserManager.getUserInfo(mUser.getIdentifier()).isRestricted(); in onCreate() 316 outState.putInt(EXTRA_USER_ID, mUser.getIdentifier()); in onSaveInstanceState() 428 final int userId = mUser.getIdentifier(); in populateApps() 431 if (getExistingUser(mUserManager, mUser) == null) { in populateApps() [all …]
|