From 67e08bb0fb922532d21e9a03c4e1627f62703935 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Sat, 15 Jan 2011 02:26:00 +0900 Subject: [PATCH] Invoke voice recognition certainly onStartInputView Bug: 3352347 Change-Id: I80763c0a48ebf1ecd23549d78269421ebb40d206 --- .../android/inputmethod/voice/VoiceIMEConnector.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java b/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java index d9528eb40..1ac4391f1 100644 --- a/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java +++ b/java/src/com/android/inputmethod/voice/VoiceIMEConnector.java @@ -630,9 +630,15 @@ public class VoiceIMEConnector implements VoiceInput.UiListener { public void onStartInputView(IBinder token) { // If IME is in voice mode, but still needs to show the voice warning dialog, // keep showing the warning. - if (mSubtypeSwitcher.isVoiceMode() && needsToShowWarningDialog() && token != null) { - showVoiceWarningDialog(false, token, false); + if (mSubtypeSwitcher.isVoiceMode() && token != null) { + if (needsToShowWarningDialog()) { + showVoiceWarningDialog(false, token, false); + } else { + startListening(false, token, false); + } } + // If we have no token, onAttachedToWindow will take care of showing dialog and start + // listening. } public void onAttachedToWindow() {