Merge "Fix ANR which could occur for collection widgets with very large items" into jb-dev

This commit is contained in:
Adam Cohen
2012-05-22 14:41:54 -07:00
committed by Android (Google) Code Review

View File

@@ -614,7 +614,7 @@ public class RemoteViewsAdapter extends BaseAdapter implements Handler.Callback
maxDistIndexNonRequested = i;
maxDistNonRequested = dist;
}
if (dist > maxDist) {
if (dist >= maxDist) {
// maxDist/maxDistIndex will store the index of the farthest position
// regardless of whether it was directly requested or not
maxDistIndex = i;