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

Commit 56a3e674 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Add hidden API to disable NFC (optional persist).

Bug: 17298769
Change-Id: I1fa59592a34f1207731dc75d2e548b3e614d94f5
parent 47e3124d
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()}.