summaryrefslogtreecommitdiffstats
path: root/nfc-extras
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2011-06-17 10:56:39 -0700
committerNick Pelly <npelly@google.com>2011-06-17 14:51:40 -0700
commit17523abb45b7f77f35af53e895d74be13f2314e0 (patch)
tree753810ad4e10523fbe3c8664f5241d9b2644395f /nfc-extras
parentd76baeb4d836c33cc68cbb0c2e237c066f368529 (diff)
downloadframeworks_base-17523abb45b7f77f35af53e895d74be13f2314e0.zip
frameworks_base-17523abb45b7f77f35af53e895d74be13f2314e0.tar.gz
frameworks_base-17523abb45b7f77f35af53e895d74be13f2314e0.tar.bz2
NFC Adapter Extras API update.
Remove o registerTearDownApdus() o deregisterTearDownApdus() They were already NO-OPS, and don't work in the general case. Add o authenticate(byte[] token) This future proofs us for a more flexible access control scheme. Change-Id: I4cb67ceeb63d61cbc333c9b244a96d8687402168
Diffstat (limited to 'nfc-extras')
-rw-r--r--nfc-extras/java/com/android/nfc_extras/NfcAdapterExtras.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/nfc-extras/java/com/android/nfc_extras/NfcAdapterExtras.java b/nfc-extras/java/com/android/nfc_extras/NfcAdapterExtras.java
index 6001be9..e0c38b1 100644
--- a/nfc-extras/java/com/android/nfc_extras/NfcAdapterExtras.java
+++ b/nfc-extras/java/com/android/nfc_extras/NfcAdapterExtras.java
@@ -18,7 +18,6 @@ package com.android.nfc_extras;
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;
@@ -208,17 +207,18 @@ public final class NfcAdapterExtras {
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);
}