am 185ba407
: Fix NPE in DeviceInfoSettings
* commit '185ba407bab02c1442d02b82800f0220779ecb10': Fix NPE in DeviceInfoSettings
This commit is contained in:
@@ -175,7 +175,10 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
|
|||||||
|
|
||||||
private void removePreferenceIfBoolFalse(String preference, int resId) {
|
private void removePreferenceIfBoolFalse(String preference, int resId) {
|
||||||
if (!getResources().getBoolean(resId)) {
|
if (!getResources().getBoolean(resId)) {
|
||||||
getPreferenceScreen().removePreference(findPreference(preference));
|
Preference pref = findPreference(preference);
|
||||||
|
if (pref != null) {
|
||||||
|
getPreferenceScreen().removePreference(pref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user