Merge "Fix the IndexOutOfBoundsException in AllAppsGridAdapter." into tm-dev am: 05eac3ee27 am: 3229ecc69b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18206586 Change-Id: I910863d77baa38cd12aa7043234907abadcf7b1d 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