aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/KeyboardSwitcher.java')
-rw-r--r--java/src/com/android/inputmethod/latin/KeyboardSwitcher.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
index 3eb135ebe..948fe5aa6 100644
--- a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
@@ -197,8 +197,14 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
void setKeyboardMode(int mode, int imeOptions, boolean enableVoice) {
mSymbolsModeState = SYMBOLS_MODE_STATE_NONE;
mPreferSymbols = mode == MODE_SYMBOLS;
- setKeyboardMode(mode == MODE_SYMBOLS ? MODE_TEXT : mode, imeOptions, enableVoice,
- mPreferSymbols);
+ if (mode == MODE_SYMBOLS) {
+ mode = MODE_TEXT;
+ }
+ try {
+ setKeyboardMode(mode, imeOptions, enableVoice, mPreferSymbols);
+ } catch (RuntimeException e) {
+ LatinImeLogger.logOnException(mode + "," + imeOptions + "," + mPreferSymbols, e);
+ }
}
void setKeyboardMode(int mode, int imeOptions, boolean enableVoice, boolean isSymbols) {
@@ -213,11 +219,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
mInputView.setPreviewEnabled(true);
KeyboardId id = getKeyboardId(mode, imeOptions, isSymbols);
LatinKeyboard keyboard = null;
- try {
- keyboard = getKeyboard(id);
- } catch (RuntimeException e) {
- LatinImeLogger.logOnException(mode + "," + imeOptions + "," + isSymbols, e);
- }
+ keyboard = getKeyboard(id);
if (mode == MODE_PHONE) {
mInputView.setPhoneKeyboard(keyboard);