Merge "Remove max displacement threshold in 2-zone model" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot 2020-03-27 03:49:49 +00:00 committed by Android (Google) Code Review
commit 98783d03c1
2 changed files with 12 additions and 1 deletions

View File

@ -73,7 +73,11 @@ public class FlingAndHoldTouchController extends PortraitStatesTouchController {
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

View File

@ -65,6 +65,13 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo
mRecentsView = l.getOverviewPanel();
}
@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;