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

Commit e19fbbbc authored by Tony Wickham's avatar Tony Wickham Committed by Automerger Merge Worker
Browse files

Merge "Set mState = mCurrentStableState in onAnimationCancel()" into tm-dev am: b73c57b2

parents 73a875ee b73c57b2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ package com.android.launcher3.anim;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;

import androidx.annotation.CallSuper;

/**
 * Extension of {@link AnimatorListenerAdapter} for listening for non-cancelled animations
 */
@@ -27,6 +29,7 @@ public abstract class AnimationSuccessListener extends AnimatorListenerAdapter {
    protected boolean mCancelled = false;

    @Override
    @CallSuper
    public void onAnimationCancel(Animator animation) {
        mCancelled = true;
    }
+7 −1
Original line number Diff line number Diff line
@@ -335,7 +335,13 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
            @Override
            public void onAnimationStart(Animator animation) {
                // Change the internal state only when the transition actually starts
                onStateTransitionStart(state);
                onStateTransitionStart(mCancelled ? mCurrentStableState : state);
            }

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

            @Override