commit | c94a5bfbce6a03b16424afbbf9910d8864ca8857 | [log] [tgz] |
---|---|---|
author | Tony Wickham <twickham@google.com> | Wed Mar 25 19:58:51 2020 -0700 |
committer | Tony Wickham <twickham@google.com> | Thu Mar 26 00:34:43 2020 -0700 |
tree | 2d7fbc14691d53c5d206bae64b8659f1aaa59d71 | |
parent | 1e080b8c2bfa6ee81f303c01fa6668fc8a70ac7b [diff] |
Remove max displacement threshold in 2-zone model We had a max displacement for detecting pause before because people were falsing into overview when they dragged all apps all the way up. In this mode, there's no way to get to all apps from the nav bar so the threshold doesn't make sense. Bug: 151039912 Change-Id: I349f38ec1589f8b151cfbe32542159b3eb92bf61
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/FlingAndHoldTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/FlingAndHoldTouchController.java index 6fc03b1..8af2747 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/FlingAndHoldTouchController.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/FlingAndHoldTouchController.java
@@ -73,7 +73,11 @@ super(l, false /* allowDragToOverview */); mMotionPauseDetector = new MotionPauseDetector(l); mMotionPauseMinDisplacement = ViewConfiguration.get(l).getScaledTouchSlop(); - mMotionPauseMaxDisplacement = getShiftRange() * MAX_DISPLACEMENT_PERCENT; + mMotionPauseMaxDisplacement = getMotionPauseMaxDisplacement(); + } + + protected float getMotionPauseMaxDisplacement() { + return getShiftRange() * MAX_DISPLACEMENT_PERCENT; } @Override
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java index 064133c..71aa2e8 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
@@ -66,6 +66,13 @@ } @Override + protected float getMotionPauseMaxDisplacement() { + // No need to disallow pause when swiping up all the way up the screen (unlike + // FlingAndHoldTouchController where user is probably intending to go to all apps). + return Float.MAX_VALUE; + } + + @Override protected boolean canInterceptTouch(MotionEvent ev) { mDidTouchStartInNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0; return super.canInterceptTouch(ev);