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

Commit 332ccfcc authored by hyok.kim's avatar hyok.kim Committed by Vishnu Nair
Browse files

[wm]: System ui visibility policy for freeform windowing

Even though fullscreen app is using fullscreen system ui
visibility flag, status bar is showing when focus on freeform.

do not apply system ui visibility of freeform window.

Test: Manual - Watch status bar visibility whlie focus
Test: atest WmTests:DisplayPolicyTests, DisplayPolicyLayoutTests
Bug: 129509931
Change-Id: I6f3b1aedc9986fe38c5a3e8cb63266e711be9c9e
(cherry picked from commit a80b14dacb9037f804e7925f792886f992ec58dc)
parent 503be6e6
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -2531,7 +2531,6 @@ public class DisplayPolicy {
                        changes |= FINISH_LAYOUT_REDO_LAYOUT;
                    }
                } else if (topIsFullscreen
                        && !mDisplayContent.isStackVisible(WINDOWING_MODE_FREEFORM)
                        && !mDisplayContent.isStackVisible(WINDOWING_MODE_SPLIT_SCREEN_PRIMARY)) {
                    if (DEBUG_LAYOUT) Slog.v(TAG, "** HIDING status bar");
                    if (mStatusBarController.setBarShowingLw(false)) {
@@ -2591,7 +2590,7 @@ public class DisplayPolicy {
     *         window.
     */
    private boolean topAppHidesStatusBar() {
        if (mTopFullscreenOpaqueWindowState == null) {
        if (mTopFullscreenOpaqueWindowState == null || mForceShowSystemBars) {
            return false;
        }
        final int fl = PolicyControl.getWindowFlags(null,
@@ -3253,9 +3252,9 @@ public class DisplayPolicy {
        final boolean resizing = mDisplayContent.getDockedDividerController().isResizing();

        // We need to force system bars when the docked stack is visible, when the freeform stack
        // is visible but also when we are resizing for the transitions when docked stack
        // is focused but also when we are resizing for the transitions when docked stack
        // visibility changes.
        mForceShowSystemBars = dockedStackVisible || freeformStackVisible || resizing
        mForceShowSystemBars = dockedStackVisible || win.inFreeformWindowingMode() || resizing
                || mForceShowSystemBarsFromExternal;
        final boolean forceOpaqueStatusBar = mForceShowSystemBars && !mForceStatusBarFromKeyguard;