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

Commit 7ee1ff14 authored by Adam Powell's avatar Adam Powell
Browse files
Prevent overflow in FastScroller indexing

Change-Id: I53f90feaefd49717a0bdaddcf9a4988318d40c7d
parent 5fa7aac8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -564,6 +564,9 @@ class FastScroller {
            }
        } else {
            int index = (int) (position * count);
            // Don't overflow
            if (index > count - 1) index = count - 1;

            if (mList instanceof ExpandableListView) {
                ExpandableListView expList = (ExpandableListView) mList;
                expList.setSelectionFromTop(expList.getFlatListPosition(