Ensures that we end back to home animation on the last animation frame.
This fixes the bug where user performs double swipe back to home and we
have a floating window on the screen.
Fixes: 277515917
Test: From an app, back swipe to home, and then immediately back swipe
to home again
Flag: NONE
Change-Id: If312ee55efeaadde896511c6d449826368b15a84
diff --git a/quickstep/src/com/android/quickstep/util/RectFSpringAnim.java b/quickstep/src/com/android/quickstep/util/RectFSpringAnim.java
index 251b756..245dde2 100644
--- a/quickstep/src/com/android/quickstep/util/RectFSpringAnim.java
+++ b/quickstep/src/com/android/quickstep/util/RectFSpringAnim.java
@@ -281,7 +281,15 @@
if (mRectScaleAnim.canSkipToEnd()) {
mRectScaleAnim.skipToEnd();
}
+ mCurrentScaleProgress = mRectScaleAnim.getSpring().getFinalPosition();
+
+ // Ensures that we end the animation with the final values.
+ mRectXAnimEnded = false;
+ mRectYAnimEnded = false;
+ mRectScaleAnimEnded = false;
+ onUpdate();
}
+
mRectXAnimEnded = true;
mRectYAnimEnded = true;
mRectScaleAnimEnded = true;