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

Commit dc016f37 authored by Samuel Fufa's avatar Samuel Fufa
Browse files

Fix QSB tap crash

Launcher should use LCM of supported getSupportedItemsPerRowArray instead of product.

Bug: 182236647
Test: Manual
Change-Id: Ia0ad1158a841068c29ed09bf7f598f14c410092f
parent c2b75079
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -290,9 +290,11 @@ public class AllAppsGridAdapter extends
    public void setAppsPerRow(int appsPerRow) {
        mAppsPerRow = appsPerRow;
        int totalSpans = mAppsPerRow;
        for (int itemPerRow : mSearchAdapterProvider.getSupportedItemsPerRow()) {
        for (int itemPerRow : mSearchAdapterProvider.getSupportedItemsPerRowArray()) {
            if (totalSpans % itemPerRow != 0) {
                totalSpans *= itemPerRow;
            }
        }
        mGridLayoutMgr.setSpanCount(totalSpans);
    }

+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ public abstract class SearchAdapterProvider {
    /**
     * Returns supported item per row combinations supported
     */
    public int[] getSupportedItemsPerRow() {
    public int[] getSupportedItemsPerRowArray() {
        return new int[]{};
    }