Merge "Revert "Set mState = mCurrentStableState in onAnimationCancel()"" into tm-dev am: 4608bd00dc am: 64be3ba846

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18344362

Change-Id: I8a1586bb204f87f89060ecc311b65bb64594a921
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-05-18 21:34:26 +00:00
committed by Automerger Merge Worker
2 changed files with 1 additions and 10 deletions
@@ -19,8 +19,6 @@ 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
*/
@@ -29,7 +27,6 @@ public abstract class AnimationSuccessListener extends AnimatorListenerAdapter {
protected boolean mCancelled = false;
@Override
@CallSuper
public void onAnimationCancel(Animator animation) {
mCancelled = true;
}
@@ -335,13 +335,7 @@ 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(mCancelled ? mCurrentStableState : state);
}
@Override
public void onAnimationCancel(Animator animation) {
super.onAnimationCancel(animation);
mState = mCurrentStableState;
onStateTransitionStart(state);
}
@Override