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

Commit aadceeb1 authored by Alisher Alikhodjaev's avatar Alisher Alikhodjaev Committed by Android (Google) Code Review
Browse files

Merge "Nfc adapter randomly returns null on devices having Nfc" into rvc-qpr-dev

parents 5290b8d5 23abf11a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -677,6 +677,12 @@ public final class NfcAdapter {
            throw new IllegalArgumentException(
                    "context not associated with any application (using a mock context?)");
        }

        if (getServiceInterface() == null) {
            // NFC is not available
            return null;
        }

        /* use getSystemService() for consistency */
        NfcManager manager = (NfcManager) context.getSystemService(Context.NFC_SERVICE);
        if (manager == null) {