Tame some monkeys

Change-Id: I1bdcd466d6bacb0cebdd6bb0b5339477c2c284b0
This commit is contained in:
Adam Powell
2010-03-11 18:09:59 -08:00
parent 80362d4ac8
commit 2a20ddd90b

View File

@@ -3155,7 +3155,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
}
if (!inTouchMode && mSelectedPosition != INVALID_POSITION) {
positionSelector(getChildAt(mSelectedPosition - mFirstPosition));
final int childIndex = mSelectedPosition - mFirstPosition;
if (childIndex >= 0 && childIndex < getChildCount()) {
positionSelector(getChildAt(childIndex));
}
}
mBlockLayoutRequests = false;