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

Commit d065af80 authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "Fix IME for status bar in docked mode" into nyc-dev

am: 93536af5

* commit '93536af5':
  Fix IME for status bar in docked mode

Change-Id: I9af5c7dcece0b6b018c8d6f64b103332bbbc5a16
parents 47c66249 93536af5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -208,7 +208,11 @@ public class WindowLayersController {

        if (mDockDivider != null && mDockDivider.isVisibleLw()) {
            while (!mInputMethodWindows.isEmpty()) {
                layer = assignAndIncreaseLayerIfNeeded(mInputMethodWindows.remove(), layer);
                final WindowState w = mInputMethodWindows.remove();
                // Only ever move IME windows up, else we brake IME for windows above the divider.
                if (layer > w.mLayer) {
                    layer = assignAndIncreaseLayerIfNeeded(w, layer);
                }
            }
        }

+4 −2
Original line number Diff line number Diff line
@@ -1574,11 +1574,13 @@ public class WindowManagerService extends IWindowManager.Stub
            // If the docked divider is visible, we still need to go through this whole
            // excercise to find the appropriate input method target (used for animations
            // and dialog adjustments), but for purposes of Z ordering we simply wish to
            // place it above the docked divider.
            // place it above the docked divider. Unless it is already above the divider.
            WindowState dockedDivider = w.mDisplayContent.mDividerControllerLocked.getWindow();
            if (dockedDivider != null && dockedDivider.isVisibleLw()) {
                int dividerIndex = windows.indexOf(dockedDivider);
                return dividerIndex > 0 ? dividerIndex + 1 : i + 1;
                if (dividerIndex > 0 && dividerIndex > i) {
                    return dividerIndex + 1;
                }
            }
            return i+1;
        }