Patch to manage the transceive timeout in wired mode
Change-Id: Id825345c0c5cd131d25ff23184a57ee53f9fa9dd
diff --git a/jni/com_android_nfc_NativeNfcSecureElement.cpp b/jni/com_android_nfc_NativeNfcSecureElement.cpp
index e0312e6..b1db0b8 100755
--- a/jni/com_android_nfc_NativeNfcSecureElement.cpp
+++ b/jni/com_android_nfc_NativeNfcSecureElement.cpp
@@ -27,6 +27,8 @@
namespace android {
+extern void nfc_jni_reset_timeout_values();
+
static void com_android_nfc_jni_ioctl_callback ( void* pContext,
phNfc_sData_t* Outparam_Cb,
NFCSTATUS status)
@@ -432,6 +434,10 @@
goto clean_and_return;
}
CONCURRENCY_UNLOCK();
+
+ TRACE("Set Transceive Timeout to 0x1E");
+ phLibNfc_SetIsoXchgTimeout(30);
+
/* Return the Handle of the SecureElement */
return secureElementHandle;
}
@@ -581,6 +587,8 @@
result = JNI_TRUE;
clean_and_return:
+ TRACE("Reset Transceive timeout to 0x1A");
+ nfc_jni_reset_timeout_values();
CONCURRENCY_UNLOCK();
return result;
}