diff options
-rw-r--r-- | src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java index 3b70708..62c2ec1 100644 --- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java +++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java @@ -39,7 +39,6 @@ import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceCategory; -import android.preference.PreferenceGroup; import android.preference.PreferenceScreen; import android.provider.Settings; import android.provider.Settings.System; @@ -194,10 +193,12 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment mStylusIconEnabled = (CheckBoxPreference) findPreference(KEY_STYLUS_ICON_ENABLED); // remove stylus preference for non stylus devices if (!getResources().getBoolean(com.android.internal.R.bool.config_stylusGestures)) { - PreferenceGroup pointerSettingsCategory = (PreferenceGroup) + PreferenceCategory pointerSettingsCategory = (PreferenceCategory) findPreference(KEY_POINTER_SETTINGS_CATEGORY); - pointerSettingsCategory.removePreference(mStylusGestures); - pointerSettingsCategory.removePreference(mStylusIconEnabled); + if (pointerSettingsCategory != null) { + pointerSettingsCategory.removePreference(mStylusGestures); + pointerSettingsCategory.removePreference(mStylusIconEnabled); + } } // Spell Checker |