aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-01-17 19:27:39 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-01-17 19:27:39 +0900
commit8bec4aa912c193135bebacfc75dc15f06c5dce6e (patch)
treefd2c914ef1570b09b198ac56d3c502355e0c289a /java/src
parentdc64b138b5e3fb3706c0818d0a308fe6e36985b0 (diff)
downloadlatinime-8bec4aa912c193135bebacfc75dc15f06c5dce6e.tar.gz
latinime-8bec4aa912c193135bebacfc75dc15f06c5dce6e.tar.xz
latinime-8bec4aa912c193135bebacfc75dc15f06c5dce6e.zip
Fix voice key enable status has not been reflected to keyboard id
Bug: 3355428 Change-Id: Id4e572357a7b5603e9a609b7e80b81d8e2c500f6
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 25ef847cd..42af8a8d6 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -174,12 +174,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private void loadKeyboardInternal(int mode, int imeOptions, boolean voiceButtonEnabled,
boolean voiceButtonOnPrimary, boolean isSymbols) {
if (mInputView == null) return;
- final Keyboard oldKeyboard = mInputView.getKeyboard();
- final KeyboardId id = getKeyboardId(mode, imeOptions, isSymbols);
- if (oldKeyboard != null && oldKeyboard.mId.equals(id))
- return;
-
- mInputView.setPreviewEnabled(mInputMethodService.getPopupOn());
mMode = mode;
mImeOptions = imeOptions;
@@ -188,9 +182,15 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
mIsSymbols = isSymbols;
// Update the settings key state because number of enabled IMEs could have been changed
mHasSettingsKey = getSettingsKeyMode(mPrefs, mInputMethodService);
- makeSymbolsKeyboardIds();
+ final KeyboardId id = getKeyboardId(mode, imeOptions, isSymbols);
+ final Keyboard oldKeyboard = mInputView.getKeyboard();
+ if (oldKeyboard != null && oldKeyboard.mId.equals(id))
+ return;
+
+ makeSymbolsKeyboardIds();
mCurrentId = id;
+ mInputView.setPreviewEnabled(mInputMethodService.getPopupOn());
mInputView.setKeyboard(getKeyboard(id));
}