From 255831206bf7284d344e3cc3c7a3f7613153f2c8 Mon Sep 17 00:00:00 2001 From: satok Date: Thu, 13 Jan 2011 19:58:54 +0900 Subject: [PATCH] Do not triggerVoiceIME at changing subtype if IME is not shown. Bug: 3325103 Change-Id: I5474553f0b55f286f573af80134e8ef1eeb39354 --- java/src/com/android/inputmethod/latin/LatinIME.java | 5 ----- java/src/com/android/inputmethod/latin/SubtypeSwitcher.java | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index addc6c782..5e701c1f0 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -25,9 +25,6 @@ import com.android.inputmethod.keyboard.LatinKeyboardView; import com.android.inputmethod.latin.Utils.RingCharBuffer; import com.android.inputmethod.voice.VoiceIMEConnector; -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlPullParserException; - import android.app.AlertDialog; import android.content.BroadcastReceiver; import android.content.Context; @@ -37,7 +34,6 @@ import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; -import android.content.res.XmlResourceParser; import android.inputmethodservice.InputMethodService; import android.media.AudioManager; import android.os.Debug; @@ -74,7 +70,6 @@ import android.widget.HorizontalScrollView; import android.widget.LinearLayout; import java.io.FileDescriptor; -import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index d696834e9..e1852b2ad 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -16,7 +16,6 @@ package com.android.inputmethod.latin; -import com.android.inputmethod.keyboard.Keyboard; import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.voice.SettingsUtil; import com.android.inputmethod.voice.VoiceIMEConnector; @@ -433,6 +432,7 @@ public class SubtypeSwitcher { } private void triggerVoiceIME() { + if (!mService.isInputViewShown()) return; VoiceIMEConnector.getInstance().startListening(false, KeyboardSwitcher.getInstance().getInputView().getWindowToken(), false); }