mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 09:38:19 +00:00
Fix the IndexOutOfBoundsException in AllAppsGridAdapter.
Bug: 231552223 Test: no need to test Change-Id: I2d32f0ca973e6e9d5e97d9c69b5c76d26d91c254
This commit is contained in:
@@ -118,7 +118,7 @@ public class AllAppsGridAdapter<T extends Context & ActivityContext> extends
|
||||
List<AdapterItem> items = mApps.getAdapterItems();
|
||||
adapterPosition = Math.max(adapterPosition, items.size() - 1);
|
||||
int extraRows = 0;
|
||||
for (int i = 0; i <= adapterPosition; i++) {
|
||||
for (int i = 0; i <= adapterPosition && i < items.size(); i++) {
|
||||
if (!isViewType(items.get(i).viewType, VIEW_TYPE_MASK_ICON)) {
|
||||
extraRows++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user