diff options
author | 2011-01-25 19:27:30 -0800 | |
---|---|---|
committer | 2011-01-25 19:27:30 -0800 | |
commit | 04c10734d02f29bb30b56a0ec0a3342297d7320b (patch) | |
tree | 361e2635778c04a157f5dfd2151fce7d49bfb13e /java | |
parent | 14e1367f6db7ec8162520968609112031d439bad (diff) | |
parent | d6ce8d98427f221ccb4379b7c96e649fdf419acc (diff) | |
download | latinime-04c10734d02f29bb30b56a0ec0a3342297d7320b.tar.gz latinime-04c10734d02f29bb30b56a0ec0a3342297d7320b.tar.xz latinime-04c10734d02f29bb30b56a0ec0a3342297d7320b.zip |
am d6ce8d98: am 257b2a58: Merge "Hide recognition view when switchToLastInputMethod failed." into honeycomb
* commit 'd6ce8d98427f221ccb4379b7c96e649fdf419acc':
Hide recognition view when switchToLastInputMethod failed.
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/android/inputmethod/voice/VoiceIMEConnector.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java b/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java index a3a3ea88e..a30570aa2 100644 --- a/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java +++ b/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java @@ -564,8 +564,18 @@ public class VoiceIMEConnector implements VoiceInput.UiListener { } private void switchToLastInputMethod() { - IBinder token = mService.getWindow().getWindow().getAttributes().token; - mImm.switchToLastInputMethod(token); + final IBinder token = mService.getWindow().getWindow().getAttributes().token; + new Thread ("switchToLastInputMethod") { + @Override + public void run() { + if (!mImm.switchToLastInputMethod(token)) { + // Needs to reset here because LatinIME failed to back to any IME and + // the same voice subtype will be triggered in the next time. + mVoiceInput.reset(); + mService.requestHideSelf(0); + } + } + }.start(); } private void reallyStartListening(boolean swipe) { |