Home
last modified time | relevance | path

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

/packages/modules/IntentResolver/tests/shared/src/com/android/intentresolver/data/repository/
DFakeUserRepository.kt28 private val userState = MutableStateFlow(userList.map { UserState(it, available = true) }) in <lambda>() constant
31 override val users = userState.map { userList -> userList.map { it.user } } in <lambda>()
34 require(userState.value.none { it.user.id == user.id }) { in <lambda>()
37 userState.update { it + UserState(user, available) } in <lambda>()
41 require(userState.value.any { it.user.id == user.id }) { in <lambda>()
44 userState.update { it.filterNot { state -> state.user.id == user.id } } in <lambda>()
48 userState.map { userStateList -> userStateList.associate { it.user to it.available } } in <lambda>()
51 userState.update { userStateList -> in <lambda>()
52 userStateList.map { userState -> in <lambda>() method
53 if (userState.user.id == user.id) { in <lambda>()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DPerUser.java46 T userState = super.get(userId); in forUser() local
47 if (userState == null) { in forUser()
48 userState = checkNotNull(create(userId)); in forUser()
49 put(userId, userState); in forUser()
51 return userState; in forUser()
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/data/repository/
DUserRepositoryImplTest.kt42 private val userState = userManager.state constant in com.android.intentresolver.data.repository.UserRepositoryImplTest
51 .containsExactly(User(userState.primaryUserHandle.identifier, Role.PERSONAL)) in <lambda>()
62 val profile = userState.createProfile(ProfileType.WORK) in <lambda>()
73 val work = userState.createProfile(ProfileType.WORK) in <lambda>()
76 userState.removeProfile(work) in <lambda>()
83 val work = userState.createProfile(ProfileType.WORK) in <lambda>()
89 userState.setQuietMode(work, true) in <lambda>()
92 userState.setQuietMode(work, false) in <lambda>()
99 val private = userState.createProfile(ProfileType.PRIVATE) in <lambda>()
117 val work = userState.createProfile(ProfileType.WORK) in <lambda>()
/packages/apps/Settings/src/com/android/settings/applications/intentpicker/
DSupportedLinksDialogFragment.java102 final DomainVerificationUserState userState = in doSelectedAction() local
104 if (userState == null || mSupportedLinkWrapperList == null) { in doSelectedAction()
108 updateUserSelection(manager, userState); in doSelectedAction()
113 DomainVerificationUserState userState) { in updateUserSelection() argument
121 setDomainVerificationUserSelection(manager, userState.getIdentifier(), in updateUserSelection()
DAppLaunchSettings.java157 final DomainVerificationUserState userState = in onPreferenceChange() local
160 if (userState == null) { in onPreferenceChange()
163 setDomainVerificationUserSelection(userState.getIdentifier(), domainSet, /* enabled= */ in onPreferenceChange()
235 final DomainVerificationUserState userState = in canUpdateMainSwitchAndCategories() local
238 if (userState == null) { in canUpdateMainSwitchAndCategories()
243 IntentPickerUtils.logd("isLinkHandlingAllowed() : " + userState.isLinkHandlingAllowed()); in canUpdateMainSwitchAndCategories()
244 mMainSwitchPreference.updateStatus(userState.isLinkHandlingAllowed()); in canUpdateMainSwitchAndCategories()
246 mMainPreferenceCategory.setVisible(userState.isLinkHandlingAllowed()); in canUpdateMainSwitchAndCategories()
/packages/modules/Permission/service/java/com/android/role/
DRoleService.java271 RoleUserState userState = getOrCreateUserState(userId); in upgradeLegacyFallbackEnabledRolesIfNeeded() local
272 if (!userState.isVersionUpgradeNeeded()) { in upgradeLegacyFallbackEnabledRolesIfNeeded()
280 userState.upgradeVersion(legacyFallbackDisabledRoles); in upgradeLegacyFallbackEnabledRolesIfNeeded()
329 RoleUserState userState = getOrCreateUserState(userId); in maybeGrantDefaultRolesInternal() local
330 String oldPackagesHash = userState.getPackagesHash(); in maybeGrantDefaultRolesInternal()
346 userState.setPackagesHash(newPackagesHash); in maybeGrantDefaultRolesInternal()
358 RoleUserState userState = mUserStates.get(userId); in getOrCreateUserState() local
359 if (userState == null) { in getOrCreateUserState()
360 userState = new RoleUserState(userId, mPlatformHelper, this, in getOrCreateUserState()
362 mUserStates.put(userId, userState); in getOrCreateUserState()
[all …]
/packages/services/Car/cpp/watchdog/server/src/
DWatchdogInternalHandler.cpp307 UserState userState = static_cast<UserState>(static_cast<uint32_t>(arg2)); in notifySystemStateChange() local
308 return handleUserStateChange(userId, userState); in notifySystemStateChange()
350 const UserState& userState) { in handleUserStateChange() argument
352 switch (userState) { in handleUserStateChange()
359 mWatchdogPerfService->onUserStateChange(userId, userState); in handleUserStateChange()
363 mWatchdogPerfService->onUserStateChange(userId, userState); in handleUserStateChange()
367 mWatchdogPerfService->onUserStateChange(userId, userState); in handleUserStateChange()
381 StringPrintf("Unsupported user state: %d", userState)); in handleUserStateChange()
DWatchdogPerfService.h234 const aidl::android::automotive::watchdog::internal::UserState& userState) = 0;
302 const aidl::android::automotive::watchdog::internal::UserState& userState) override;
DWatchdogPerfService.cpp367 Result<void> WatchdogPerfService::onUserStateChange(userid_t userId, const UserState& userState) { in onUserStateChange() argument
383 switch (static_cast<int>(userState)) { in onUserStateChange()
435 ALOGE("Unsupported user state: %d", static_cast<int>(userState)); in onUserStateChange()
440 static_cast<int>(userState)); in onUserStateChange()
DWatchdogInternalHandler.h143 const aidl::android::automotive::watchdog::internal::UserState& userState);
/packages/apps/Settings/src/com/android/settings/applications/managedomainurls/
DDomainAppPreference.java75 final DomainVerificationUserState userState = in isLinkHandlingAllowed() local
78 return userState == null ? false : userState.isLinkHandlingAllowed(); in isLinkHandlingAllowed()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DAppOpenByDefaultPreferenceController.java91 final DomainVerificationUserState userState = in isLinkHandlingAllowed() local
94 return userState == null ? false : userState.isLinkHandlingAllowed(); in isLinkHandlingAllowed()
/packages/services/Car/service/src/com/android/car/watchdog/
DCarWatchdogService.java623 int userState = userManager.isUserRunning(user) in notifyAllUserStates() local
627 user.getIdentifier(), userState); in notifyAllUserStates()
629 userState == UserState.USER_STATE_STOPPED); in notifyAllUserStates()
780 int userState; in subscribeUserStateChange()
785 userState = UserState.USER_STATE_STARTED; in subscribeUserStateChange()
789 userState = UserState.USER_STATE_SWITCHING; in subscribeUserStateChange()
793 userState = UserState.USER_STATE_UNLOCKING; in subscribeUserStateChange()
797 userState = UserState.USER_STATE_POST_UNLOCKED; in subscribeUserStateChange()
802 userState = UserState.USER_STATE_STOPPED; in subscribeUserStateChange()
810 userState); in subscribeUserStateChange()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userpicker/
DUserPickerController.java136 private OnUpdateUsersListener mUsersUpdateListener = (userId, userState) -> {
137 onUserUpdate(userId, userState);
183 private void onUserUpdate(int userId, int userState) { in onUserUpdate() argument
186 + " userState=" + lifecycleEventTypeToString(userState) in onUserUpdate()
189 if (userState == USER_LIFECYCLE_EVENT_TYPE_UNLOCKED) { in onUserUpdate()
/packages/apps/Settings/src/com/android/settings/spa/app/appinfo/
DAppOpenByDefaultPreference.kt81 val userState = IntentPickerUtils.getDomainVerificationUserState( in isLinkHandlingAllowed() constant
84 return userState?.isLinkHandlingAllowed ?: false in isLinkHandlingAllowed()