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

Commit 69a10949 authored by Adam Cohen's avatar Adam Cohen Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE from feedback (issue 12106858)" into jb-ub-now-kermit

parents 306c1cf2 4de0974c
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -1152,6 +1152,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc

    @Override
    protected void dispatchDraw(Canvas canvas) {
        // Find out which screens are visible; as an optimization we only call draw on them
        final int pageCount = getChildCount();
        if (pageCount > 0) {
            int halfScreenSize = getViewportWidth() / 2;
            // mOverScrollX is equal to getScrollX() when we're within the normal scroll range.
            // Otherwise it is equal to the scaled overscroll position.
@@ -1165,9 +1168,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
                mLastScreenCenter = screenCenter;
            }

        // Find out which screens are visible; as an optimization we only call draw on them
        final int pageCount = getChildCount();
        if (pageCount > 0) {
            getVisiblePages(mTempVisiblePagesRange);
            final int leftScreen = mTempVisiblePagesRange[0];
            final int rightScreen = mTempVisiblePagesRange[1];
+1 −1
Original line number Diff line number Diff line
@@ -1657,7 +1657,7 @@ public class Workspace extends SmoothPagedView
                cl.setOverscrollTransformsDirty(true);
            }
        } else {
            if (mOverscrollTransformsSet) {
            if (mOverscrollTransformsSet && getChildCount() > 0) {
                mOverscrollTransformsSet = false;
                ((CellLayout) getChildAt(0)).resetOverscrollTransforms();
                ((CellLayout) getChildAt(getChildCount() - 1)).resetOverscrollTransforms();