Home
last modified time | relevance | path

Searched refs:userState (Results 1 – 21 of 21) sorted by relevance

/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DAccessibilityServiceConnection.java67 public AccessibilityServiceConnection(UserState userState, Context context, in AccessibilityServiceConnection() argument
75 mUserStateWeakReference = new WeakReference<UserState>(userState); in AccessibilityServiceConnection()
90 UserState userState = mUserStateWeakReference.get(); in bindLocked() local
91 if (userState == null) return; in bindLocked()
96 if (userState.getBindInstantServiceAllowed()) { in bindLocked()
100 mIntent, this, flags, new UserHandle(userState.mUserId))) { in bindLocked()
101 userState.getBindingServicesLocked().add(mComponentName); in bindLocked()
110 UserState userState = mUserStateWeakReference.get(); in unbindLocked() local
111 if (userState == null) return; in unbindLocked()
112 userState.removeServiceLocked(this); in unbindLocked()
[all …]
DAccessibilityManagerService.java356 final UserState userState = getUserState(userId); in getBindInstantServiceAllowed() local
357 if (userState == null) return false; in getBindInstantServiceAllowed()
358 return userState.getBindInstantServiceAllowed(); in getBindInstantServiceAllowed()
362 UserState userState; in setBindInstantServiceAllowed() local
364 userState = getUserState(userId); in setBindInstantServiceAllowed()
365 if (userState == null) { in setBindInstantServiceAllowed()
369 userState = new UserState(userId); in setBindInstantServiceAllowed()
370 mUserStates.put(userId, userState); in setBindInstantServiceAllowed()
373 userState.setBindInstantServiceAllowed(allowed); in setBindInstantServiceAllowed()
387 UserState userState = getCurrentUserStateLocked(); in registerBroadcastReceivers()
[all …]
/frameworks/base/services/print/java/com/android/server/print/
DPrintManagerService.java174 final UserState userState; in print() local
183 userState = getOrCreateUserStateLocked(resolvedUserId, false); in print()
187 return userState.print(printJobName, adapter, attributes, in print()
198 final UserState userState; in getPrintJobInfos() local
205 userState = getOrCreateUserStateLocked(resolvedUserId, false); in getPrintJobInfos()
209 return userState.getPrintJobInfos(resolvedAppId); in getPrintJobInfos()
223 final UserState userState; in getPrintJobInfo() local
230 userState = getOrCreateUserStateLocked(resolvedUserId, false); in getPrintJobInfo()
234 return userState.getPrintJobInfo(printJobId, resolvedAppId); in getPrintJobInfo()
245 final UserState userState; in getCustomPrinterIcon() local
[all …]
/frameworks/base/services/core/java/com/android/server/textclassifier/
DTextClassificationManagerService.java108 UserState userState = mManagerService.peekUserStateLocked(userId); in onStopUser() local
109 if (userState != null) { in onStopUser()
110 userState.mConnection.cleanupService(); in onStopUser()
138 UserState userState = getCallingUserStateLocked(); in onSuggestSelection() local
139 if (!userState.bindLocked()) { in onSuggestSelection()
141 } else if (userState.isBoundLocked()) { in onSuggestSelection()
142 userState.mService.onSuggestSelection(sessionId, request, callback); in onSuggestSelection()
144 userState.mPendingRequests.add(new PendingRequest( in onSuggestSelection()
146 callback::onFailure, callback.asBinder(), this, userState)); in onSuggestSelection()
161 UserState userState = getCallingUserStateLocked(); in onClassifyText() local
[all …]
/frameworks/base/services/core/java/com/android/server/attention/
DAttentionManagerService.java191 final UserState userState = getOrCreateCurrentUserStateLocked(); in checkAttention() local
193 userState.bindLocked(); in checkAttention()
196 final AttentionCheckCache cache = userState.mAttentionCheckCache; in checkAttention()
203 if (userState.mCurrentAttentionCheck != null) { in checkAttention()
204 if (!userState.mCurrentAttentionCheck.mIsDispatched in checkAttention()
205 || !userState.mCurrentAttentionCheck.mIsFulfilled) { in checkAttention()
210 userState.mCurrentAttentionCheck = createAttentionCheck(callbackInternal, userState); in checkAttention()
212 if (userState.mService != null) { in checkAttention()
216 userState.mService.checkAttention( in checkAttention()
217 userState.mCurrentAttentionCheck.mIAttentionCallback); in checkAttention()
[all …]
/frameworks/base/services/core/java/com/android/server/tv/
DTvInputManagerService.java266 UserState userState = getOrCreateUserStateLocked(userId); in buildTvInputListLocked() local
267 userState.packageSet.clear(); in buildTvInputListLocked()
286 ServiceState serviceState = userState.serviceStateMap.get(component); in buildTvInputListLocked()
291 userState.serviceStateMap.put(component, serviceState); in buildTvInputListLocked()
305 userState.packageSet.add(si.packageName); in buildTvInputListLocked()
313 TvInputState inputState = userState.inputMap.get(info.getId()); in buildTvInputListLocked()
322 if (!userState.inputMap.containsKey(inputId)) { in buildTvInputListLocked()
323 notifyInputAddedLocked(userState, inputId); in buildTvInputListLocked()
330 notifyInputUpdatedLocked(userState, inputId); in buildTvInputListLocked()
337 for (String inputId : userState.inputMap.keySet()) { in buildTvInputListLocked()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DForegroundServiceNotificationListener.java86 public boolean updateUserState(ForegroundServicesUserState userState) { in removeNotification() argument
90 userState.setRunningServices(null, 0); in removeNotification()
95 return userState.removeNotification(sbn.getPackageName(), sbn.getKey()); in removeNotification()
118 userState -> { in updateNotification()
124 userState.setRunningServices(svcs, sbn.getNotification().when); in updateNotification()
127 userState.removeNotification(sbn.getPackageName(), sbn.getKey()); in updateNotification()
131 userState.addImportantNotification(sbn.getPackageName(), in updateNotification()
138 userState.addStandardLayoutNotification( in updateNotification()
DForegroundServiceController.java124 ForegroundServicesUserState userState = mUserServices.get(userId); in updateUserState() local
125 if (userState == null) { in updateUserState()
127 userState = new ForegroundServicesUserState(); in updateUserState()
128 mUserServices.put(userId, userState); in updateUserState()
133 return updateCallback.updateUserState(userState); in updateUserState()
166 boolean updateUserState(ForegroundServicesUserState userState); in updateUserState() argument
/frameworks/base/services/core/java/com/android/server/pm/permission/
DPermissionsState.java737 PermissionState userState = mUserStates.get(userId); in isGranted() local
738 if (userState == null) { in isGranted()
742 return userState.mGranted; in isGranted()
754 PermissionState userState = mUserStates.get(userId); in grant() local
755 if (userState == null) { in grant()
756 userState = new PermissionState(mPerm.getName()); in grant()
757 mUserStates.put(userId, userState); in grant()
760 userState.mGranted = true; in grant()
774 PermissionState userState = mUserStates.get(userId); in revoke() local
775 userState.mGranted = false; in revoke()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DUserControllerTest.java208 UserState userState = (UserState) reportMsg.obj; in startForegroundUserAssertions() local
209 assertNotNull(userState); in startForegroundUserAssertions()
210 assertEquals(TEST_USER_ID, userState.mHandle.getIdentifier()); in startForegroundUserAssertions()
211 assertEquals("User must be in STATE_BOOTING", UserState.STATE_BOOTING, userState.state); in startForegroundUserAssertions()
239 UserState userState = (UserState) reportMsg.obj; in testDispatchUserSwitch() local
244 mUserController.dispatchUserSwitch(userState, oldUserId, newUserId); in testDispatchUserSwitch()
251 userState = (UserState) conMsg.obj; in testDispatchUserSwitch()
252 assertNotNull(userState); in testDispatchUserSwitch()
253 assertEquals(TEST_USER_ID, userState.mHandle.getIdentifier()); in testDispatchUserSwitch()
254 assertEquals("User must be in STATE_BOOTING", UserState.STATE_BOOTING, userState.state); in testDispatchUserSwitch()
[all …]
/frameworks/base/core/java/android/content/pm/
DSELinuxUtil.java34 public static String assignSeinfoUser(PackageUserState userState) { in assignSeinfoUser() argument
35 if (userState.instantApp) { in assignSeinfoUser()
/frameworks/base/services/core/java/com/android/server/role/
DRoleManagerService.java217 RoleUserState userState; in performInitialGrantsIfNecessaryAsync() local
218 userState = getOrCreateUserState(userId); in performInitialGrantsIfNecessaryAsync()
221 String oldPackagesHash = userState.getPackagesHash(); in performInitialGrantsIfNecessaryAsync()
240 userState.setPackagesHash(packagesHash); in performInitialGrantsIfNecessaryAsync()
265 RoleUserState userState = getOrCreateUserState(userId); in migrateRoleIfNecessary() local
266 if (!userState.isRoleAvailable(role)) { in migrateRoleIfNecessary()
272 userState.addRoleName(role); in migrateRoleIfNecessary()
275 userState.addRoleHolder(role, roleHolders.get(i)); in migrateRoleIfNecessary()
315 RoleUserState userState = mUserStates.get(userId); in getOrCreateUserState() local
316 if (userState == null) { in getOrCreateUserState()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageManagerSettingsTests.java462 final PackageUserState userState = testPkgSetting01.readUserState(0); in testUpdatePackageSetting01() local
464 verifyUserState(userState, oldUserState, false /*userStateChanged*/, false /*notLaunched*/, in testUpdatePackageSetting01()
496 final PackageUserState userState = testPkgSetting01.readUserState(0); in testUpdatePackageSetting02() local
501 verifyUserState(userState, oldUserState, false /*userStateChanged*/, false /*notLaunched*/, in testUpdatePackageSetting02()
577 final PackageUserState userState = testPkgSetting01.readUserState(0); in testCreateNewSetting01() local
578 verifyUserState(userState, null /*oldUserState*/, false /*userStateChanged*/, in testCreateNewSetting01()
618 final PackageUserState userState = testPkgSetting01.readUserState(0); in testCreateNewSetting02() local
619 verifyUserState(userState, null /*oldUserState*/, false /*userStateChanged*/, in testCreateNewSetting02()
665 final PackageUserState userState = testPkgSetting01.readUserState(0); in testCreateNewSetting03() local
666 verifyUserState(userState, null /*oldUserState*/, false /*userStateChanged*/, in testCreateNewSetting03()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DComponentResolver.java1237 final PackageUserState userState = ps.readUserState(userId); in newResult() local
1239 PackageParser.generateActivityInfo(activity, mFlags, userState, userId); in newResult()
1257 if (matchVisibleToInstantApp && !(componentVisible || userState.instantApp)) { in newResult()
1271 if (!matchInstantApp && userState.instantApp) { in newResult()
1279 if (userState.instantApp && ps.isUpdateAvailable()) { in newResult()
1306 res.isInstantAppAvailable = userState.instantApp; in newResult()
1504 final PackageUserState userState = ps.readUserState(userId); in newResult() local
1510 && !(info.isVisibleToInstantApp() || userState.instantApp)) { in newResult()
1514 if (!isInstantApp && userState.instantApp) { in newResult()
1519 if (userState.instantApp && ps.isUpdateAvailable()) { in newResult()
[all …]
DPackageSettingBase.java636 PackageUserState userState = modifyUserState(userId); in setHarmfulAppWarning() local
637 userState.harmfulAppWarning = harmfulAppWarning; in setHarmfulAppWarning()
641 PackageUserState userState = readUserState(userId); in getHarmfulAppWarning() local
642 return userState.harmfulAppWarning; in getHarmfulAppWarning()
DUserManagerService.java3994 public void setUserState(int userId, int userState) { in setUserState() argument
3996 mUserStates.put(userId, userState); in setUserState()
DSettings.java4226 final PackageUserState userState = ps.readUserState(userId); in isEnabledAndMatchLPr()
4227 return userState.isMatch(componentInfo, flags); in isEnabledAndMatchLPr()
/frameworks/base/core/java/android/os/
DUserManagerInternal.java176 public abstract void setUserState(int userId, int userState); in setUserState() argument
/frameworks/base/services/core/java/com/android/server/wm/
DActivityTaskManagerInternal.java505 public abstract boolean switchUser(int userId, UserState userState); in switchUser() argument
DActivityTaskManagerService.java7226 public boolean switchUser(int userId, UserState userState) { in switchUser() argument
7228 return mRootActivityContainer.switchUser(userId, userState); in switchUser()
/frameworks/base/services/core/java/com/android/server/am/
DActivityManagerService.java16635 UserState userState = mUserController.getStartedUserState(app.userId); in maybeUpdateProviderUsageStatsLocked() local
16636 if (userState == null) return; in maybeUpdateProviderUsageStatsLocked()
16638 Long lastReported = userState.mProviderLastReportedFg.get(authority); in maybeUpdateProviderUsageStatsLocked()
16645 userState.mProviderLastReportedFg.put(authority, now); in maybeUpdateProviderUsageStatsLocked()
17595 final UserState userState = mUserController.getStartedUserState(userId); in getStartedUserState() local
17596 return UserState.stateToString(userState.state); in getStartedUserState()