Skip to content

Commit

Permalink
Check events in OverlayPanelEventFilter
Browse files Browse the repository at this point in the history
BUG=613069

Review-Url: https://codereview.chromium.org/2072513002
Cr-Commit-Position: refs/heads/master@{#404731}
  • Loading branch information
iotitan authored and Commit bot committed Jul 11, 2016
1 parent 49a4adc commit 932a937
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ protected boolean handleSingleTapUp(MotionEvent e) {
* @return Whether the event has been consumed.
*/
protected boolean handleScroll(MotionEvent e1, MotionEvent e2, float distanceY) {
// TODO(mdjones): It seems impossible that either of the two MotionEvents passed into this
// function would be null provided the InternalGestureDetector checks them. However, it
// still seems to be possible...
if (e1 == null || e2 == null) return false;

// Only determines the gesture orientation if it hasn't been determined yet,
// affectively "locking" the orientation once the gesture has started.
if (!mHasDeterminedGestureOrientation && isDistanceGreaterThanTouchSlop(e1, e2)) {
Expand Down

0 comments on commit 932a937

Please sign in to comment.