diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java index 258ea6417f9..eb9e918e9a9 100644 --- a/src/com/android/settings/DeviceInfoSettings.java +++ b/src/com/android/settings/DeviceInfoSettings.java @@ -175,7 +175,10 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment { private void removePreferenceIfBoolFalse(String preference, int resId) { if (!getResources().getBoolean(resId)) { - getPreferenceScreen().removePreference(findPreference(preference)); + Preference pref = findPreference(preference); + if (pref != null) { + getPreferenceScreen().removePreference(pref); + } } }