Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 185ba407 authored by Brian Muramatsu's avatar Brian Muramatsu
Browse files

Fix NPE in DeviceInfoSettings

Bug 7192187

Change-Id: I6d404e5228c7f66e37137a27ebd555a88dda2f74
parent 8882ccdd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);
            }
        }
    }