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

Commit 90191232 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

[flexiglass] Remove layoutMinHeight uses

Test: manually tested that HUNs look okay, including when the QS panel
is fully expanded
Flag: com.android.systemui.scene_container
Bug: 360106096

Change-Id: I339028e34b6f2c429f5b58bb4330145348364c1d
parent 8755f8ea
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -533,8 +533,15 @@ public class AmbientState implements Dumpable {
        if (mDozeAmount == 1.0f && !isPulseExpanding()) {
            return mShelf.getHeight();
        }
        int height = (int) Math.max(mLayoutMinHeight,
        int height;
        if (SceneContainerFlag.isEnabled()) {
            // TODO(b/192348384): This is probably incorrect as mContentHeight is not up to date.
            //  Consider removing usages of getInnerHeight in flexiglass if possible.
            height = (int) Math.min(mLayoutHeight, mContentHeight) - mTopPadding;
        } else {
            height = (int) Math.max(mLayoutMinHeight,
                    Math.min(mLayoutHeight, mContentHeight) - mTopPadding);
        }
        if (ignorePulseHeight) {
            return height;
        }
@@ -571,6 +578,7 @@ public class AmbientState implements Dumpable {
    }

    public void setLayoutMinHeight(int layoutMinHeight) {
        SceneContainerFlag.assertInLegacyMode();
        mLayoutMinHeight = layoutMinHeight;
    }

+5 −2
Original line number Diff line number Diff line
@@ -1308,9 +1308,11 @@ public class NotificationStackScrollLayout
    }

    private void updateAlgorithmLayoutMinHeight() {
        if (!SceneContainerFlag.isEnabled()) {
            mAmbientState.setLayoutMinHeight(mQsFullScreen || isHeadsUpTransition()
                    ? getLayoutMinHeightInternal() : 0);
        }
    }

    /**
     * Updates the children views according to the stack scroll algorithm. Call this whenever
@@ -2795,6 +2797,7 @@ public class NotificationStackScrollLayout
    }

    private int getLayoutMinHeightInternal() {
        SceneContainerFlag.assertInLegacyMode();
        if (isHeadsUpTransition()) {
            ExpandableNotificationRow trackedHeadsUpRow = mAmbientState.getTrackedHeadsUpRow();
            if (trackedHeadsUpRow.isAboveShelf()) {