aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/android/inputmethod/latin/KeyboardSwitcher.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2010-02-26 11:47:05 -0800
committerAmith Yamasani <yamasani@google.com>2010-02-26 11:47:05 -0800
commit1ca22671191f5079a104bd7c73078561a5f48ef6 (patch)
treedc2bce8ff05a6d97e9afe7d0d1afc225fe8f7fbf /src/com/android/inputmethod/latin/KeyboardSwitcher.java
parent9468335a06d2b0e3ef15f4f57f8c1b0857b34ebe (diff)
downloadlatinime-1ca22671191f5079a104bd7c73078561a5f48ef6.tar.gz
latinime-1ca22671191f5079a104bd7c73078561a5f48ef6.tar.xz
latinime-1ca22671191f5079a104bd7c73078561a5f48ef6.zip
Fix for microphone icon showing up incorrectly on the ?123 icon.
This also addresses the defaults for voice button on a wiped device. I think it also addresses mic button showing up when not expected by a specific text field that has the privateImeOptions of "nm". Bugs 2417842, 2242893
Diffstat (limited to 'src/com/android/inputmethod/latin/KeyboardSwitcher.java')
-rw-r--r--src/com/android/inputmethod/latin/KeyboardSwitcher.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/src/com/android/inputmethod/latin/KeyboardSwitcher.java
index 38979edde..4322997e8 100644
--- a/src/com/android/inputmethod/latin/KeyboardSwitcher.java
+++ b/src/com/android/inputmethod/latin/KeyboardSwitcher.java
@@ -178,12 +178,13 @@ public class KeyboardSwitcher {
mPreferSymbols);
}
- void setKeyboardMode(int mode, int imeOptions,
- boolean enableVoice, boolean isSymbols) {
+ void setKeyboardMode(int mode, int imeOptions, boolean enableVoice, boolean isSymbols) {
if (mInputView == null) return;
mMode = mode;
mImeOptions = imeOptions;
- mHasVoice = enableVoice;
+ if (enableVoice != mHasVoice) {
+ setVoiceMode(mHasVoice, mVoiceOnPrimary);
+ }
mIsSymbols = isSymbols;
mInputView.setPreviewEnabled(true);
@@ -211,7 +212,8 @@ public class KeyboardSwitcher {
conf.locale = mInputLocale;
orig.updateConfiguration(conf, null);
LatinKeyboard keyboard = new LatinKeyboard(
- mContext, id.mXml, id.mKeyboardMode, id.mHasVoice);
+ mContext, id.mXml, id.mKeyboardMode);
+ keyboard.setVoiceMode(hasVoiceButton(id.mXml == R.xml.kbd_symbols), mHasVoice);
keyboard.setLanguageSwitcher(mLanguageSwitcher);
if (id.mKeyboardMode == KEYBOARDMODE_NORMAL
|| id.mKeyboardMode == KEYBOARDMODE_URL