From f6be443eb4a407939f1c058bf72206b857fd13e9 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 12 May 2020 17:46:02 -0500 Subject: [PATCH] Don't handle task appeared during second quick switch transition Instead of using shared gesture state, use the swipe handler's internal state. This ensures that only the handler that started the new task can finish the controller for it (i.e. starting a new gesture, which creates a new handler, will ignore the onTaskAppeared() that the previous handler initiated). Test: Quick switch to delayed task A, then quick switch to B right before onTaskAppeared() such that we get onTaskAppeared() during the transition (easier to repro if you increase animation durations with springs off). Before this change, A appeared on top. Bug: 156412706 Change-Id: Ic7d3cd43399005095b2e7c7382218edffefdc27b --- .../src/com/android/quickstep/LauncherSwipeHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java index e7fe1420d6..0bf81efbae 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java @@ -724,7 +724,7 @@ public class LauncherSwipeHandler extends BaseSwipeUpHandler