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:
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user