From d007cd5d55002e697d53d3c0882cddf6aa559fe5 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 23 Oct 2020 12:04:53 -0700 Subject: [PATCH] End the attaching animation early when we settle on the end target The attaching animation can take longer than the transition to recents when you let go, and the ADJACENT_PAGE_OFFSET calculation is different when there's a running task vs not. So after the transition to recents ended, the calculation of the still playing attaching animation would change, causing the jump you see in the bug. Now we make sure to end the attaching animation if it's still running when we settle on an end target to avoid this issue. Fixes: 168563692 Change-Id: I3f37aecf9c93f2ec63dbdce561e7f5ba11be89cc Merged-In: I3f37aecf9c93f2ec63dbdce561e7f5ba11be89cc (cherry picked from commit 1cc12ebc121f289db3e481aa5f9c4b72514ad52f) (cherry picked from commit fd54a8e84a6ec1436551b223e959090f83d854fa) --- .../src/com/android/quickstep/BaseSwipeUpHandlerV2.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java index a4ea9b4145..f4687884bf 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java @@ -720,6 +720,8 @@ public abstract class BaseSwipeUpHandlerV2, Q exte } private void onSettledOnEndTarget() { + // Fast-finish the attaching animation if it's still running. + maybeUpdateRecentsAttachedState(false); switch (mGestureState.getEndTarget()) { case HOME: mStateCallback.setState(STATE_SCALED_CONTROLLER_HOME | STATE_CAPTURE_SCREENSHOT);