diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-05-01 09:06:43 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2012-05-01 09:06:43 -0700 |
commit | 7355250aa03ea6106a3363192624748ace8a797c (patch) | |
tree | 6ac4aef77575b015d2ca640055977ab8030bfd45 /jni | |
parent | 68bd18ee08c057b72b94f467d440766e70bec3e6 (diff) | |
parent | 3a8948a02c2076f8184e5eef129a34337f215596 (diff) | |
download | packages_apps_nfc-7355250aa03ea6106a3363192624748ace8a797c.zip packages_apps_nfc-7355250aa03ea6106a3363192624748ace8a797c.tar.gz packages_apps_nfc-7355250aa03ea6106a3363192624748ace8a797c.tar.bz2 |
resolved conflicts for merge of 3a8948a0 to jb-dev-plus-aosp
Change-Id: I4e233f3777275b781cd39689499ef777db78a913
Diffstat (limited to 'jni')
-rw-r--r-- | jni/com_android_nfc.h | 2 | ||||
-rw-r--r-- | jni/com_android_nfc_NativeNfcManager.cpp | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/jni/com_android_nfc.h b/jni/com_android_nfc.h index a44bcf0..b876dad 100644 --- a/jni/com_android_nfc.h +++ b/jni/com_android_nfc.h @@ -112,9 +112,11 @@ extern "C" { #if 0 #define LOG_CALLBACK(funcName, status) LOG_PRI(GET_LEVEL(status), LOG_TAG, "Callback: %s() - status=0x%04x[%s]", funcName, status, nfc_jni_get_status_name(status)); #define TRACE(...) ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__) + #define TRACE_ENABLED 1 #else #define LOG_CALLBACK(...) #define TRACE(...) + #define TRACE_ENABLED 0 #endif struct nfc_jni_native_data diff --git a/jni/com_android_nfc_NativeNfcManager.cpp b/jni/com_android_nfc_NativeNfcManager.cpp index 704ee6a..e6da0fa 100644 --- a/jni/com_android_nfc_NativeNfcManager.cpp +++ b/jni/com_android_nfc_NativeNfcManager.cpp @@ -1164,13 +1164,14 @@ static void nfc_jni_transaction_callback(void *context, if(aid != NULL) { - char aid_str[AID_MAXLEN * 2 + 1]; - aid_str[0] = '\0'; - for (i = 0; i < (int) (aid->length) && i < AID_MAXLEN; i++) { - snprintf(&aid_str[i*2], 3, "%02x", aid->buffer[i]); + if (TRACE_ENABLED == 1) { + char aid_str[AID_MAXLEN * 2 + 1]; + aid_str[0] = '\0'; + for (i = 0; i < (int) (aid->length) && i < AID_MAXLEN; i++) { + snprintf(&aid_str[i*2], 3, "%02x", aid->buffer[i]); + } + ALOGD("> AID: %s", aid_str); } - ALOGD("> AID: %s", aid_str); - tmp_array = e->NewByteArray(aid->length); if (tmp_array == NULL) { |