Merge "Fix the IndexOutOfBoundsException in AllAppsGridAdapter." into tm-dev am: 05eac3ee27
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18206586 Change-Id: I6d37c79cf8c538b5ad513dc2a3e336fa1341b633 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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