Fix bug where onStateTransitionEnd is not called when QUICKSTEP_SPRINGS=false.
We ignore the value of mSpringEnded if springs are disabled. Bug: 122662526 Change-Id: I66ae98c8d8a4a52dabdf6f75c1fb6d1df0c45318
This commit is contained in:
@@ -32,6 +32,8 @@ import androidx.dynamicanimation.animation.DynamicAnimation.OnAnimationEndListen
|
||||
import androidx.dynamicanimation.animation.SpringAnimation;
|
||||
import androidx.dynamicanimation.animation.SpringForce;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
|
||||
|
||||
/**
|
||||
* This animator allows for an object's property to be be controlled by an {@link ObjectAnimator} or
|
||||
* a {@link SpringAnimation}. It extends ValueAnimator so it can be used in an AnimatorSet.
|
||||
@@ -109,7 +111,8 @@ public class SpringObjectAnimator extends ValueAnimator {
|
||||
+ mSpringEnded + ", mEnded=" + mEnded);
|
||||
}
|
||||
|
||||
if (mAnimatorEnded && mSpringEnded && !mEnded) {
|
||||
// If springs are disabled, ignore value of mSpringEnded
|
||||
if (mAnimatorEnded && (mSpringEnded || !QUICKSTEP_SPRINGS.get()) && !mEnded) {
|
||||
for (AnimatorListener l : mListeners) {
|
||||
l.onAnimationEnd(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user