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

Commit 5f308bb7 authored by Andres Morales's avatar Andres Morales Committed by Android Git Automerger
Browse files

am 1d436165: Merge "Add hidden API for pausing and resuming NFC polling." into lmp-dev

* commit '1d4361657a3478c77d6a71c248a007d04f8106e6':
  Add hidden API for pausing and resuming NFC polling.
parents e9e8d8eb bd9d6647
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ interface INfcAdapter
    boolean enableNdefPush();
    boolean disableNdefPush();
    boolean isNdefPushEnabled();
    void pausePolling(int timeoutInMs);
    void resumePolling();

    void setForegroundDispatch(in PendingIntent intent,
            in IntentFilter[] filters, in TechListParcel techLists);
+27 −0
Original line number Diff line number Diff line
@@ -701,6 +701,33 @@ public final class NfcAdapter {
        }
    }

    /**
     * Pauses polling for a {@code timeoutInMs} millis. If polling must be resumed before timeout,
     * use {@link #resumePolling()}.
     * @hide
     */
    public void pausePolling(int timeoutInMs) {
        try {
            sService.pausePolling(timeoutInMs);
        } catch (RemoteException e) {
            attemptDeadServiceRecovery(e);
        }
    }

    /**
     * Resumes default polling for the current device state if polling is paused. Calling
     * this while polling is not paused is a no-op.
     *
     * @hide
     */
    public void resumePolling() {
        try {
            sService.resumePolling();
        } catch (RemoteException e) {
            attemptDeadServiceRecovery(e);
        }
    }

    /**
     * Set one or more {@link Uri}s to send using Android Beam (TM). Every
     * Uri you provide must have either scheme 'file' or scheme 'content'.