diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index c2e31ee1e..c1c105e8d 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -125,7 +125,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } private void setContextThemeWrapper(Context context, KeyboardTheme keyboardTheme) { - if (mKeyboardTheme.mThemeId != keyboardTheme.mThemeId) { + if (mThemeContext == null || mKeyboardTheme.mThemeId != keyboardTheme.mThemeId) { mKeyboardTheme = keyboardTheme; mThemeContext = new ContextThemeWrapper(context, keyboardTheme.mStyleId); KeyboardLayoutSet.clearKeyboardCache();