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

Commit bc337d2f authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 73ccafb5: Merge "Fix a bug where requestDisallowInterceptTouchEvent does...

am 73ccafb5: Merge "Fix a bug where requestDisallowInterceptTouchEvent does not get called when scrolling is resumed after stopping a fling." into gingerbread

Merge commit '73ccafb5' into gingerbread-plus-aosp

* commit '73ccafb5':
  Fix a bug where requestDisallowInterceptTouchEvent does not get called
parents 0c837a2e 73ccafb5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -223,8 +223,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager

    /**
     * When set, this ViewGroup should not intercept touch events.
     * {@hide}
     */
    private static final int FLAG_DISALLOW_INTERCEPT = 0x80000;
    protected static final int FLAG_DISALLOW_INTERCEPT = 0x80000;

    /**
     * Indicates which types of drawing caches are to be kept in memory.
+8 −0
Original line number Diff line number Diff line
@@ -2056,6 +2056,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                }

                if (y != mLastY) {
                    // We may be here after stopping a fling and continuing to scroll.
                    // If so, we haven't disallowed intercepting touch events yet.
                    // Make sure that we do so in case we're in a parent that can intercept.
                    if ((mGroupFlags & FLAG_DISALLOW_INTERCEPT) == 0 &&
                            Math.abs(deltaY) > mTouchSlop) {
                        requestDisallowInterceptTouchEvent(true);
                    }

                    deltaY -= mMotionCorrection;
                    int incrementalDeltaY = mLastY != Integer.MIN_VALUE ? y - mLastY : deltaY;