Hide recognition view when switchToLastInputMethod failed.
Change-Id: Ie5f3d267e1042b4379b51c2dc6c8756e394cfc0f
This commit is contained in:
parent
099b4dc6ec
commit
760884e027
1 changed files with 12 additions and 2 deletions
|
@ -564,8 +564,18 @@ public class VoiceIMEConnector implements VoiceInput.UiListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void switchToLastInputMethod() {
|
private void switchToLastInputMethod() {
|
||||||
IBinder token = mService.getWindow().getWindow().getAttributes().token;
|
final IBinder token = mService.getWindow().getWindow().getAttributes().token;
|
||||||
mImm.switchToLastInputMethod(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) {
|
private void reallyStartListening(boolean swipe) {
|
||||||
|
|
Loading…
Reference in a new issue