Fix index out of bounds
Change-Id: Id288c01ab7e39fb16e7247030dbb76183436cb79
This commit is contained in:
@@ -219,6 +219,7 @@ public class Folder extends LinearLayout implements DragSource, OnItemLongClickL
|
||||
ShortcutInfo child = (ShortcutInfo) children.get(i);
|
||||
createAndAddShortcut(child);
|
||||
}
|
||||
mItemsInvalidated = true;
|
||||
mInfo.addListener(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ public class FolderIcon extends FrameLayout implements DropTarget, FolderListene
|
||||
|
||||
ArrayList<View> items = mFolder.getItemsInReadingOrder();
|
||||
int firstItemIndex = Math.max(0, items.size() - NUM_ITEMS_IN_PREVIEW);
|
||||
for (int i = firstItemIndex; i < mFolder.getItemCount(); i++) {
|
||||
for (int i = firstItemIndex; i < items.size(); i++) {
|
||||
v = (TextView) items.get(i);
|
||||
d = v.getCompoundDrawables()[1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user