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

Commit 96f55fb7 authored by satok's avatar satok Committed by Android Git Automerger
Browse files

am 5f745367: am d422ade3: Merge "Fix the issue that the ime switch icon is...

am 5f745367: am d422ade3: Merge "Fix the issue that the ime switch icon is remaining after closing VoiceInput" into jb-dev

* commit '5f745367':
  Fix the issue that the ime switch icon is remaining after closing VoiceInput
parents 6d648ac4 5f745367
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -402,7 +402,7 @@ public class InputMethodService extends AbstractInputMethodService {
            mShowInputFlags = 0;
            mShowInputFlags = 0;
            mShowInputRequested = false;
            mShowInputRequested = false;
            mShowInputForced = false;
            mShowInputForced = false;
            hideWindow();
            doHideWindow();
            if (resultReceiver != null) {
            if (resultReceiver != null) {
                resultReceiver.send(wasVis != isInputViewShown()
                resultReceiver.send(wasVis != isInputViewShown()
                        ? InputMethodManager.RESULT_HIDDEN
                        ? InputMethodManager.RESULT_HIDDEN
@@ -737,7 +737,7 @@ public class InputMethodService extends AbstractInputMethodService {
                        onDisplayCompletions(completions);
                        onDisplayCompletions(completions);
                    }
                    }
                } else {
                } else {
                    hideWindow();
                    doHideWindow();
                }
                }
            } else if (mCandidatesVisibility == View.VISIBLE) {
            } else if (mCandidatesVisibility == View.VISIBLE) {
                // If the candidates are currently visible, make sure the
                // If the candidates are currently visible, make sure the
@@ -745,7 +745,7 @@ public class InputMethodService extends AbstractInputMethodService {
                showWindow(false);
                showWindow(false);
            } else {
            } else {
                // Otherwise hide the window.
                // Otherwise hide the window.
                hideWindow();
                doHideWindow();
            }
            }
            // If user uses hard keyboard, IME button should always be shown.
            // If user uses hard keyboard, IME button should always be shown.
            boolean showing = onEvaluateInputViewShown();
            boolean showing = onEvaluateInputViewShown();
@@ -1096,7 +1096,7 @@ public class InputMethodService extends AbstractInputMethodService {
            if (shown) {
            if (shown) {
                showWindow(false);
                showWindow(false);
            } else {
            } else {
                hideWindow();
                doHideWindow();
            }
            }
        }
        }
    }
    }
@@ -1449,9 +1449,13 @@ public class InputMethodService extends AbstractInputMethodService {
        mCandidatesViewStarted = false;
        mCandidatesViewStarted = false;
    }
    }


    private void doHideWindow() {
        mImm.setImeWindowStatus(mToken, 0, mBackDisposition);
        hideWindow();
    }

    public void hideWindow() {
    public void hideWindow() {
        finishViews();
        finishViews();
        mImm.setImeWindowStatus(mToken, 0, mBackDisposition);
        if (mWindowVisible) {
        if (mWindowVisible) {
            mWindow.hide();
            mWindow.hide();
            mWindowVisible = false;
            mWindowVisible = false;
@@ -1703,7 +1707,7 @@ public class InputMethodService extends AbstractInputMethodService {
                // If we have the window visible for some other reason --
                // If we have the window visible for some other reason --
                // most likely to show candidates -- then just get rid
                // most likely to show candidates -- then just get rid
                // of it.  This really shouldn't happen, but just in case...
                // of it.  This really shouldn't happen, but just in case...
                if (doIt) hideWindow();
                if (doIt) doHideWindow();
            }
            }
            return true;
            return true;
        }
        }