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

Commit f98702ea authored by Selim Cinek's avatar Selim Cinek
Browse files

Protecting against the correct flag for the input consumer

Also allow hiding the navbar if immersive or immersivesticky.

Bug: 21089476
Change-Id: I540e668746056a0e4bb077898792afd225e4e19e
parent 714b0ab4
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -6320,11 +6320,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            }
            vis = (vis & ~flags) | (oldVis & flags);
        }
        if (windowTypeToLayerLw(type) > windowTypeToLayerLw(TYPE_INPUT_CONSUMER)) {
            // We can't get into fullscreen from this window otherwise the consumer would not get
            // the input events.
            vis = (vis & ~View.SYSTEM_UI_FLAG_FULLSCREEN);
        }

        if (!areTranslucentBarsAllowed() && transWin != mStatusBar) {
            vis &= ~(View.NAVIGATION_BAR_TRANSLUCENT | View.STATUS_BAR_TRANSLUCENT
@@ -6363,6 +6358,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            vis &= ~View.SYSTEM_UI_CLEARABLE_FLAGS;
        }

        final boolean immersive = (vis & View.SYSTEM_UI_FLAG_IMMERSIVE) != 0;
        immersiveSticky = (vis & View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) != 0;
        final boolean navAllowedHidden = immersive || immersiveSticky;

        if (!navAllowedHidden
                && windowTypeToLayerLw(type) > windowTypeToLayerLw(TYPE_INPUT_CONSUMER)) {
            // We can't hide the navbar from this window otherwise the input consumer would not get
            // the input events.
            vis = (vis & ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
        }

        vis = mStatusBarController.updateVisibilityLw(transientStatusBarAllowed, oldVis, vis);

        // update navigation bar