Allow pause during quick switch for any horizontal displacement

The shelf no longer exists in 0 button mode, so it's not necessary
to wait for workspace to be invisible before allowing the pause.

Change-Id: I202ed9991b18f5e7cb2e4f0aa6be7a0d66b8ffd7
This commit is contained in:
Tony Wickham
2020-09-09 17:12:49 -07:00
parent 1aee9da5b8
commit 4318324ab4

View File

@@ -271,11 +271,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
mIsHomeScreenVisible = FADE_OUT_INTERPOLATOR.getInterpolation(xProgress)
<= 1 - ALPHA_CUTOFF_THRESHOLD;
// Only allow motion pause if the home screen is invisible, since some
// home screen elements will appear in the shelf on motion pause.
mMotionPauseDetector.setDisallowPause(mIsHomeScreenVisible
|| -displacement.y < mMotionPauseMinDisplacement);
mMotionPauseDetector.setDisallowPause(-displacement.y < mMotionPauseMinDisplacement);
mMotionPauseDetector.addPosition(ev);
if (mXOverviewAnim != null) {