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

Commit 9da141fe authored by Robert Carr's avatar Robert Carr
Browse files

Do not set docked divider as IME target.

If we do this, we will fail to adjust the proper IME target
to make it visible. Accomplish relative ordering of IME and
Docked Divider in WindowLayersController instead.

We need to take care that adjustSpecialWindows won't push windows
down if they are already positioned above the highest application
layer. We also take care to not adjust the IME if the docked divider
isn't really visible.

Bug: 26387930
Change-Id: I26ca36c4f7ecf9d97f44e15c67df82b8154a169c
parent 74af6e28
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -199,6 +199,12 @@ public class WindowLayersController {
        }

        layer = assignAndIncreaseLayerIfNeeded(mDockDivider, layer);

        if (mDockDivider != null && mDockDivider.isVisibleLw()
                && mService.mInputMethodWindow != null) {
            layer = assignAndIncreaseLayerIfNeeded(mService.mInputMethodWindow, layer);
        }

        // We know that we will be animating a relaunching window in the near future, which will
        // receive a z-order increase. We want the replaced window to immediately receive the same
        // treatment, e.g. to be above the dock divider.
@@ -212,7 +218,7 @@ public class WindowLayersController {
    }

    private int assignAndIncreaseLayerIfNeeded(WindowState win, int layer) {
        if (win != null) {
        if (win != null && layer > win.mLayer) {
            assignAnimLayer(win, layer);
            // Make sure we leave space inbetween normal windows for dims and such.
            layer += WINDOW_LAYER_MULTIPLIER;
+1 −4
Original line number Diff line number Diff line
@@ -1369,11 +1369,8 @@ public class WindowManagerService extends IWindowManager.Stub
        final int fl = w.mAttrs.flags
                & (FLAG_NOT_FOCUSABLE|FLAG_ALT_FOCUSABLE_IM);
        final int type = w.mAttrs.type;
        // The dock divider has to sit above the application windows and so does the IME. IME also
        // needs to sit above the dock divider, so it doesn't get cut in half. We make the dock
        // divider be a target for IME, so this relationship can occur naturally.
        if (fl == 0 || fl == (FLAG_NOT_FOCUSABLE|FLAG_ALT_FOCUSABLE_IM)
                || type == TYPE_APPLICATION_STARTING || type == TYPE_DOCK_DIVIDER) {
                || type == TYPE_APPLICATION_STARTING) {
            if (DEBUG_INPUT_METHOD) {
                Slog.i(TAG_WM, "isVisibleOrAdding " + w + ": " + w.isVisibleOrAdding());
                if (!w.isVisibleOrAdding()) {