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

Commit 919e3113 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio Committed by The Android Automerger
Browse files

Fix bug #17624121 Settings crash while launching on wiped device

- check for non null reference returned by NfcAdapter.getDefaultAdapter(this)

Change-Id: I88776dbefd351ce1c77cfed6d14b8b2143294488
parent 05fccbe6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1177,7 +1177,8 @@ public class SettingsActivity extends Activity
                    } else {
                        // Only show if NFC is on and we have the HCE feature
                        NfcAdapter adapter = NfcAdapter.getDefaultAdapter(this);
                        if (!adapter.isEnabled() || !getPackageManager().hasSystemFeature(
                        if (adapter == null || !adapter.isEnabled() ||
                                !getPackageManager().hasSystemFeature(
                                        PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)) {
                            removeTile = true;
                        }