diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2014-09-02 03:31:42 +0200 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-29 17:36:30 -0700 |
commit | 23ba4b7a4d7f852533c451e1cfbd9edca27477af (patch) | |
tree | 5759d3299b6b77d7b579ba42c4fe8f7b3bf86820 | |
parent | 838253ae18943a2a0c3f6b59a1b29cc2d6a18e72 (diff) | |
download | packages_apps_Settings-23ba4b7a4d7f852533c451e1cfbd9edca27477af.zip packages_apps_Settings-23ba4b7a4d7f852533c451e1cfbd9edca27477af.tar.gz packages_apps_Settings-23ba4b7a4d7f852533c451e1cfbd9edca27477af.tar.bz2 |
settings: check if ime switcher pref was remove previously
This could happend in tablet devices
JIRA: BUGDUMP-20712
https://jira.cyanogenmod.org/browse/BUGDUMP-20712
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Change-Id: I85c1d6e56f85e3220311aabc68d6532d6ffdf59f
-rw-r--r-- | src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java index b583d52..1d31874 100644 --- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java +++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java @@ -194,8 +194,10 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment boolean showCmImeSwitcher = getResources().getBoolean( com.android.internal.R.bool.config_show_cmIMESwitcher); if (!showCmImeSwitcher) { - getPreferenceScreen().removePreference( - findPreference(Settings.System.STATUS_BAR_IME_SWITCHER)); + Preference pref = findPreference(Settings.System.STATUS_BAR_IME_SWITCHER); + if (pref != null) { + getPreferenceScreen().removePreference(pref); + } } // Spell Checker |