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

Commit 36e4d966 authored by Andy Wickham's avatar Andy Wickham
Browse files

Re-apply all apps insets when unfolding.

Previously, if insets had been applied while folded ("phone"),
they would stick around when unfolding ("tablet").

This applies the intended 0 left/right margins when in "tablet"
mode regardless of the insets.

Fix: 321159393
Test: Open all apps in phone landscape, unfold
Flag: NA
Change-Id: Ida1f20711a2a2b9b54f6b2c18abf5abf4fd2b175
parent af7ff567
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1156,13 +1156,15 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>

        applyAdapterSideAndBottomPaddings(grid);

        // Ignore left/right insets on tablet because we are already centered in-screen.
        if (grid.isPhone) {
        MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams();
        // Ignore left/right insets on tablet because we are already centered in-screen.
        if (grid.isTablet) {
            mlp.leftMargin = mlp.rightMargin = 0;
        } else {
            mlp.leftMargin = insets.left;
            mlp.rightMargin = insets.right;
            setLayoutParams(mlp);
        }
        setLayoutParams(mlp);

        if (!grid.isVerticalBarLayout() || FeatureFlags.enableResponsiveWorkspace()) {
            int topPadding = grid.allAppsPadding.top;