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

Commit 84e69c3b authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge changes I7d406cc8,Id6cf70ea into nyc-dev

* changes:
  Do not set docked divider as IME target.
  Fix IME adjustment for docked.
parents 3942978a ebe9c0db
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -203,6 +203,12 @@ public class WindowLayersController {
        // the divider sometimes overlaps the app windows.
        layer++;
        layer = assignAndIncreaseLayerIfNeeded(mDockDivider, layer);

        // If we have a dock divider ensure the Input Method is above it.
        if (mDockDivider != null && 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.
+1 −1
Original line number Diff line number Diff line
@@ -1373,7 +1373,7 @@ public class WindowManagerService extends IWindowManager.Stub
        // 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()) {
+12 −4
Original line number Diff line number Diff line
@@ -670,10 +670,18 @@ final class WindowState implements WindowManagerPolicy.WindowState {
                mContainingFrame.bottom = mContainingFrame.top + frozen.height();
            }
            final WindowState imeWin = mService.mInputMethodWindow;
            if (imeWin != null && imeWin.isVisibleNow() && mService.mInputMethodTarget == this
                    && mContainingFrame.bottom > cf.bottom) {
            // IME is up and obscuring this window. Adjust the window position so it is visible.
            if (imeWin != null && imeWin.isVisibleNow() && mService.mInputMethodTarget == this) {
                    if (windowsAreFloating && mContainingFrame.bottom > cf.bottom) {
                        // In freeform we want to move the top up directly.
                        // TODO: Investigate why this is cf not pf.
                        mContainingFrame.top -= mContainingFrame.bottom - cf.bottom;
                    } else if (mContainingFrame.bottom > pf.bottom) {
                        // But in docked we want to behave like fullscreen
                        // and behave as if the task were given smaller bounds
                        // for the purposes of layout.
                        mContainingFrame.bottom = pf.bottom;
                    }
            }

            if (windowsAreFloating) {