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

Commit 001b3418 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Tiger Huang
Browse files

Allow showing when control target is IME fallback

When we need to make the IME fallback the control target, we also
need to allow showing the IME as the existing check doesn't pass.

Bug: 111084606
Test: MultiDisplaySystemDecorationTests.testCrossDisplayBasicImeOperations
Test: MultiDisplaySecurityTests.testNoInputConnectionForUntrustedVirtualDisplay
Change-Id: Ibbf21a8da2e523fce1703b80b1cba45c0989eecf
parent 71bfe434
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3430,6 +3430,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
        if (target != null && target.getDisplayContent().canShowIme()) {
            return target;
        }
        return getImeFallback();
    }

    WindowState getImeFallback() {

        // host is in non-default display that doesn't support system decor, default to
        // default display's StatusBar to control IME.
+2 −1
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ class ImeInsetsSourceProvider extends InsetsSourceProvider {

        return (!dcTarget.isClosing() && mImeTargetFromIme == dcTarget)
                || (mImeTargetFromIme != null && dcTarget.getParentWindow() == mImeTargetFromIme
                && dcTarget.mSubLayer > mImeTargetFromIme.mSubLayer);
                        && dcTarget.mSubLayer > mImeTargetFromIme.mSubLayer)
                || mImeTargetFromIme == mDisplayContent.getImeFallback();
    }
}