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

Commit 14124c69 authored by satok's avatar satok Committed by Android (Google) Code Review
Browse files

Merge "Fix the issue that the insets linger after closing the voice input" into jb-dev

parents 956f9bd0 e0a99414
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1142,6 +1142,10 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        if (mCurToken != null) {
            try {
                if (DEBUG) Slog.v(TAG, "Removing window token: " + mCurToken);
                if ((mImeWindowVis & InputMethodService.IME_ACTIVE) != 0) {
                    // The current IME is shown. Hence an IME switch (transition) is happening.
                    mWindowManagerService.saveLastInputMethodWindowForTransition();
                }
                mIWindowManager.removeWindowToken(mCurToken);
            } catch (RemoteException e) {
            }
+9 −3
Original line number Diff line number Diff line
@@ -3430,9 +3430,6 @@ public class WindowManagerService extends IWindowManager.Stub
        synchronized(mWindowMap) {
            WindowToken wtoken = mTokenMap.remove(token);
            if (wtoken != null) {
                if (wtoken.windowType == TYPE_INPUT_METHOD && mInputMethodWindow != null) {
                    mPolicy.setLastInputMethodWindowLw(mInputMethodWindow, mInputMethodTarget);
                }
                boolean delayed = false;
                if (!wtoken.hidden) {
                    wtoken.hidden = true;
@@ -9269,6 +9266,15 @@ public class WindowManagerService extends IWindowManager.Stub
        }
    }

    // It is assumed that this method is called only by InputMethodManagerService.
    public void saveLastInputMethodWindowForTransition() {
        synchronized (mWindowMap) {
            if (mInputMethodWindow != null) {
                mPolicy.setLastInputMethodWindowLw(mInputMethodWindow, mInputMethodTarget);
            }
        }
    }

    @Override
    public boolean hasNavigationBar() {
        return mPolicy.hasNavigationBar();