Skip to content

Commit 662e4a4

Browse files
Adam CohenAndroid (Google) Code Review
authored andcommitted
Merge "Fix ANR which could occur for collection widgets with very large items" into jb-dev
2 parents 7a9328a + 35fbe2a commit 662e4a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/RemoteViewsAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ private int getFarthestPositionFrom(int pos) {
614614
maxDistIndexNonRequested = i;
615615
maxDistNonRequested = dist;
616616
}
617-
if (dist > maxDist) {
617+
if (dist >= maxDist) {
618618
// maxDist/maxDistIndex will store the index of the farthest position
619619
// regardless of whether it was directly requested or not
620620
maxDistIndex = i;

0 commit comments

Comments
 (0)