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

Commit 21116068 authored by Jan-Willem Maarse's avatar Jan-Willem Maarse Committed by Android (Google) Code Review
Browse files

Merge "Ignore generic motion events if custom content doesn't allow scrolling" into ub-now-porkchop

parents c50438c8 d3fbe683
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -1115,6 +1115,17 @@ public class Workspace extends SmoothPagedView
        return super.onInterceptTouchEvent(ev);
        return super.onInterceptTouchEvent(ev);
    }
    }


    @Override
    public boolean onGenericMotionEvent(MotionEvent event) {
        // Ignore pointer scroll events if the custom content doesn't allow scrolling.
        if ((getScreenIdForPageIndex(getCurrentPage()) == CUSTOM_CONTENT_SCREEN_ID)
                && (mCustomContentCallbacks != null)
                && !mCustomContentCallbacks.isScrollingAllowed()) {
            return false;
        }
        return super.onGenericMotionEvent(event);
    }

    protected void reinflateWidgetsIfNecessary() {
    protected void reinflateWidgetsIfNecessary() {
        final int clCount = getChildCount();
        final int clCount = getChildCount();
        for (int i = 0; i < clCount; i++) {
        for (int i = 0; i < clCount; i++) {