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

Commit 1f778d59 authored by Adrian Roos's avatar Adrian Roos
Browse files

Multi cutout: Fix IME navigation guard

Ensures that the IME window always extends all the way to the bottom.
This is fine because in its decor view the navigation bar inset is
consumed by the navigation guard.

Bug: 74195186
Test: Enable multi-cutout; open a text field over non-black navigation bar. Verify entire bar turns black.
Change-Id: Iff142ccd2034684c37e140e4ccd1839691dbf443
parent 7e58a08c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -4984,8 +4984,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            df.set(displayFrames.mDock);
            pf.set(displayFrames.mDock);
            // IM dock windows layout below the nav bar...
            pf.bottom = df.bottom = of.bottom = Math.min(displayFrames.mUnrestricted.bottom,
                    displayFrames.mDisplayCutoutSafe.bottom);
            pf.bottom = df.bottom = of.bottom = displayFrames.mUnrestricted.bottom;
            // ...with content insets above the nav bar
            cf.bottom = vf.bottom = displayFrames.mStable.bottom;
            if (mStatusBar != null && mFocusedWindow == mStatusBar && canReceiveInput(mStatusBar)) {
@@ -5324,6 +5323,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                        break;
                }
            }
            if (type == TYPE_INPUT_METHOD && mNavigationBarPosition == NAV_BAR_BOTTOM) {
                // The IME can always extend under the bottom cutout if the navbar is there.
                displayCutoutSafeExceptMaybeBars.bottom = Integer.MAX_VALUE;
            }
            // Windows that are attached to a parent and laid out in said parent are already
            // avoidingthe cutout according to that parent and don't need to be further constrained.
            if (!attachedInParent) {