Merge "Revert "Set mState = mCurrentStableState in onAnimationCancel()"" into tm-dev am: 4608bd00dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18344362 Change-Id: Ic0ebb64322b6203f3b41659d159bfbdb5df6f72b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -19,8 +19,6 @@ package com.android.launcher3.anim;
|
|||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.animation.AnimatorListenerAdapter;
|
import android.animation.AnimatorListenerAdapter;
|
||||||
|
|
||||||
import androidx.annotation.CallSuper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AnimatorListenerAdapter} for listening for non-cancelled animations
|
* Extension of {@link AnimatorListenerAdapter} for listening for non-cancelled animations
|
||||||
*/
|
*/
|
||||||
@@ -29,7 +27,6 @@ public abstract class AnimationSuccessListener extends AnimatorListenerAdapter {
|
|||||||
protected boolean mCancelled = false;
|
protected boolean mCancelled = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@CallSuper
|
|
||||||
public void onAnimationCancel(Animator animation) {
|
public void onAnimationCancel(Animator animation) {
|
||||||
mCancelled = true;
|
mCancelled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -335,13 +335,7 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
|
|||||||
@Override
|
@Override
|
||||||
public void onAnimationStart(Animator animation) {
|
public void onAnimationStart(Animator animation) {
|
||||||
// Change the internal state only when the transition actually starts
|
// Change the internal state only when the transition actually starts
|
||||||
onStateTransitionStart(mCancelled ? mCurrentStableState : state);
|
onStateTransitionStart(state);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAnimationCancel(Animator animation) {
|
|
||||||
super.onAnimationCancel(animation);
|
|
||||||
mState = mCurrentStableState;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user