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

Commit a17bfe04 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Allow clamped bound position to be INVALID_POSITION"

parents 7a8e3fcd 875f4c29
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7167,7 +7167,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te

            final int itemCount = getCount();
            final int clampedPosition = MathUtils.constrain(targetPosition, 0, itemCount - 1);
            final int clampedBoundPosition = MathUtils.constrain(boundPosition, 0, itemCount - 1);
            final int clampedBoundPosition = MathUtils.constrain(boundPosition, -1, itemCount - 1);
            final int firstPosition = getFirstVisiblePosition();
            final int lastPosition = firstPosition + getChildCount();
            final int targetRow = getRowForPosition(clampedPosition);