From 87cfe640c251d540750bdc3d4eee79c082ff5f0d Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 11 Jun 2019 12:56:39 -0700 Subject: [PATCH 1/2] 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; From 0bdd28e2044b8123f5f5139f9914c56298fe6d62 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 11 Jun 2019 14:35:53 -0700 Subject: [PATCH 2/2] Fix double swipe on nav bar from an app Use normal OverviewInputConsumer instead of OverviewWithoutFocusInputConsumer if we are animating to launcher. This allows launcher to properly handle a second swipe in the nav region. Test: enable 2-button mode, double swipe up on nav bar to all apps Bug: 135050372 Change-Id: I0b96f6236bed4f9ac3284a921e4259e1b0d00c75 --- .../src/com/android/quickstep/TouchInteractionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java index 4a40c64f99..d84adabe14 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java @@ -614,7 +614,7 @@ public class TouchInteractionService extends Service implements return InputConsumer.NO_OP; } - if (activity.getRootView().hasWindowFocus()) { + if (activity.getRootView().hasWindowFocus() || mSwipeSharedState.goingToLauncher) { return new OverviewInputConsumer(activity, mInputMonitorCompat, false /* startingInActivityBounds */); } else {