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

Commit b2acb965 authored by Sebastián Franco's avatar Sebastián Franco Committed by Android (Google) Code Review
Browse files

Merge "Fix IndexOutOfBoundsException in grid span lookup" into tm-qpr-dev

parents 04c89fe3 b6c5feaf
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -203,8 +203,12 @@ public class AllAppsGridAdapter<T extends Context & ActivityContext> extends

        @Override
        public int getSpanSize(int position) {
            int viewType = mApps.getAdapterItems().get(position).viewType;
            int totalSpans = mGridLayoutMgr.getSpanCount();
            List<AdapterItem> items = mApps.getAdapterItems();
            if (position >= items.size()) {
                return totalSpans;
            }
            int viewType = items.get(position).viewType;
            if (isIconViewType(viewType)) {
                return totalSpans / mAppsPerRow;
            } else {