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

Commit 8935d951 authored by Tony Wickham's avatar Tony Wickham
Browse files

Set mState = mCurrentStableState in onAnimationCancel

mState is set when the transition starts toward that state even if it is
never reached. If the animation is canceled, therefore, we should reset
mState = mCurrentStableState since that is the state we came from.

For instance, when swiping up from overview, mState = ALL_APPS, but when
swiping back down we cancel that animation and create the task launch
animation. When creating the task launch animation, we reapplyState(),
which, before this change, was still ALL_APPS instead of OVERVIEW.

Bug: 79935289
Change-Id: I59c5799e92350747e4ef1d99a80ba678a2ce7b98
parent 68870131
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -347,6 +347,12 @@ public class LauncherStateManager {
                }
            }

            @Override
            public void onAnimationCancel(Animator animation) {
                super.onAnimationCancel(animation);
                mState = mCurrentStableState;
            }

            @Override
            public void onAnimationSuccess(Animator animator) {
                // Run any queued runnables
@@ -432,7 +438,6 @@ public class LauncherStateManager {
    }

    public void setCurrentUserControlledAnimation(AnimatorPlaybackController controller) {
        clearCurrentAnimation();
        setCurrentAnimation(controller.getTarget());
        mConfig.userControlled = true;
        mConfig.playbackController = controller;