Increase the touch slop for noti shade pull down.

Bug: 116879058

Change-Id: I3ff0491292e5238cd74bb6d97c0ab79711ad3af1
This commit is contained in:
Hyunyoung Song 2018-10-23 16:00:37 -07:00
parent d6e4cdcdb5
commit 0638949fe9
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}