OSDN Git Service

Fix item count check in Folder#replaceFolderWithFinalItem()
authorTony Wickham <twickham@google.com>
Fri, 18 Dec 2015 21:13:48 +0000 (13:13 -0800)
committerTony Wickham <twickham@google.com>
Fri, 18 Dec 2015 21:13:48 +0000 (13:13 -0800)
commitca656e3c69266234486c6669fc63244330cb0549
treec26ba530f9c2c5d28eec64822fd14ba1854fcc11
parentb740f59c7d572d54402e3a74fb2a23c0f1b1af48
Fix item count check in Folder#replaceFolderWithFinalItem()

Instead of checking the item count (number of views), check the number
of items in the model, since that is where the item is being removed.
This way, mInfo.contents.remove(0) will never be out of bounds.

Bug: 25666490
Change-Id: I0eb880b366157bddb5a8c342d538737722b7f0cd
src/com/android/launcher3/Folder.java