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

Commit bc746cdc authored by Adrian Roos's avatar Adrian Roos
Browse files

DisplayCutout: Ensure stable insets cover top cutout

Fixes an issue where the stable insets could become smaller
than the top cutout if the display density was set lower
than the natural density.

Bug: 78110564
Test: Set display size to "small", turn on cutout, verify apps do not have a gap between status bar and content.
Change-Id: I478047ccaade0e4e265cc57d03b072ae578b49d0
parent 535c4201
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4809,6 +4809,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        // For layout, the status bar is always at the top with our fixed height.
        displayFrames.mStable.top = displayFrames.mUnrestricted.top
                + mStatusBarHeightForRotation[displayFrames.mRotation];
        // Make sure the status bar covers the entire cutout height
        displayFrames.mStable.top = Math.max(displayFrames.mStable.top,
                displayFrames.mDisplayCutoutSafe.top);

        // Tell the bar controller where the collapsed status bar content is
        mTmpRect.set(mStatusBar.getContentFrameLw());