am 2d9722e4: Update the theme pref key.

* commit '2d9722e46c774d51c834c3a8b11261a2a22e09d3':
  Update the theme pref key.
This commit is contained in:
Ken Wakasa 2011-09-16 06:08:37 -07:00 committed by Android Git Automerger
commit bc9c9995a0
2 changed files with 3 additions and 4 deletions

View file

@ -27,7 +27,7 @@
/>
<ListPreference
android:key="pref_keyboard_layout_20100902"
android:key="pref_keyboard_layout_20110916"
android:title="@string/keyboard_layout"
android:persistent="true"
android:entryValues="@array/keyboard_layout_modes_values"

View file

@ -49,7 +49,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private static final boolean DEBUG_CACHE = LatinImeLogger.sDBG;
public static final boolean DEBUG_STATE = false;
public static final String PREF_KEYBOARD_LAYOUT = "pref_keyboard_layout_20100902";
public static final String PREF_KEYBOARD_LAYOUT = "pref_keyboard_layout_20110916";
private static final int[] KEYBOARD_THEMES = {
R.style.KeyboardTheme,
R.style.KeyboardTheme_HighContrast,
@ -182,8 +182,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private static int getKeyboardThemeIndex(Context context, SharedPreferences prefs) {
final String defaultThemeId = context.getString(R.string.config_default_keyboard_theme_id);
final String themeId = Settings.ENABLE_EXPERIMENTAL_SETTINGS
? prefs.getString(PREF_KEYBOARD_LAYOUT, defaultThemeId) : defaultThemeId;
final String themeId = prefs.getString(PREF_KEYBOARD_LAYOUT, defaultThemeId);
try {
final int themeIndex = Integer.valueOf(themeId);
if (themeIndex >= 0 && themeIndex < KEYBOARD_THEMES.length)