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

Commit 0c96ea06 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Use more accurate check for isInPreviewStage

The previous logic sometimes flickered to false during the final frame of the cancel animation.

Bug: 350705972
Test: Manual, i.e. testing on device in Flexiglass
Flag: com.android.systemui.scene_container
Change-Id: Ic6024a6ca730736a13e4606279e0539213c33b06
parent d3c41192
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ private class PredictiveBackTransition(
        get() = 0f // Currently, velocity is not exposed by predictive back API

    override val isInPreviewStage: Boolean
        get() = progressAnimatable == null && previewTransformationSpec != null
        get() = previewTransformationSpec != null && currentScene == fromScene

    override val progress: Float
        get() = progressAnimatable?.value ?: previewTransformationSpec?.let { 0f } ?: dragProgress