package android.nfc;
-import android.nfc.ApduList;
import android.os.Bundle;
Bundle transceive(in byte[] data_in);
int getCardEmulationRoute();
void setCardEmulationRoute(int route);
- void registerTearDownApdus(String packageName, in ApduList apdu);
- void unregisterTearDownApdus(String packageName);
+ void authenticate(in byte[] token);
}
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
-import android.nfc.ApduList;
import android.nfc.INfcAdapterExtras;
import android.nfc.NfcAdapter;
import android.os.RemoteException;
return sEmbeddedEe;
}
- public void registerTearDownApdus(String packageName, ApduList apdus) {
- try {
- sService.registerTearDownApdus(packageName, apdus);
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- }
- }
-
- public void unregisterTearDownApdus(String packageName) {
+ /**
+ * Authenticate the client application.
+ *
+ * Some implementations of NFC Adapter Extras may require applications
+ * to authenticate with a token, before using other methods.
+ *
+ * @param a implementation specific token
+ * @throws a {@link java.lang.SecurityException} if authentication failed
+ */
+ public void authenticate(byte[] token) {
try {
- sService.unregisterTearDownApdus(packageName);
+ sService.authenticate(token);
} catch (RemoteException e) {
attemptDeadServiceRecovery(e);
}