Fix external bug http://code.google.com/p/android/issues/detail?id=15183
Prevent overflow in FastScroller indexing Change-Id: I53f90feaefd49717a0bdaddcf9a4988318d40c7d
This commit is contained in:
@ -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(
|
||||
|
Reference in New Issue
Block a user