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

Commit 70ec3c66 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Remove layoutMinHeight uses" into main

parents 430b80c5 90191232
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
@@ -2799,6 +2801,7 @@ public class NotificationStackScrollLayout
    }

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