diff options
author | Jeff Hamilton <jham@android.com> | 2010-12-02 09:39:12 -0600 |
---|---|---|
committer | Jeff Hamilton <jham@android.com> | 2010-12-11 22:50:49 -0600 |
commit | 3fb30ae5bf51d9ffe6271a345d55905dade8040d (patch) | |
tree | 51a126ef946daa06ac502f88a3541e3cb937253b /jni | |
parent | aae427142dc22e7e419c146bc7748d9daff518e8 (diff) | |
download | packages_apps_nfc-3fb30ae5bf51d9ffe6271a345d55905dade8040d.zip packages_apps_nfc-3fb30ae5bf51d9ffe6271a345d55905dade8040d.tar.gz packages_apps_nfc-3fb30ae5bf51d9ffe6271a345d55905dade8040d.tar.bz2 |
First pass at advanced NFC tag dispatching APIs and other cleanup.
Change-Id: I8469af074325fc8731aace1c9681bbddfa55dc89
Diffstat (limited to 'jni')
-rw-r--r-- | jni/com_android_nfc.cpp | 5 | ||||
-rw-r--r-- | jni/com_android_nfc.h | 13 | ||||
-rw-r--r-- | jni/com_android_nfc_NativeNfcTag.cpp | 3 |
3 files changed, 11 insertions, 10 deletions
diff --git a/jni/com_android_nfc.cpp b/jni/com_android_nfc.cpp index 11c6fa6..8395350 100644 --- a/jni/com_android_nfc.cpp +++ b/jni/com_android_nfc.cpp @@ -460,8 +460,9 @@ void nfc_jni_get_technology_tree(JNIEnv* e, phLibNfc_RemoteDevList_t* devList, }break; case phNfc_eJewel_PICC: { - index = addTechIfNeeded(technologies, handles, index, MAX_NUM_TECHNOLOGIES, - TARGET_TYPE_JEWEL, handle); +// TODO expose Jewel in the Java APIs +// index = addTechIfNeeded(technologies, handles, index, MAX_NUM_TECHNOLOGIES, +// TARGET_TYPE_JEWEL, handle); index = addTechIfNeeded(technologies, handles, index, MAX_NUM_TECHNOLOGIES, TARGET_TYPE_ISO14443_3A, handle); }break; diff --git a/jni/com_android_nfc.h b/jni/com_android_nfc.h index fd22696..04a4249 100644 --- a/jni/com_android_nfc.h +++ b/jni/com_android_nfc.h @@ -80,13 +80,12 @@ extern "C" { #define TARGET_TYPE_ISO14443_3A 1 #define TARGET_TYPE_ISO14443_3B 2 #define TARGET_TYPE_ISO14443_4 3 -#define TARGET_TYPE_ISO15693 21 -#define TARGET_TYPE_MIFARE_CLASSIC 200 -#define TARGET_TYPE_MIFARE_UL 202 -#define TARGET_TYPE_MIFARE_DESFIRE 203 -#define TARGET_TYPE_FELICA 11 -#define TARGET_TYPE_JEWEL 101 -#define TARGET_TYPE_NDEF_FORMATABLE 110 +#define TARGET_TYPE_FELICA 4 +#define TARGET_TYPE_ISO15693 5 +#define TARGET_TYPE_NDEF 6 +#define TARGET_TYPE_NDEF_FORMATABLE 7 +#define TARGET_TYPE_MIFARE_CLASSIC 8 +#define TARGET_TYPE_MIFARE_UL 9 /* Utility macros for logging */ #define GET_LEVEL(status) ((status)==NFCSTATUS_SUCCESS)?ANDROID_LOG_DEBUG:ANDROID_LOG_WARN diff --git a/jni/com_android_nfc_NativeNfcTag.cpp b/jni/com_android_nfc_NativeNfcTag.cpp index 801e8f1..2d9ecf8 100644 --- a/jni/com_android_nfc_NativeNfcTag.cpp +++ b/jni/com_android_nfc_NativeNfcTag.cpp @@ -710,17 +710,18 @@ static jbyteArray com_android_nfc_NativeNfcTag_doTransceive(JNIEnv *e, buflen = outlen = (uint32_t)e->GetArrayLength(data); switch (selectedTech) { +/* TODO figure out how to pipe Jewel commands through from Java case TARGET_TYPE_JEWEL: transceive_info.cmd.JewelCmd = phNfc_eJewel_Raw; transceive_info.addr = 0; break; +*/ case TARGET_TYPE_FELICA: transceive_info.cmd.FelCmd = phNfc_eFelica_Raw; transceive_info.addr = 0; break; case TARGET_TYPE_MIFARE_CLASSIC: case TARGET_TYPE_MIFARE_UL: - case TARGET_TYPE_MIFARE_DESFIRE: if (raw) { transceive_info.cmd.MfCmd = phHal_eMifareRaw; transceive_info.addr = 0; |