diff options
author | Takazumi Matsumoto <tdr@taksmon.com> | 2014-11-28 18:39:48 -0500 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-29 17:36:30 -0700 |
commit | cf472a9b4491c95a03bbac2613c3bdacf8e5a033 (patch) | |
tree | 2864d782eb5903dc9047d470d596f65d44bde5d6 | |
parent | e65f2833df18e755c847bc86376253a4b96e73f9 (diff) | |
download | packages_apps_Settings-cf472a9b4491c95a03bbac2613c3bdacf8e5a033.zip packages_apps_Settings-cf472a9b4491c95a03bbac2613c3bdacf8e5a033.tar.gz packages_apps_Settings-cf472a9b4491c95a03bbac2613c3bdacf8e5a033.tar.bz2 |
settings: port IME selector notification toggle (1/2)
Change-Id: Idb29f94aa4be51166b24b59930428401ddd7416b
-rw-r--r-- | res/values/cm_strings.xml | 4 | ||||
-rw-r--r-- | res/xml/language_settings.xml | 6 | ||||
-rw-r--r-- | src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java | 8 |
3 files changed, 18 insertions, 0 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index 1f893b2..f5b1e84 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -502,4 +502,8 @@ <string name="live_display_low_power_summary">Adjust display for lowest power consumption without degradation</string> <string name="live_display_enhance_color_title">Enhance colors</string> <string name="live_display_enhance_color_summary">Improve color vibrance of flesh tones, scenery, and other images</string> + + <!-- Whether to display IME switcher notifcation --> + <string name="ime_switcher_notify">Selector notification</string> + <string name="ime_switcher_notify_summary">Display input method selector notification</string> </resources> diff --git a/res/xml/language_settings.xml b/res/xml/language_settings.xml index ab2b000..f328255 100644 --- a/res/xml/language_settings.xml +++ b/res/xml/language_settings.xml @@ -59,6 +59,12 @@ with low order values to set the key map of each attached keyboard. --> </PreferenceCategory> + <com.android.settings.cyanogenmod.SystemSettingSwitchPreference + android:key="status_bar_ime_switcher" + android:title="@string/ime_switcher_notify" + android:summary="@string/ime_switcher_notify_summary" + android:defaultValue="true" /> + <PreferenceCategory android:key="voice_category" android:title="@string/voice_category" > diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java index 7d39fa1..6badffc 100644 --- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java +++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java @@ -168,6 +168,14 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment mIm = (InputManager)activity.getSystemService(Context.INPUT_SERVICE); updateInputDevices(); + // Enable or disable mStatusBarImeSwitcher based on boolean: config_show_cmIMESwitcher + boolean showCmImeSwitcher = getResources().getBoolean( + com.android.internal.R.bool.config_show_cmIMESwitcher); + if (!showCmImeSwitcher) { + getPreferenceScreen().removePreference( + findPreference(Settings.System.STATUS_BAR_IME_SWITCHER)); + } + // Spell Checker final Preference spellChecker = findPreference(KEY_SPELL_CHECKERS); if (spellChecker != null) { |