Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd4bf1c8 authored by Ameer Armaly's avatar Ameer Armaly Committed by Automerger Merge Worker
Browse files

Merge "GestureManifold: fix null pointer exception in onGestureCompleted."...

Merge "GestureManifold: fix null pointer exception in onGestureCompleted." into rvc-dev am: cee5a217

Change-Id: I158be191621054eb01085624e32d723a4553ba4c
parents 8cfc7c1e cee5a217
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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) {