From 87cfe640c251d540750bdc3d4eee79c082ff5f0d Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 11 Jun 2019 12:56:39 -0700 Subject: [PATCH] Fix state/anim clobbering when touching down during recents animation Addresses 2 problems: - Set mLauncherTransitionController = null after ending it, to prevent a subsequent end from re-setting OVERVIEW state. - Cancel the shelf animation so that it doesn't clobber the animation to all apps (for instance). Bug: 134309036 Bug: 134309189 Change-Id: I019084a1ba38c6208a6256843cb5c4b6dbb4a662 --- .../com/android/quickstep/WindowTransformSwipeHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java index 7d17f85f69..edeae81165 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java @@ -868,9 +868,7 @@ public class WindowTransformSwipeHandler @UiThread private InputConsumer createNewInputProxyHandler() { endRunningWindowAnim(); - if (mLauncherTransitionController != null) { - mLauncherTransitionController.getAnimationPlayer().end(); - } + endLauncherTransitionController(); if (!ENABLE_QUICKSTEP_LIVE_TILE.get()) { // Hide the task view, if not already hidden setTargetAlphaProvider(WindowTransformSwipeHandler::getHiddenTargetAlpha); @@ -1312,6 +1310,7 @@ public class WindowTransformSwipeHandler } private void endLauncherTransitionController() { + setShelfState(ShelfAnimState.CANCEL, LINEAR, 0); if (mLauncherTransitionController != null) { mLauncherTransitionController.getAnimationPlayer().end(); mLauncherTransitionController = null;