Fix QSB tap crash

Launcher should use LCM of supported getSupportedItemsPerRowArray instead of product.

Bug: 182236647
Test: Manual
Change-Id: Ia0ad1158a841068c29ed09bf7f598f14c410092f
This commit is contained in:
Samuel Fufa
2021-03-09 09:57:40 -06:00
parent c2b750797c
commit dc016f37a2
2 changed files with 5 additions and 3 deletions

View File

@@ -290,8 +290,10 @@ public class AllAppsGridAdapter extends
public void setAppsPerRow(int appsPerRow) {
mAppsPerRow = appsPerRow;
int totalSpans = mAppsPerRow;
for (int itemPerRow : mSearchAdapterProvider.getSupportedItemsPerRow()) {
totalSpans *= itemPerRow;
for (int itemPerRow : mSearchAdapterProvider.getSupportedItemsPerRowArray()) {
if (totalSpans % itemPerRow != 0) {
totalSpans *= itemPerRow;
}
}
mGridLayoutMgr.setSpanCount(totalSpans);
}