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

Commit fbd0a419 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Reduce unnecessary invocation of shouldImeAttachedToApp" into main

parents 7697ea30 39c4f9d8
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -5351,7 +5351,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        outPos.y = (int) (surfaceInsets.top * mGlobalScale + 0.5f);
    }

    /**
     * Whether the layer of this window should be relatively above IME.
     * @see DisplayContent#assignRelativeLayerForImeLayeringTargetChild
     */
    boolean needsRelativeLayeringToIme() {
        if (!mDisplayContent.getImeContainer().isVisible()) {
            return false;
        }
        // We use the relative layering when IME isn't attached to the app. Such as part of
        // 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
@@ -5360,13 +5367,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            return false;
        }

        // We don't need to set the window to be relatively above IME if the IME is not visible.
        // In case seeing the window is animating above the app transition layer because its
        // relative layer is above the IME container on the display area but actually not necessary.
        if (!getDisplayContent().getImeContainer().isVisible()) {
            return false;
        }

        if (isChildWindow()) {
            // If we are a child of the IME layering target we need this promotion.
            if (getParentWindow().isImeLayeringTarget()) {