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

Commit 0c124c6a authored by Adrian Roos's avatar Adrian Roos
Browse files

DisplayCutout: Correctly apply light status bar

Fixes an issue where light navigation bar was not
properly applied in landscape where the letterbox
does not overlap with the status bar.

This removes a hack that is no longer necessary
now that we track exactly if the letterbox overlaps
the system bars and put them into black-background
mode if so.

Bug: 72696928
Test: Open API Demos > Activity > Max Aspect Ratio > Any; rotate to landscape, verify that status bar is light.
Change-Id: Ifc6355e2eeadf0821c9ac82ce78c812916de5034
parent 23df3a3c
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -8034,11 +8034,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            // If the top fullscreen-or-dimming window is also the top fullscreen, respect
            // its light flag.
            vis &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
            if (!statusColorWin.isLetterboxedForDisplayCutoutLw()) {
                // Only allow white status bar if the window was not letterboxed.
            vis |= PolicyControl.getSystemUiVisibility(statusColorWin, null)
                    & View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
            }
        } else if (statusColorWin != null && statusColorWin.isDimming()) {
            // Otherwise if it's dimming, clear the light flag.
            vis &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;