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

Commit 9cc55346 authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am d0725eef: Merge "Never drag scroll views with no children. (DO NOT MERGE)" into gingerbread

* commit 'd0725eef':
  Never drag scroll views with no children. (DO NOT MERGE)
parents 48d1432e d0725eef
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -502,8 +502,10 @@ public class HorizontalScrollView extends FrameLayout {

        switch (action & MotionEvent.ACTION_MASK) {
            case MotionEvent.ACTION_DOWN: {
                final float x = ev.getX();
                mIsBeingDragged = true;
                mIsBeingDragged = getChildCount() != 0;
                if (!mIsBeingDragged) {
                    return false;
                }

                /*
                 * If being flinged and user touches, stop the fling. isFinished
@@ -514,7 +516,7 @@ public class HorizontalScrollView extends FrameLayout {
                }

                // Remember where the motion event started
                mLastMotionX = x;
                mLastMotionX = ev.getX();
                mActivePointerId = ev.getPointerId(0);
                break;
            }
+6 −4
Original line number Diff line number Diff line
@@ -497,8 +497,10 @@ public class ScrollView extends FrameLayout {

        switch (action & MotionEvent.ACTION_MASK) {
            case MotionEvent.ACTION_DOWN: {
                final float y = ev.getY();
                mIsBeingDragged = true;
                mIsBeingDragged = getChildCount() != 0;
                if (!mIsBeingDragged) {
                    return false;
                }

                /*
                 * If being flinged and user touches, stop the fling. isFinished
@@ -509,7 +511,7 @@ public class ScrollView extends FrameLayout {
                }

                // Remember where the motion event started
                mLastMotionY = y;
                mLastMotionY = ev.getY();
                mActivePointerId = ev.getPointerId(0);
                break;
            }