diff options
author | Ameer Armaly <aarmaly@google.com> | 2020-05-21 20:24:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-21 20:24:30 +0000 |
commit | cee5a21750d2094484fe86f407e8e211fc423261 (patch) | |
tree | 993edb5bbcb669fd58756c021a9d5a39f7885812 /services/accessibility | |
parent | 71765aa97ce9c29d147257329c8d7cd88d28dee1 (diff) | |
parent | 3921cf7a9dfb383bf1daa994e0baf6d41def814c (diff) |
Merge "GestureManifold: fix null pointer exception in onGestureCompleted." into rvc-dev
Diffstat (limited to 'services/accessibility')
-rw-r--r-- | services/accessibility/java/com/android/server/accessibility/gestures/GestureManifold.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/gestures/GestureManifold.java b/services/accessibility/java/com/android/server/accessibility/gestures/GestureManifold.java index a3b5a3e2dcf9..6d0f069e51ac 100644 --- a/services/accessibility/java/com/android/server/accessibility/gestures/GestureManifold.java +++ b/services/accessibility/java/com/android/server/accessibility/gestures/GestureManifold.java @@ -295,7 +295,7 @@ class GestureManifold implements GestureMatcher.StateChangeListener { mListener.onGestureStarted(); } } else if (state == GestureMatcher.STATE_GESTURE_COMPLETED) { - onGestureCompleted(gestureId); + onGestureCompleted(gestureId, event, rawEvent, policyFlags); } else if (state == GestureMatcher.STATE_GESTURE_CANCELED && mState.isGestureDetecting()) { // We only want to call the cancelation callback if there are no other pending // detectors. @@ -311,8 +311,8 @@ class GestureManifold implements GestureMatcher.StateChangeListener { } } - private void onGestureCompleted(int gestureId) { - MotionEvent event = mState.getLastReceivedEvent(); + private void onGestureCompleted( + int gestureId, MotionEvent event, MotionEvent rawEvent, int policyFlags) { // Note that gestures that complete immediately call clear() from onMotionEvent. // Gestures that complete on a delay call clear() here. switch (gestureId) { |