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
This commit is contained in:
Jorim Jaggi
2020-02-17 17:52:06 +01:00
committed by Tiger Huang
parent 71bfe434ea
commit 001b3418e3
2 changed files with 6 additions and 1 deletions

View File

@@ -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.

View File

@@ -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();
}
}