Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11721d01 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Disable StatusBarDisableFlagsInteractor with scenes enabled" into main

parents dc8104d7 abe0f448
Loading
Loading
Loading
Loading
+53 −47
Original line number Diff line number Diff line
@@ -39,12 +39,14 @@ import com.android.systemui.navigation.domain.interactor.NavigationInteractor
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.power.shared.model.WakeSleepReason
import com.android.systemui.power.shared.model.WakefulnessModel
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.user.domain.interactor.SelectedUserInteractor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -75,6 +77,9 @@ constructor(
    private val disableToken: IBinder = Binder()

    private val disableFlagsForUserId =
        if (!KeyguardWmStateRefactor.isEnabled || SceneContainerFlag.isEnabled) {
            flowOf(Pair(0, StatusBarManager.DISABLE_NONE))
        } else {
            combine(
                    selectedUserInteractor.selectedUser,
                    keyguardTransitionInteractor.startedKeyguardTransitionStep.map { it.to },
@@ -127,10 +132,11 @@ constructor(
                    selectedUserId to flags
                }
                .distinctUntilChanged()
        }

    @SuppressLint("WrongConstant", "NonInjectedService")
    override fun start() {
        if (!KeyguardWmStateRefactor.isEnabled) {
        if (!KeyguardWmStateRefactor.isEnabled || SceneContainerFlag.isEnabled) {
            return
        }