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

Commit 170009ab authored by Lucas Silva's avatar Lucas Silva
Browse files

Ensure we only restrict swipe to hub when v2 enabled

Bug: 399910239
Test: atest CommunalViewModelTest
Flag: com.android.systemui.glanceable_hub_v2
Change-Id: I45e15d36a09e262314c7199cb986b6cbd07acd01
parent 0cb579cc
Loading
Loading
Loading
Loading
+9 −6
Original line number Original line Diff line number Diff line
@@ -377,12 +377,15 @@ constructor(
                MutableStateFlow(false)
                MutableStateFlow(false)
            }
            }


        if (v2FlagEnabled()) {
            val inAllowedKeyguardState =
            val inAllowedKeyguardState =
                keyguardTransitionInteractor.startedKeyguardTransitionStep.map {
                keyguardTransitionInteractor.startedKeyguardTransitionStep.map {
                    it.to == KeyguardState.LOCKSCREEN || it.to == KeyguardState.GLANCEABLE_HUB
                    it.to == KeyguardState.LOCKSCREEN || it.to == KeyguardState.GLANCEABLE_HUB
                }
                }

            allOf(inAllowedDeviceState, inAllowedKeyguardState)
            allOf(inAllowedDeviceState, inAllowedKeyguardState)
        } else {
            inAllowedDeviceState
        }
    }
    }


    companion object {
    companion object {