Merge "Increase the touch slop for noti shade pull down. Bug: 116879058" into ub-launcher3-master

This commit is contained in:
Hyunyoung Song
2018-10-24 20:01:20 +00:00
committed by Android (Google) Code Review
@@ -51,7 +51,8 @@ public class StatusBarTouchController implements TouchController {
public StatusBarTouchController(Launcher l) {
mLauncher = l;
mTouchSlop = ViewConfiguration.get(l).getScaledTouchSlop();
// Guard against TAPs by increasing the touch slop.
mTouchSlop = 2 * ViewConfiguration.get(l).getScaledTouchSlop();
mTranslator = new TouchEventTranslator((MotionEvent ev)-> dispatchTouchEvent(ev));
}
@@ -90,6 +91,9 @@ public class StatusBarTouchController implements TouchController {
mTranslator.processMotionEvent(ev);
return true;
}
if (Math.abs(dx) > mTouchSlop) {
mCanIntercept = false;
}
}
return false;
}