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

Commit 1e42ff63 authored by Randy Pfohl's avatar Randy Pfohl Committed by Android (Google) Code Review
Browse files

Merge "fixing rare NPE" into tm-qpr-dev

parents c01068f4 583241e6
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1370,8 +1370,14 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
                int velocity = (int) mOrientationHandler.getPrimaryVelocity(velocityTracker,
                        mActivePointerId);
                float delta = primaryDirection - mDownMotionPrimary;
                int pageOrientedSize = (int) (mOrientationHandler.getMeasuredSize(
                        getPageAt(mCurrentPage))

                View current = getPageAt(mCurrentPage);
                if (current == null) {
                    Log.e(TAG, "current page was null. this should not happen.");
                    return true;
                }

                int pageOrientedSize = (int) (mOrientationHandler.getMeasuredSize(current)
                        * mOrientationHandler.getPrimaryScale(this));
                boolean isSignificantMove = isSignificantMove(Math.abs(delta), pageOrientedSize);