Merge "Fix wrong check in DC#needsRelativeLayeringToIme" into sc-v2-dev
This commit is contained in:
@@ -3804,7 +3804,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean shouldImeAttachedToApp() {
|
boolean shouldImeAttachedToApp() {
|
||||||
return isImeControlledByApp()
|
// Force attaching IME to the display when magnifying, or it would be magnified with
|
||||||
|
// target app together.
|
||||||
|
final boolean allowAttachToApp = (mMagnificationSpec == null);
|
||||||
|
|
||||||
|
return allowAttachToApp && isImeControlledByApp()
|
||||||
&& mImeLayeringTarget != null
|
&& mImeLayeringTarget != null
|
||||||
&& mImeLayeringTarget.mActivityRecord != null
|
&& mImeLayeringTarget.mActivityRecord != null
|
||||||
&& mImeLayeringTarget.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
|
&& mImeLayeringTarget.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
|
||||||
@@ -4143,14 +4147,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
SurfaceControl computeImeParent() {
|
SurfaceControl computeImeParent() {
|
||||||
// Force attaching IME to the display when magnifying, or it would be magnified with
|
|
||||||
// target app together.
|
|
||||||
final boolean allowAttachToApp = (mMagnificationSpec == null);
|
|
||||||
|
|
||||||
// Attach it to app if the target is part of an app and such app is covering the entire
|
// Attach it to app if the target is part of an app and such app is covering the entire
|
||||||
// screen. If it's not covering the entire screen the IME might extend beyond the apps
|
// screen. If it's not covering the entire screen the IME might extend beyond the apps
|
||||||
// bounds.
|
// bounds.
|
||||||
if (allowAttachToApp && shouldImeAttachedToApp()) {
|
if (shouldImeAttachedToApp()) {
|
||||||
if (mImeLayeringTarget.mActivityRecord != mImeInputTarget.mActivityRecord) {
|
if (mImeLayeringTarget.mActivityRecord != mImeInputTarget.mActivityRecord) {
|
||||||
// Do not change parent if the window hasn't requested IME.
|
// Do not change parent if the window hasn't requested IME.
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -5681,7 +5681,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
|||||||
// elevating the IME and windows above it's target above the docked divider in
|
// elevating the IME and windows above it's target above the docked divider in
|
||||||
// split-screen, or make the popupMenu to be above the IME when the parent window is the
|
// split-screen, or make the popupMenu to be above the IME when the parent window is the
|
||||||
// IME layering target in bubble/freeform mode.
|
// IME layering target in bubble/freeform mode.
|
||||||
if (mDisplayContent.isImeAttachedToApp()) {
|
if (mDisplayContent.shouldImeAttachedToApp()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user