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

Commit 318f3b84 authored by Julia Tuttle's avatar Julia Tuttle Committed by Android (Google) Code Review
Browse files

Merge "NSSL: Apply skinny notifs based on split shade state" into main

parents 64166305 13203c2c
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -954,17 +954,25 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
                            + ": " + mLastUpdateSidePaddingDumpString);
        }

        if (viewWidth == 0 || !mSkinnyNotifsInLandscape) {
        if (viewWidth == 0) {
            Log.e(TAG, "updateSidePadding: viewWidth is zero");
            mSidePaddings = mMinimumPaddings;
            return;
        }

        // Portrait is easy, just use the dimen for paddings
        if (orientation == Configuration.ORIENTATION_PORTRAIT) {
            mSidePaddings = mMinimumPaddings;
            return;
        }

        if (mShouldUseSplitNotificationShade) {
            if (mSkinnyNotifsInLandscape) {
                Log.e(TAG, "updateSidePadding: mSkinnyNotifsInLandscape has betrayed us!");
            }
            mSidePaddings = mMinimumPaddings;
            return;
        }

        final int innerWidth = viewWidth - mMinimumPaddings * 2;
        final int qsTileWidth = (innerWidth - mQsTilePadding * 3) / 4;
        mSidePaddings = mMinimumPaddings + qsTileWidth + mQsTilePadding;