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

Commit 8c6da7ed authored by Selim Cinek's avatar Selim Cinek Committed by Android Git Automerger
Browse files

am 23eba390: am 3b8389a2: am 912696e7: Merge "Fixed logspam and handling...

am 23eba390: am 3b8389a2: am 912696e7: Merge "Fixed logspam and handling subwindows with the input consumer" into mnc-dev

* commit '23eba390':
  Fixed logspam and handling subwindows with the input consumer
parents 8a353e62 23eba390
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -275,6 +275,13 @@ public interface WindowManagerPolicy {
         */
        public int getSurfaceLayer();

        /**
         * Retrieve the type of the top-level window.
         *
         * @return the base type of the parent window if attached or its own type otherwise
         */
        public int getBaseType();

        /**
         * Return the token for the application (actually activity) that owns
         * this window.  May return null for system windows.
+2 −2
Original line number Diff line number Diff line
@@ -6386,8 +6386,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        immersiveSticky = (vis & View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) != 0;
        final boolean navAllowedHidden = immersive || immersiveSticky;

        if (!navAllowedHidden
                && windowTypeToLayerLw(type) > windowTypeToLayerLw(TYPE_INPUT_CONSUMER)) {
        if (hideNavBarSysui && !navAllowedHidden && windowTypeToLayerLw(win.getBaseType())
                > 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);
+9 −0
Original line number Diff line number Diff line
@@ -780,6 +780,15 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        return mLayer;
    }

    @Override
    public int getBaseType() {
        WindowState win = this;
        while (win.mAttachedWindow != null) {
            win = win.mAttachedWindow;
        }
        return win.mAttrs.type;
    }

    @Override
    public IApplicationToken getAppToken() {
        return mAppToken != null ? mAppToken.appToken : null;