am 2d9722e4
: Update the theme pref key.
* commit '2d9722e46c774d51c834c3a8b11261a2a22e09d3': Update the theme pref key.
This commit is contained in:
commit
bc9c9995a0
2 changed files with 3 additions and 4 deletions
|
@ -27,7 +27,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:key="pref_keyboard_layout_20100902"
|
android:key="pref_keyboard_layout_20110916"
|
||||||
android:title="@string/keyboard_layout"
|
android:title="@string/keyboard_layout"
|
||||||
android:persistent="true"
|
android:persistent="true"
|
||||||
android:entryValues="@array/keyboard_layout_modes_values"
|
android:entryValues="@array/keyboard_layout_modes_values"
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||||
private static final boolean DEBUG_CACHE = LatinImeLogger.sDBG;
|
private static final boolean DEBUG_CACHE = LatinImeLogger.sDBG;
|
||||||
public static final boolean DEBUG_STATE = false;
|
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 = {
|
private static final int[] KEYBOARD_THEMES = {
|
||||||
R.style.KeyboardTheme,
|
R.style.KeyboardTheme,
|
||||||
R.style.KeyboardTheme_HighContrast,
|
R.style.KeyboardTheme_HighContrast,
|
||||||
|
@ -182,8 +182,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||||
|
|
||||||
private static int getKeyboardThemeIndex(Context context, SharedPreferences prefs) {
|
private static int getKeyboardThemeIndex(Context context, SharedPreferences prefs) {
|
||||||
final String defaultThemeId = context.getString(R.string.config_default_keyboard_theme_id);
|
final String defaultThemeId = context.getString(R.string.config_default_keyboard_theme_id);
|
||||||
final String themeId = Settings.ENABLE_EXPERIMENTAL_SETTINGS
|
final String themeId = prefs.getString(PREF_KEYBOARD_LAYOUT, defaultThemeId);
|
||||||
? prefs.getString(PREF_KEYBOARD_LAYOUT, defaultThemeId) : defaultThemeId;
|
|
||||||
try {
|
try {
|
||||||
final int themeIndex = Integer.valueOf(themeId);
|
final int themeIndex = Integer.valueOf(themeId);
|
||||||
if (themeIndex >= 0 && themeIndex < KEYBOARD_THEMES.length)
|
if (themeIndex >= 0 && themeIndex < KEYBOARD_THEMES.length)
|
||||||
|
|
Loading…
Reference in a new issue