diff options
| author | Ken Wakasa <kwakasa@google.com> | 2014-05-09 11:28:19 +0000 |
|---|---|---|
| committer | Ken Wakasa <kwakasa@google.com> | 2014-05-09 11:28:19 +0000 |
| commit | d47dca429e74b47cfbf4200dd23c8f5a1e5791ec (patch) | |
| tree | e8b0e730da7a0d46cd21fe62ea23cd499a310a17 /java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | |
| parent | 19688b584bb903192559196a0e3836bc4c957696 (diff) | |
Revert "Refactor KeyboardTheme"
This reverts commit 19688b584bb903192559196a0e3836bc4c957696.
Build breakage.
Change-Id: I95d4be1578824eaee5a2fb08ec277250727ac668
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 4a46a4a46..1cd6ef249 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -64,7 +64,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { * what user actually typed. */ private boolean mIsAutoCorrectionActive; - private KeyboardTheme mKeyboardTheme; + private KeyboardTheme mKeyboardTheme = KeyboardTheme.getDefaultKeyboardTheme(); private Context mThemeContext; private static final KeyboardSwitcher sInstance = new KeyboardSwitcher(); @@ -101,7 +101,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { private boolean updateKeyboardThemeAndContextThemeWrapper(final Context context, final KeyboardTheme keyboardTheme) { - if (mThemeContext == null || !keyboardTheme.equals(mKeyboardTheme)) { + if (mThemeContext == null || mKeyboardTheme.mThemeId != keyboardTheme.mThemeId) { mKeyboardTheme = keyboardTheme; mThemeContext = new ContextThemeWrapper(context, keyboardTheme.mStyleId); KeyboardLayoutSet.clearKeyboardCache(); @@ -342,8 +342,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { mKeyboardView.closing(); } - updateKeyboardThemeAndContextThemeWrapper( - mLatinIME, KeyboardTheme.getKeyboardTheme(mPrefs)); + updateKeyboardThemeAndContextThemeWrapper(mLatinIME, mKeyboardTheme); mCurrentInputView = (InputView)LayoutInflater.from(mThemeContext).inflate( R.layout.input_view, null); mMainKeyboardFrame = mCurrentInputView.findViewById(R.id.main_keyboard_frame); |
