Skip to content

Commit 1f34844

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "NullPointerException in AbsListView.focusSearch()." into jb-dev
2 parents ccf97dc + 3016c1a commit 1f34844

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/AbsListView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ public View focusSearch(View focused, int direction) {
13881388
}
13891389
// Try to move focus to the next item.
13901390
final int nextPosition = currentPosition - getFirstVisiblePosition() + 1;
1391-
for (int i = nextPosition; i <= getLastVisiblePosition(); i++) {
1391+
for (int i = nextPosition; i < getChildCount(); i++) {
13921392
View child = getChildAt(i);
13931393
if (child.getVisibility() == View.VISIBLE) {
13941394
return child;

0 commit comments

Comments
 (0)