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

Commit d0c735fc authored by Adam Cohen's avatar Adam Cohen
Browse files

Fix issue 5905210, AdapterViewAnimator sending negative index to Adapter

Change-Id: I6c1a3c17f1009d9512328f5844e17025f95a216c
parent e8bb6fef
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -558,7 +558,9 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
            mCurrentWindowEnd = newWindowEnd;
            mCurrentWindowStartUnbounded = newWindowStartUnbounded;
            if (mRemoteViewsAdapter != null) {
                mRemoteViewsAdapter.setVisibleRangeHint(mCurrentWindowStart, mCurrentWindowEnd);
                int adapterStart = modulo(mCurrentWindowStart, adapterCount);
                int adapterEnd = modulo(mCurrentWindowEnd, adapterCount);
                mRemoteViewsAdapter.setVisibleRangeHint(adapterStart, adapterEnd);
            }
        }
        requestLayout();