summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java
diff options
context:
space:
mode:
authorTony <twickham@google.com>2019-03-14 13:11:38 -0500
committerTony <twickham@google.com>2019-03-19 10:55:27 -0500
commit687ff6afe112815ddaffafefabb2ad17a2d63115 (patch)
treebcb06024c8dc57954457c1d2bef787b95fadbe1a /quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java
parent0d447c88b8649abf14feb2736d320ccc55f44d03 (diff)
downloadandroid_packages_apps_Trebuchet-687ff6afe112815ddaffafefabb2ad17a2d63115.tar.gz
android_packages_apps_Trebuchet-687ff6afe112815ddaffafefabb2ad17a2d63115.tar.bz2
android_packages_apps_Trebuchet-687ff6afe112815ddaffafefabb2ad17a2d63115.zip
Fix some state issues with home and quick switch gestures
Handle the fact that LAUNCHER_STARTED can come 25ms+ later than LAUNCHER_PRESENT - Don't call prepareRecentsUi() if we already completed the gesture to go home - Previously it was possible to get LAUNCHER_PRESENT -> GESTURE_STARTED -> GESTURE_COMPLETED -> LAUNCHER_STARTED. Because we go to BACKGROUND_APP state in LAUNCHER_STARTED, this sequence ended up there instead of home (b/124338231) - Call setupRecentsViewUi() in LAUNCHER_PRESENT instead of LAUNCHER_START - Because setupRecentsViewUi() sets RecentsView to show the running task, it was interferring with quick switches that had the state sequence above Other quick switch fixes - Set canBeContinued = true for LAST_TASK gesture target. This handles cases like: switch from task 0 to task 1, intercept and go back to 0 (LAST_TASK), intercept again to go to 1 - Ignore deferred touch down target if we're continuing the previous gesture - Set STATE_HANDLER_INVALIDATED as soon as we start finishing recents animation instead of waiting until the new task is launched. This is what we do when re-launching the last task, and it allows us to start a new gesture sooner. One race condition still exists with consecutive quick switches: if you switch to a new task, the next gesture might get stuck if it starts after finishing the recents animation but before the task is fully launched/launcher is stopped. Bug: 124338231 Bug: 111926330 Change-Id: Ia7e1eebe6e81e2f10bb42a10b2f46fd720da0dc1
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java
index 4792cc791..9506bfa92 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java
@@ -130,7 +130,8 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
mVelocityTracker = VelocityTracker.obtain();
mActivityControlHelper = activityControl;
- mIsDeferredDownTarget = isDeferredDownTarget;
+ boolean continuingPreviousGesture = swipeSharedState.getActiveListener() != null;
+ mIsDeferredDownTarget = !continuingPreviousGesture && isDeferredDownTarget;
mOverviewCallbacks = overviewCallbacks;
mTaskOverlayFactory = taskOverlayFactory;
mInputConsumer = inputConsumer;
@@ -142,8 +143,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
mDragSlop = NavigationBarCompat.getQuickStepDragSlopPx();
mTouchSlop = NavigationBarCompat.getQuickStepTouchSlopPx();
- // If active listener isn't null, we are continuing the previous gesture.
- mPassedTouchSlop = mPassedDragSlop = mSwipeSharedState.getActiveListener() != null;
+ mPassedTouchSlop = mPassedDragSlop = continuingPreviousGesture;
}
@Override