am d6ce8d98: am 257b2a58: Merge "Hide recognition view when switchToLastInputMethod failed." into honeycomb

* commit 'd6ce8d98427f221ccb4379b7c96e649fdf419acc':
  Hide recognition view when switchToLastInputMethod failed.
main
satok 2011-01-25 19:27:30 -08:00 committed by Android Git Automerger
commit 04c10734d0
1 changed files with 12 additions and 2 deletions

View File

@ -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) {