summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-06-30 00:11:52 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-06-30 00:11:52 +0200
commit779bf1afd19f5b784c5c1c47d50fdd56b1f5ebfd (patch)
treee32687079333ec2840907ce0be458dfeeabacd4a
parent43c1153e4b31194a32b9be7febd5aa4a542cef3c (diff)
downloadpackages_apps_nfc-779bf1afd19f5b784c5c1c47d50fdd56b1f5ebfd.zip
packages_apps_nfc-779bf1afd19f5b784c5c1c47d50fdd56b1f5ebfd.tar.gz
packages_apps_nfc-779bf1afd19f5b784c5c1c47d50fdd56b1f5ebfd.tar.bz2
NativeNfcManager: Properly unconfigure NFC chipreplicant-4.2-0002
Change-Id: I8da74ff64579181387b3905c29e5d4dca9e9e7eb Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rwxr-xr-xnxp/jni/com_android_nfc.h1
-rwxr-xr-xnxp/jni/com_android_nfc_NativeNfcManager.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/nxp/jni/com_android_nfc.h b/nxp/jni/com_android_nfc.h
index fcf54cf..770ae35 100755
--- a/nxp/jni/com_android_nfc.h
+++ b/nxp/jni/com_android_nfc.h
@@ -30,6 +30,7 @@ extern "C" {
#include <phNfcTypes.h>
#include <phNfcIoctlCode.h>
#include <phLibNfc.h>
+#include <phDal4Nfc.h>
#include <phDal4Nfc_messageQueueLib.h>
#include <phFriNfc_NdefMap.h>
#include <cutils/log.h>
diff --git a/nxp/jni/com_android_nfc_NativeNfcManager.cpp b/nxp/jni/com_android_nfc_NativeNfcManager.cpp
index af0e4fb..02086da 100755
--- a/nxp/jni/com_android_nfc_NativeNfcManager.cpp
+++ b/nxp/jni/com_android_nfc_NativeNfcManager.cpp
@@ -624,10 +624,14 @@ clean_and_return:
{
if(nat)
{
+ if (driverConfigured)
+ nfc_jni_unconfigure_driver(nat);
+
kill_client(nat);
}
}
if (pn544_dev != NULL) {
+ phDal4Nfc_Reset(0);
nfc_pn544_close(pn544_dev);
}
nfc_cb_data_deinit(&cb_data);