Merge "Don't set mLikelyToStartNewTask=true before slop for first gesture" into ub-launcher3-rvc-dev am: 946696124a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11855486
Change-Id: I0fd87abb4465f988414d0db3713c7bb189a0a810
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
index 14215a1..a9f138e 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
@@ -267,10 +267,6 @@
if (!mPassedSlopOnThisGesture && passedSlop) {
mPassedSlopOnThisGesture = true;
}
- // Until passing slop, we don't know what direction we're going, so assume we might
- // be quick switching to avoid translating recents away when continuing the gesture.
- boolean isLikelyToStartNewTask = !mPassedSlopOnThisGesture
- || horizontalDist > upDist;
if (!mPassedPilferInputSlop) {
if (passedSlop) {
@@ -304,6 +300,13 @@
}
if (mDeviceState.isFullyGesturalNavMode()) {
+ // Until passing slop, we don't know what direction we're going, so assume
+ // we're quick switching to avoid translating recents away when continuing
+ // the gesture.
+ boolean haveNotPassedSlopOnContinuedGesture =
+ !mPassedSlopOnThisGesture && mPassedPilferInputSlop;
+ boolean isLikelyToStartNewTask = haveNotPassedSlopOnContinuedGesture
+ || horizontalDist > upDist;
mMotionPauseDetector.setDisallowPause(upDist < mMotionPauseMinDisplacement
|| isLikelyToStartNewTask);
mMotionPauseDetector.addPosition(ev);