Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f285a59 authored by Becky Qiu's avatar Becky Qiu
Browse files

Fix the IndexOutOfBoundsException in AllAppsGridAdapter.

Bug: 231552223
Test: no need to test
Change-Id: I2d32f0ca973e6e9d5e97d9c69b5c76d26d91c254
parent 8217fce3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;
                }