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

Commit 63b7360e authored by Nick Pelly's avatar Nick Pelly Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE on devices that don't have NFC." into ics-mr1

parents 1733a3de a5193b24
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -360,6 +360,10 @@ public final class NfcAdapter {
        /* use getSystemService() instead of just instantiating to take
         * advantage of the context's cached NfcManager & NfcAdapter */
        NfcManager manager = (NfcManager) context.getSystemService(Context.NFC_SERVICE);
        if (manager == null) {
            // NFC not available
            return null;
        }
        return manager.getDefaultAdapter();
    }