diff options
| author | satok <satok@google.com> | 2012-05-09 10:04:06 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-09 10:04:06 -0700 |
| commit | d422ade3d5e4993e90d63c926ca0452fe2dd8bc0 (patch) | |
| tree | c3807f186138709a30ac0752fc303a11d5bf598b /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | 2c21449357f8e53e578ec8835ddfeeee0368814b (diff) | |
| parent | 2f913d951c481edccbefa4d321a76f28740b48d7 (diff) | |
| download | frameworks_base-d422ade3d5e4993e90d63c926ca0452fe2dd8bc0.zip frameworks_base-d422ade3d5e4993e90d63c926ca0452fe2dd8bc0.tar.gz frameworks_base-d422ade3d5e4993e90d63c926ca0452fe2dd8bc0.tar.bz2 | |
Merge "Fix the issue that the ime switch icon is remaining after closing VoiceInput" into jb-dev
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 332f40a..33dea6c 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -402,7 +402,7 @@ public class InputMethodService extends AbstractInputMethodService { mShowInputFlags = 0; mShowInputRequested = false; mShowInputForced = false; - hideWindow(); + doHideWindow(); if (resultReceiver != null) { resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_HIDDEN @@ -737,7 +737,7 @@ public class InputMethodService extends AbstractInputMethodService { onDisplayCompletions(completions); } } else { - hideWindow(); + doHideWindow(); } } else if (mCandidatesVisibility == View.VISIBLE) { // If the candidates are currently visible, make sure the @@ -745,7 +745,7 @@ public class InputMethodService extends AbstractInputMethodService { showWindow(false); } else { // Otherwise hide the window. - hideWindow(); + doHideWindow(); } // If user uses hard keyboard, IME button should always be shown. boolean showing = onEvaluateInputViewShown(); @@ -1096,7 +1096,7 @@ public class InputMethodService extends AbstractInputMethodService { if (shown) { showWindow(false); } else { - hideWindow(); + doHideWindow(); } } } @@ -1449,9 +1449,13 @@ public class InputMethodService extends AbstractInputMethodService { mCandidatesViewStarted = false; } + private void doHideWindow() { + mImm.setImeWindowStatus(mToken, 0, mBackDisposition); + hideWindow(); + } + public void hideWindow() { finishViews(); - mImm.setImeWindowStatus(mToken, 0, mBackDisposition); if (mWindowVisible) { mWindow.hide(); mWindowVisible = false; @@ -1703,7 +1707,7 @@ public class InputMethodService extends AbstractInputMethodService { // If we have the window visible for some other reason -- // most likely to show candidates -- then just get rid // of it. This really shouldn't happen, but just in case... - if (doIt) hideWindow(); + if (doIt) doHideWindow(); } return true; } |
