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

Commit 9d0335b1 authored by Adam Powell's avatar Adam Powell
Browse files

Fix for bug 2502886 - stupid monkeys.

Plugged a possible edge case with ScrollView/HorizontalScrollView that
could cause this error.

Change-Id: I509004189b9f5e536d6213c9fdfff598d9f958ca
parent ea08c513
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -410,7 +410,13 @@ public class HorizontalScrollView extends FrameLayout {
                * Locally do absolute value. mLastMotionX is set to the x value
                * of the down event.
                */
                final int pointerIndex = ev.findPointerIndex(mActivePointerId);
                final int activePointerId = mActivePointerId;
                if (activePointerId == INVALID_POINTER) {
                    // If we don't have a valid id, the touch down wasn't on content.
                    break;
                }

                final int pointerIndex = ev.findPointerIndex(activePointerId);
                final float x = ev.getX(pointerIndex);
                final int xDiff = (int) Math.abs(x - mLastMotionX);
                if (xDiff > mTouchSlop) {
+7 −1
Original line number Diff line number Diff line
@@ -408,7 +408,13 @@ public class ScrollView extends FrameLayout {
                * Locally do absolute value. mLastMotionY is set to the y value
                * of the down event.
                */
                final int pointerIndex = ev.findPointerIndex(mActivePointerId);
                final int activePointerId = mActivePointerId;
                if (activePointerId == INVALID_POINTER) {
                    // If we don't have a valid id, the touch down wasn't on content.
                    break;
                }

                final int pointerIndex = ev.findPointerIndex(activePointerId);
                final float y = ev.getY(pointerIndex);
                final int yDiff = (int) Math.abs(y - mLastMotionY);
                if (yDiff > mTouchSlop) {