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

Commit b334d21f authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[flexiglass] Change instantCollapseShade to use snapToScene

This is something that would actually work and not create the flicker
issue described in the attached bug.

Fix: 330672236
Test: manually verified that opening settings from the footer of the
expanded QS scene, when the device is unlocked, no longer flickers the
QS scene at the end of the Settings activity launch animation.
Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT

Change-Id: Ic339d5a70f866e0110dc2518f18441d09b2d7f5e
parent 62bd697b
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@ import com.android.compose.animation.scene.transitions
import com.android.systemui.bouncer.ui.composable.Bouncer
import com.android.systemui.notifications.ui.composable.Notifications
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.TransitionKeys.CollapseShadeInstantly
import com.android.systemui.scene.shared.model.TransitionKeys.SlightlyFasterShadeCollapse
import com.android.systemui.scene.ui.composable.transitions.bouncerToGoneTransition
import com.android.systemui.scene.ui.composable.transitions.goneToQuickSettingsTransition
@@ -36,20 +35,6 @@ val SceneContainerTransitions = transitions {

    from(Scenes.Bouncer, to = Scenes.Gone) { bouncerToGoneTransition() }
    from(Scenes.Gone, to = Scenes.Shade) { goneToShadeTransition() }
    from(
        Scenes.Gone,
        to = Scenes.Shade,
        key = CollapseShadeInstantly,
    ) {
        goneToShadeTransition(durationScale = 0.0)
    }
    from(
        Scenes.Gone,
        to = Scenes.QuickSettings,
        key = CollapseShadeInstantly,
    ) {
        goneToQuickSettingsTransition(durationScale = 0.0)
    }
    from(
        Scenes.Gone,
        to = Scenes.Shade,
@@ -61,13 +46,6 @@ val SceneContainerTransitions = transitions {
    from(Scenes.Lockscreen, to = Scenes.Bouncer) { lockscreenToBouncerTransition() }
    from(Scenes.Lockscreen, to = Scenes.Communal) { lockscreenToCommunalTransition() }
    from(Scenes.Lockscreen, to = Scenes.Shade) { lockscreenToShadeTransition() }
    from(
        Scenes.Lockscreen,
        to = Scenes.Shade,
        key = CollapseShadeInstantly,
    ) {
        lockscreenToShadeTransition(durationScale = 0.0)
    }
    from(
        Scenes.Lockscreen,
        to = Scenes.Shade,
+1 −4
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import com.android.systemui.log.LogBuffer
import com.android.systemui.log.dagger.ShadeTouchLog
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.TransitionKeys.CollapseShadeInstantly
import com.android.systemui.scene.shared.model.TransitionKeys.SlightlyFasterShadeCollapse
import com.android.systemui.shade.ShadeController.ShadeVisibilityListener
import com.android.systemui.shade.domain.interactor.ShadeInteractor
@@ -100,11 +99,9 @@ constructor(
    }

    override fun instantCollapseShade() {
        // TODO(b/325602936) add support for instant transition
        sceneInteractor.changeScene(
        sceneInteractor.snapToScene(
            getCollapseDestinationScene(),
            "hide shade",
            CollapseShadeInstantly,
        )
    }