From 61fa23ab3a8317dd97f6032f753171fcabe79a0d Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Sat, 20 Jun 2020 11:57:28 -0500 Subject: [PATCH] Don't reset GestureState when touching outside of swipe region We were setting mGestureState = DEFAULT_STATE when touching outside of the swipe region. Instead, we should only set mGestureState when starting a new gesture, and only set it to DEFAULT_STATE on reset. This also makes it clearer that mGestureState always refers to the current gesture state, rather than sometimes being the current gesture and sometimes being the previous gesture depending on where it was used. Now previousGestureState is passed when needed. Bug: 159494933 Change-Id: Ib62278b7c591ca4c6b99b26e058a34772e6cec2a --- .../quickstep/TouchInteractionService.java | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) 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 37314eaa3d..7d70155781 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java @@ -471,7 +471,6 @@ public class TouchInteractionService extends Service implements PluginListener mAM.getRunningTask(false /* filterOnlyVisibleRecents */))); @@ -743,7 +737,7 @@ public class TouchInteractionService extends Service implements PluginListener