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

Commit 2e5c21b8 authored by Selim Cinek's avatar Selim Cinek Committed by Android Git Automerger
Browse files

am f98702ea: Protecting against the correct flag for the input consumer

* commit 'f98702ea':
  Protecting against the correct flag for the input consumer
parents 2fd28c9a f98702ea
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