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

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

Merge "[flexiglass] Enable missing KTF transitions" into main

parents 10d5089b e9298122
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -362,6 +362,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
        }

    @Test
    @DisableSceneContainer
    fun dreamingLockscreenHostedToLockscreen() =
        testScope.runTest {
            // GIVEN a device dreaming with the lockscreen hosted dream and not dozing
@@ -449,6 +450,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
        }

    @Test
    @DisableSceneContainer
    fun dreamingLockscreenHostedToDozing() =
        testScope.runTest {
            // GIVEN a device is dreaming with lockscreen hosted dream
@@ -480,6 +482,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
        }

    @Test
    @DisableSceneContainer
    fun dreamingLockscreenHostedToOccluded() =
        testScope.runTest {
            // GIVEN device is dreaming with lockscreen hosted dream and not occluded
@@ -977,6 +980,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
        }

    @Test
    @DisableSceneContainer
    fun alternateBouncerToGlanceableHub() =
        testScope.runTest {
            // GIVEN the device is idle on the glanceable hub
+6 −8
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import com.android.systemui.keyguard.KeyguardWmStateRefactor
import com.android.systemui.keyguard.data.repository.KeyguardTransitionRepository
import com.android.systemui.keyguard.shared.model.Edge
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.TransitionStep
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Scenes
@@ -91,12 +90,12 @@ constructor(
                edgeWithoutSceneContainer =
                    Edge.create(from = KeyguardState.ALTERNATE_BOUNCER, to = KeyguardState.GONE)
            )
            .map<TransitionStep, Boolean?> {
            .map {
                // The alt bouncer is pretty fast to hide, so start the surface behind animation
                // around 30%.
                it.value > 0.3f
            }
            .onStart {
            .onStart<Boolean?> {
                // Default to null ("don't care, use a reasonable default").
                emit(null)
            }
@@ -145,6 +144,7 @@ constructor(
                            }
                        } else {
                            if (isIdleOnCommunal) {
                                if (SceneContainerFlag.isEnabled) return@collect
                                KeyguardState.GLANCEABLE_HUB
                            } else if (isOccluded) {
                                KeyguardState.OCCLUDED
@@ -158,7 +158,6 @@ constructor(
    }

    private fun listenForAlternateBouncerToGone() {
        // TODO(b/336576536): Check if adaptation for scene framework is needed
        if (SceneContainerFlag.isEnabled) return
        if (KeyguardWmStateRefactor.isEnabled) {
            // Handled via #dismissAlternateBouncer.
@@ -170,9 +169,9 @@ constructor(
                    keyguardInteractor.isKeyguardGoingAway.filter { it }.map {}, // map to Unit
                    keyguardInteractor.isKeyguardOccluded.flatMapLatest { keyguardOccluded ->
                        if (keyguardOccluded) {
                            primaryBouncerInteractor.keyguardAuthenticatedBiometricsHandled.drop(
                                1
                            ) // drop the initial state
                            primaryBouncerInteractor.keyguardAuthenticatedBiometricsHandled
                                // drop the initial state
                                .drop(1)
                        } else {
                            emptyFlow()
                        }
@@ -184,7 +183,6 @@ constructor(
    }

    private fun listenForAlternateBouncerToPrimaryBouncer() {
        // TODO(b/336576536): Check if adaptation for scene framework is needed
        if (SceneContainerFlag.isEnabled) return
        scope.launch {
            keyguardInteractor.primaryBouncerShowing
+1 −4
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ constructor(
    ) {

    override fun start() {
        if (SceneContainerFlag.isEnabled) return
        listenForDreamingLockscreenHostedToLockscreen()
        listenForDreamingLockscreenHostedToGone()
        listenForDreamingLockscreenHostedToDozing()
@@ -96,8 +97,6 @@ constructor(
    }

    private fun listenForDreamingLockscreenHostedToPrimaryBouncer() {
        // TODO(b/336576536): Check if adaptation for scene framework is needed
        if (SceneContainerFlag.isEnabled) return
        scope.launch {
            keyguardInteractor.primaryBouncerShowing
                .filterRelevantKeyguardStateAnd { isBouncerShowing -> isBouncerShowing }
@@ -106,8 +105,6 @@ constructor(
    }

    private fun listenForDreamingLockscreenHostedToGone() {
        // TODO(b/336576536): Check if adaptation for scene framework is needed
        if (SceneContainerFlag.isEnabled) return
        scope.launch {
            keyguardInteractor.biometricUnlockState
                .filterRelevantKeyguardStateAnd { biometricUnlockState ->
+2 −3
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ constructor(

    private fun listenForDreamingToGlanceableHub() {
        if (!communalSettingsInteractor.isCommunalFlagEnabled()) return
        // TODO(b/336576536): Check if adaptation for scene framework is needed
        if (SceneContainerFlag.isEnabled) return
        scope.launch("$TAG#listenForDreamingToGlanceableHub", mainDispatcher) {
            glanceableHubTransitions.listenForGlanceableHubTransition(
@@ -195,7 +194,7 @@ constructor(

    private fun listenForDreamingToGoneWhenDismissable() {
        if (SceneContainerFlag.isEnabled) {
            return // TODO(b/336576536): Check if adaptation for scene framework is needed
            return
        }

        if (KeyguardWmStateRefactor.isEnabled) {
@@ -217,7 +216,7 @@ constructor(
    }

    private fun listenForDreamingToGoneFromBiometricUnlock() {
        // TODO(b/336576536): Check if adaptation for scene framework is needed
        // TODO(b/353542570): Adaptation for scene framework is needed
        if (SceneContainerFlag.isEnabled) return
        scope.launch {
            keyguardInteractor.biometricUnlockState
+0 −1
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@ constructor(
    ) {

    override fun start() {
        // TODO(b/336576536): Check if adaptation for scene framework is needed
        if (SceneContainerFlag.isEnabled) return
        if (!communalSettingsInteractor.isCommunalFlagEnabled()) {
            return
Loading