diff options
author | 2010-02-26 11:47:05 -0800 | |
---|---|---|
committer | 2010-02-26 11:47:05 -0800 | |
commit | 1ca22671191f5079a104bd7c73078561a5f48ef6 (patch) | |
tree | dc2bce8ff05a6d97e9afe7d0d1afc225fe8f7fbf /src/com/android/inputmethod/latin/KeyboardSwitcher.java | |
parent | 9468335a06d2b0e3ef15f4f57f8c1b0857b34ebe (diff) | |
download | latinime-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.java | 10 |
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 |