Loading packages/SystemUI/src/com/android/systemui/user/domain/interactor/UserSwitcherInteractor.kt +74 −67 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.onEach Loading Loading @@ -170,12 +171,14 @@ constructor( keyguardInteractor.isKeyguardShowing, ) { _, userInfos, settings, isDeviceLocked -> buildList { val canAccessUserSwitcher = !isDeviceLocked || settings.isAddUsersFromLockscreen val canAccessUserSwitcher = !isDeviceLocked || settings.isAddUsersFromLockscreen if (canAccessUserSwitcher) { // The device is locked and our setting to allow actions that add users // from the lock-screen is not enabled. We can finish building the list // here. val isFullScreen = featureFlags.isEnabled(Flags.FULL_SCREEN_USER_SWITCHER) val isFullScreen = featureFlags.isEnabled(Flags.FULL_SCREEN_USER_SWITCHER) val actionList: List<UserActionModel> = if (isFullScreen) { Loading Loading @@ -233,12 +236,16 @@ constructor( } } if ( UserActionsUtil.canManageUsers(repository, settings.isUserSwitcherEnabled) UserActionsUtil.canManageUsers( repository, settings.isUserSwitcherEnabled ) ) { add(UserActionModel.NAVIGATE_TO_USER_MANAGEMENT) } } } .flowOn(backgroundDispatcher) val userRecords: StateFlow<ArrayList<UserRecord>> = combine( Loading Loading
packages/SystemUI/src/com/android/systemui/user/domain/interactor/UserSwitcherInteractor.kt +74 −67 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.onEach Loading Loading @@ -170,12 +171,14 @@ constructor( keyguardInteractor.isKeyguardShowing, ) { _, userInfos, settings, isDeviceLocked -> buildList { val canAccessUserSwitcher = !isDeviceLocked || settings.isAddUsersFromLockscreen val canAccessUserSwitcher = !isDeviceLocked || settings.isAddUsersFromLockscreen if (canAccessUserSwitcher) { // The device is locked and our setting to allow actions that add users // from the lock-screen is not enabled. We can finish building the list // here. val isFullScreen = featureFlags.isEnabled(Flags.FULL_SCREEN_USER_SWITCHER) val isFullScreen = featureFlags.isEnabled(Flags.FULL_SCREEN_USER_SWITCHER) val actionList: List<UserActionModel> = if (isFullScreen) { Loading Loading @@ -233,12 +236,16 @@ constructor( } } if ( UserActionsUtil.canManageUsers(repository, settings.isUserSwitcherEnabled) UserActionsUtil.canManageUsers( repository, settings.isUserSwitcherEnabled ) ) { add(UserActionModel.NAVIGATE_TO_USER_MANAGEMENT) } } } .flowOn(backgroundDispatcher) val userRecords: StateFlow<ArrayList<UserRecord>> = combine( Loading