Merge "Remove max displacement threshold in 2-zone model" into ub-launcher3-master
This commit is contained in:
commit
98783d03c1
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue