Merge "Don't set mLikelyToStartNewTask=true before slop for first gesture" into ub-launcher3-rvc-dev

This commit is contained in:
TreeHugger Robot
2020-06-15 20:24:51 +00:00
committed by Android (Google) Code Review
@@ -267,10 +267,6 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
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 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
}
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);