From 6dd7778d220d464755d35d9769fd6d3b634ee204 Mon Sep 17 00:00:00 2001
From: satok <satok@google.com>
Date: Wed, 23 Mar 2011 12:59:58 -0700
Subject: [PATCH] Fix a bug that Voice IME is not triggered properly.

Background:
Both SubtypeSwitcher and VoiceConnector have an instance of VoiceInput.
And VoiceConnector has a responsivity for setting VoiceInput to SubtypeSwitcher.
But in case that VoiceInputConnector already has an instance of VoiceInput
VoiceInputConnector doesn't set VoiceInput to SubtypeSwitcher.

Change-Id: I42d0220e7d84a08e03f143213cc6eff87e7e79a6
---
 java/src/com/android/inputmethod/deprecated/VoiceConnector.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/src/com/android/inputmethod/deprecated/VoiceConnector.java b/java/src/com/android/inputmethod/deprecated/VoiceConnector.java
index a5c307c5b9..4ea2d1af49 100644
--- a/java/src/com/android/inputmethod/deprecated/VoiceConnector.java
+++ b/java/src/com/android/inputmethod/deprecated/VoiceConnector.java
@@ -793,8 +793,8 @@ public class VoiceConnector implements VoiceInput.UiListener {
         public void setVoiceInput(VoiceInput voiceInput, SubtypeSwitcher switcher) {
             if (mVoiceInput == null && voiceInput != null) {
                 mVoiceInput = voiceInput;
-                switcher.setVoiceInputConnector(this);
             }
+            switcher.setVoiceInputConnector(this);
         }
 
         private VoiceInputConnector() {
-- 
GitLab