Fix off by one in ListView's upward focus traversal

Bug: 7985315
Change-Id: Ic67c8e346d6b51a5cfb05cc7d0c2b145b591b2db
This commit is contained in:
Michael Wright
2013-04-08 14:37:01 -07:00
parent 9e176c8b0e
commit b482a001f1

View File

@@ -2433,7 +2433,7 @@ public class ListView extends AbsListView {
mFirstPosition;
} else {
final int lastPos = mFirstPosition + getChildCount() - 1;
nextSelected = selectedPos != INVALID_POSITION && selectedPos < lastPos?
nextSelected = selectedPos != INVALID_POSITION && selectedPos <= lastPos ?
selectedPos - 1 :
lastPos;
}