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

Commit eaacd3f4 authored by Ned Burns's avatar Ned Burns Committed by Automerger Merge Worker
Browse files

Merge "Don't crash if NSSL gets incomplete gesture" into rvc-dev am: afc37b88 am: 127b3d71

Change-Id: I2bb2f233b29fba2f2c6d23562764eba9e0c27dec
parents 1ebc3c32 127b3d71
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -3866,9 +3866,16 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
        initVelocityTrackerIfNotExists();
        mVelocityTracker.addMovement(ev);

        final int action = ev.getAction();
        final int action = ev.getActionMasked();
        if (ev.findPointerIndex(mActivePointerId) == -1 && action != MotionEvent.ACTION_DOWN) {
            // Incomplete gesture, possibly due to window swap mid-gesture. Ignore until a new
            // one starts.
            Log.e(TAG, "Invalid pointerId=" + mActivePointerId + " in onTouchEvent "
                    + MotionEvent.actionToString(ev.getActionMasked()));
            return true;
        }

        switch (action & MotionEvent.ACTION_MASK) {
        switch (action) {
            case MotionEvent.ACTION_DOWN: {
                if (getChildCount() == 0 || !isInContentBounds(ev)) {
                    return false;