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

Commit 81de8456 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 5165771 - Gmail: crash on launch from notifier"

parents 3a81ac4a 3bb421d5
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -109,6 +109,13 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo
        // Divide the view into cells.
        final int cellCount = widthSize / mMinCellSize;
        final int cellSizeRemaining = widthSize % mMinCellSize;

        if (cellCount == 0) {
            // Give up, nothing fits.
            setMeasuredDimension(widthSize, 0);
            return;
        }

        final int cellSize = mMinCellSize + cellSizeRemaining / cellCount;

        int cellsRemaining = cellCount;
@@ -213,7 +220,8 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo
                }
            }

            final int extraPixels = (int) (cellsRemaining * cellSize / expandCount);
            final int extraPixels = expandCount > 0 ?
                    (int) (cellsRemaining * cellSize / expandCount) : 0;

            for (int i = 0; i < childCount; i++) {
                if ((smallestItemsAt & (1 << i)) == 0) continue;