Loading core/java/android/nfc/NfcAdapter.java +4 −0 Original line number Diff line number Diff line Loading @@ -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(); } Loading Loading
core/java/android/nfc/NfcAdapter.java +4 −0 Original line number Diff line number Diff line Loading @@ -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(); } Loading