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

Commit 07064fa7 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix ScrollView nested scrolling with touch down on buttons"

parents 08f15963 e9a16a5a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -17980,7 +17980,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *
     * <p>If <code>startNestedScroll</code> returns true, a cooperative parent was found.
     * If it returns false the caller may ignore the rest of this contract until the next scroll.
     * </p>
     * Calling startNestedScroll while a nested scroll is already in progress will return true.</p>
     *
     * <p>At each incremental step of the scroll the caller should invoke
     * {@link #dispatchNestedPreScroll(int, int, int[], int[]) dispatchNestedPreScroll}
@@ -18004,6 +18004,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @see #dispatchNestedScroll(int, int, int, int, int[])
     */
    public boolean startNestedScroll(int axes) {
        if (hasNestedScrollingParent()) {
            // Already in progress
            return true;
        }
        if (isNestedScrollingEnabled()) {
            ViewParent p = getParent();
            View child = this;
+1 −0
Original line number Diff line number Diff line
@@ -2342,6 +2342,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager

        if (disallowIntercept) {
            mGroupFlags |= FLAG_DISALLOW_INTERCEPT;
            stopNestedScroll();
        } else {
            mGroupFlags &= ~FLAG_DISALLOW_INTERCEPT;
        }
+2 −0
Original line number Diff line number Diff line
@@ -553,6 +553,7 @@ public class ScrollView extends FrameLayout {
                if (mIsBeingDragged && mScrollStrictSpan == null) {
                    mScrollStrictSpan = StrictMode.enterCriticalSpan("ScrollView-scroll");
                }
                startNestedScroll(SCROLL_AXIS_VERTICAL);
                break;
            }

@@ -565,6 +566,7 @@ public class ScrollView extends FrameLayout {
                if (mScroller.springBack(mScrollX, mScrollY, 0, 0, 0, getScrollRange())) {
                    postInvalidateOnAnimation();
                }
                stopNestedScroll();
                break;
            case MotionEvent.ACTION_POINTER_UP:
                onSecondaryPointerUp(ev);