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

Commit 875f4c29 authored by Alan Viverette's avatar Alan Viverette
Browse files

Allow clamped bound position to be INVALID_POSITION

Change-Id: Idd392e41cb8df31e2933851fa6abd87fc3e2001b
parent 31e052bf
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);