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

Commit 3ffff3b3 authored by Darrell Shi's avatar Darrell Shi
Browse files

Remove delayed snap scene when animation starts

This change removes a delayed scene snap when activity launch animation
starts. Instead it attemps to snap immediately when the animation ends.

Test: atest CommunalTransitionAnimatorControllerTest
Fix: 443213605
Bug: 330672236
Flag: EXEMPT BUGFIX
Change-Id: I6e2a0b73b356723b3034ba164021a085c6a84bb0
parent 05d5dc6c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -39,12 +39,6 @@ class CommunalTransitionAnimatorController(

    override fun onTransitionAnimationStart(isExpandingFullyAbove: Boolean) {
        delegate.onTransitionAnimationStart(isExpandingFullyAbove)
        // TODO(b/330672236): move this to onTransitionAnimationEnd() without the delay.
        communalSceneInteractor.snapToScene(
            CommunalScenes.Blank,
            "CommunalTransitionAnimatorController",
            ActivityTransitionAnimator.TIMINGS.totalDuration
        )
    }

    override fun onTransitionAnimationCancelled(newKeyguardOccludedState: Boolean?) {
@@ -55,5 +49,9 @@ class CommunalTransitionAnimatorController(
    override fun onTransitionAnimationEnd(isExpandingFullyAbove: Boolean) {
        communalSceneInteractor.setIsLaunchingWidget(false)
        delegate.onTransitionAnimationEnd(isExpandingFullyAbove)
        communalSceneInteractor.snapToScene(
            CommunalScenes.Blank,
            "CommunalTransitionAnimatorController",
        )
    }
}