From 255831206bf7284d344e3cc3c7a3f7613153f2c8 Mon Sep 17 00:00:00 2001 From: satok Date: Thu, 13 Jan 2011 19:58:54 +0900 Subject: [PATCH 1/4] 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); } From 0f901aab365093f690a0e40b12083d8cb66f7b24 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 13 Jan 2011 13:43:39 +0900 Subject: [PATCH 2/4] Support "nm" (no mic) privateImeOptions Bug: 3331635 Change-Id: Ide160b9317c8f7d966f879dd460640fc4f894e9b --- java/res/xml-xlarge/kbd_number.xml | 12 +++++++++--- java/res/xml-xlarge/kbd_phone.xml | 12 +++++++++--- java/res/xml-xlarge/kbd_phone_symbols.xml | 12 +++++++++--- java/res/xml-xlarge/kbd_qwerty_row4.xml | 10 ++++++++-- java/res/xml-xlarge/kbd_symbols.xml | 10 ++++++++-- java/res/xml-xlarge/kbd_symbols_shift.xml | 10 ++++++++-- java/src/com/android/inputmethod/latin/LatinIME.java | 5 ----- 7 files changed, 51 insertions(+), 20 deletions(-) diff --git a/java/res/xml-xlarge/kbd_number.xml b/java/res/xml-xlarge/kbd_number.xml index 93bc1363a..c2cbb31c4 100644 --- a/java/res/xml-xlarge/kbd_number.xml +++ b/java/res/xml-xlarge/kbd_number.xml @@ -132,9 +132,15 @@ latin:keyLabel="0" /> - + + + + + diff --git a/java/res/xml-xlarge/kbd_phone.xml b/java/res/xml-xlarge/kbd_phone.xml index 45c298362..c320ebbbc 100644 --- a/java/res/xml-xlarge/kbd_phone.xml +++ b/java/res/xml-xlarge/kbd_phone.xml @@ -140,9 +140,15 @@ latin:keyStyle="num0KeyStyle" /> - + + + + + diff --git a/java/res/xml-xlarge/kbd_phone_symbols.xml b/java/res/xml-xlarge/kbd_phone_symbols.xml index 891ceacbe..da15b5ad0 100644 --- a/java/res/xml-xlarge/kbd_phone_symbols.xml +++ b/java/res/xml-xlarge/kbd_phone_symbols.xml @@ -152,9 +152,15 @@ latin:keyStyle="num0KeyStyle" /> - + + + + + diff --git a/java/res/xml-xlarge/kbd_qwerty_row4.xml b/java/res/xml-xlarge/kbd_qwerty_row4.xml index e222a6bb0..98acfc162 100644 --- a/java/res/xml-xlarge/kbd_qwerty_row4.xml +++ b/java/res/xml-xlarge/kbd_qwerty_row4.xml @@ -114,7 +114,13 @@ latin:popupCharacters="_" /> - + + + + + diff --git a/java/res/xml-xlarge/kbd_symbols.xml b/java/res/xml-xlarge/kbd_symbols.xml index 50b8e5307..d804f7909 100644 --- a/java/res/xml-xlarge/kbd_symbols.xml +++ b/java/res/xml-xlarge/kbd_symbols.xml @@ -162,7 +162,13 @@ latin:popupCharacters="“,”,«,»,˝" /> - + + + + + diff --git a/java/res/xml-xlarge/kbd_symbols_shift.xml b/java/res/xml-xlarge/kbd_symbols_shift.xml index f586b1a28..db33aaaca 100644 --- a/java/res/xml-xlarge/kbd_symbols_shift.xml +++ b/java/res/xml-xlarge/kbd_symbols_shift.xml @@ -139,7 +139,13 @@ - + + + + + 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; From 543334cc213e80110bcbeed42a1bbe7f2cc409fa Mon Sep 17 00:00:00 2001 From: satok Date: Thu, 13 Jan 2011 21:26:12 +0900 Subject: [PATCH 3/4] Fix descriptions for strings. Bug: 2876541 Bug: 2988169 Change-Id: I80130aa258e38f638b226448ba53a7efaeb6c3d7 --- java/res/values/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 6d05012e6..22040d591 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -186,7 +186,7 @@ Voice input is disabled - + Select input method @@ -204,12 +204,12 @@ Enable user feedback Help improve this input method editor by automatically sending usage statistics and crash reports to Google. - + Touch to correct words - + Touch entered words to correct them, only when suggestions are visible - + Keyboard Theme From 96680f28e8e647307f0222500a59eb31ff463236 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Fri, 14 Jan 2011 14:46:55 +0900 Subject: [PATCH 4/4] Use integer value instead of symbolic name for os version Change-Id: I1574915ededf5d47d245a3f09692ebbbfe37e4c6 --- java/src/com/android/inputmethod/latin/Settings.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java index 4a8b34ce4..8efeeda35 100644 --- a/java/src/com/android/inputmethod/latin/Settings.java +++ b/java/src/com/android/inputmethod/latin/Settings.java @@ -181,7 +181,8 @@ public class Settings extends PreferenceActivity public boolean onPreferenceClick(Preference pref) { if (pref == mInputLanguageSelection) { final String action; - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) { + if (android.os.Build.VERSION.SDK_INT + >= /* android.os.Build.VERSION_CODES.HONEYCOMB */ 10) { action = "android.settings.INPUT_METHOD_AND_SUBTYPE_ENABLER"; } else { action = "com.android.inputmethod.latin.INPUT_LANGUAGE_SELECTION";