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

Commit a13aeb24 authored by Brad Lassey's avatar Brad Lassey Committed by Android (Google) Code Review
Browse files

Merge "Test for delivery of polling loop fingerprints to the default payment...

Merge "Test for delivery of polling loop fingerprints to the default payment provider and foreground service." into main
parents e7e2e869 3ea82ea3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -97,4 +97,6 @@ interface INfcAdapter
    WlcLDeviceInfo getWlcLDeviceInfo();

    void updateDiscoveryTechnology(IBinder b, int pollFlags, int listenFlags);

    void notifyPollingLoop(in Bundle frame);
}
+34 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UserIdInt;
import android.app.Activity;
import android.app.PendingIntent;
@@ -2752,6 +2753,38 @@ public final class NfcAdapter {
        }
    }

   /**
     * Notifies the system of a new polling loop.
     *
     * @param frame is the new frame.
     *
     * @hide
     */
    @TestApi
    @FlaggedApi(Flags.FLAG_NFC_READ_POLLING_LOOP)
    public void notifyPollingLoop(@NonNull Bundle frame) {
        try {
            if (sService == null) {
                attemptDeadServiceRecovery(null);
            }
            sService.notifyPollingLoop(frame);
        } catch (RemoteException e) {
            attemptDeadServiceRecovery(e);
            // Try one more time
            if (sService == null) {
                Log.e(TAG, "Failed to recover NFC Service.");
                return;
            }
            try {
                sService.notifyPollingLoop(frame);
            } catch (RemoteException ee) {
                Log.e(TAG, "Failed to recover NFC Service.");
            }
        }
    }



    /**
     * Sets NFC charging feature.
     * <p>This API is for the Settings application.
@@ -2767,6 +2800,7 @@ public final class NfcAdapter {
        }
        try {
            return sService.enableWlc(enable);

        } catch (RemoteException e) {
            attemptDeadServiceRecovery(e);
            // Try one more time