Merge "Import new drawable assets" into honeycomb
diff --git a/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java b/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java
index a3a3ea8..a30570a 100644
--- a/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java
+++ b/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java
@@ -564,8 +564,18 @@
}
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) {