From 5441cce80527a148e5718c9862dc7eee9704ba8f Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Wed, 7 Feb 2024 13:20:31 -0800 Subject: [PATCH] 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 --- .../src/com/android/quickstep/util/RectFSpringAnim.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/quickstep/src/com/android/quickstep/util/RectFSpringAnim.java b/quickstep/src/com/android/quickstep/util/RectFSpringAnim.java index 251b7567b1..245dde26a3 100644 --- a/quickstep/src/com/android/quickstep/util/RectFSpringAnim.java +++ b/quickstep/src/com/android/quickstep/util/RectFSpringAnim.java @@ -281,7 +281,15 @@ public class RectFSpringAnim extends ReleaseCheck { 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;