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

Commit 0a094c61 authored by Martijn Coenen's avatar Martijn Coenen Committed by Android (Google) Code Review
Browse files

Merge "Add hidden API to disable NFC (optional persist)." into lmp-dev

parents 3cedef53 56a3e674
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -701,6 +701,20 @@ public final class NfcAdapter {
        }
    }

    /**
     * Disable NFC hardware.
     * @hide
    */
    @SystemApi
    public boolean disable(boolean persist) {
        try {
            return sService.disable(persist);
        } catch (RemoteException e) {
            attemptDeadServiceRecovery(e);
            return false;
        }
    }

    /**
     * Pauses polling for a {@code timeoutInMs} millis. If polling must be resumed before timeout,
     * use {@link #resumePolling()}.