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

Commit 3ea82ea3 authored by Brad Lassey's avatar Brad Lassey
Browse files

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

Test for delivery of polling loop fingerprints to the default payment provider and foreground service.

Test: Ran these tests locally
Bug: b/304831696
Change-Id: Ib19b9038915a2be9c26f6e07e2d2ee65801461d1
parent fdbabfc4
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