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

Commit fb4c40cd authored by Ming-Shin Lu's avatar Ming-Shin Lu Committed by Automerger Merge Worker
Browse files

Merge "Fix wrong check in DC#needsRelativeLayeringToIme" into sc-v2-dev am:...

Merge "Fix wrong check in DC#needsRelativeLayeringToIme" into sc-v2-dev am: 79930700 am: c1c941d3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15990502

Change-Id: Ibe515c7a0c2e6e0c041013711dc1f7782c8216fc
parents c94f6cfa c1c941d3
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -3784,7 +3784,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    }

    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.mActivityRecord != null
                && mImeLayeringTarget.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
@@ -4122,14 +4126,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
     */
    @VisibleForTesting
    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
        // screen. If it's not covering the entire screen the IME might extend beyond the apps
        // bounds.
        if (allowAttachToApp && shouldImeAttachedToApp()) {
        if (shouldImeAttachedToApp()) {
            if (mImeLayeringTarget.mActivityRecord != mImeInputTarget.mActivityRecord) {
                // Do not change parent if the window hasn't requested IME.
                return null;
+1 −1
Original line number Diff line number Diff line
@@ -5596,7 +5596,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        // 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
        // IME layering target in bubble/freeform mode.
        if (mDisplayContent.isImeAttachedToApp()) {
        if (mDisplayContent.shouldImeAttachedToApp()) {
            return false;
        }