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

Commit f955d057 authored by Nick Pelly's avatar Nick Pelly Committed by Android Git Automerger
Browse files

am c6a0277b: am 63b7360e: Merge "Fix NPE on devices that don\'t have NFC." into ics-mr1

* commit 'c6a0277b':
  Fix NPE on devices that don't have NFC.
parents 85a80ba8 c6a0277b
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();
    }