diff options
Diffstat (limited to 'src/com/android/settings/inputmethod')
-rw-r--r-- | src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java index 980450c..5ce6644 100644 --- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java +++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java @@ -62,6 +62,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment private static final String KEY_USER_DICTIONARY_SETTINGS = "key_user_dictionary_settings"; private static final String KEY_IME_SWITCHER = "status_bar_ime_switcher"; private static final String VOLUME_KEY_CURSOR_CONTROL = "volume_key_cursor_control"; + private static final String KEY_STYLUS_ICON_ENABLED = "stylus_icon_enabled"; // false: on ICS or later private static final boolean SHOW_INPUT_METHOD_SWITCHER_SETTINGS = false; @@ -73,6 +74,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment "auto_replace", "auto_caps", "auto_punctuate", }; + private CheckBoxPreference mStylusIconEnabled; private CheckBoxPreference mStatusBarImeSwitcher; private int mDefaultInputMethodSelectorVisibility = 0; private ListPreference mShowInputMethodSelectorPref; @@ -183,6 +185,8 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment } } + mStylusIconEnabled = (CheckBoxPreference) findPreference(KEY_STYLUS_ICON_ENABLED); + // Spell Checker final Intent intent = new Intent(Intent.ACTION_MAIN); intent.setClass(getActivity(), SpellCheckersSettingsActivity.class); @@ -284,6 +288,11 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment Settings.System.STATUS_BAR_IME_SWITCHER, 1) != 0); } + if (mStylusIconEnabled != null) { + mStylusIconEnabled.setChecked(Settings.System.getInt(getActivity().getContentResolver(), + Settings.System.STYLUS_ICON_ENABLED, 0) == 1); + } + // Hard keyboard if (!mHardKeyboardPreferenceList.isEmpty()) { for (int i = 0; i < sHardKeyboardKeys.length; ++i) { @@ -341,6 +350,9 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment Settings.System.putInt(getActivity().getContentResolver(), Settings.System.STATUS_BAR_IME_SWITCHER, mStatusBarImeSwitcher.isChecked() ? 1 : 0); return true; + } else if (preference == mStylusIconEnabled) { + Settings.System.putInt(getActivity().getContentResolver(), + Settings.System.STYLUS_ICON_ENABLED, mStylusIconEnabled.isChecked() ? 1 : 0); } else if (preference instanceof PreferenceScreen) { if (preference.getFragment() != null) { // Fragment will be handled correctly by the super class. |