Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3cd3762 authored by Tony Wickham's avatar Tony Wickham
Browse files

Don't set mLikelyToStartNewTask=true before slop for first gesture

We should only set it to true before the slop when continuing the
gesture, otherwise gestures to home could attach the adjacent
task view before the transition even starts.

Bug: 158855957
Change-Id: I86eba9bad9c85e05d5274d7396160762a28e5cf1
parent db087d3c
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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);