summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Chu <evanchu@broadcom.com>2012-09-28 12:20:35 -0400
committerMartijn Coenen <maco@google.com>2012-09-30 09:45:15 -0700
commita80bb9a5333d4f4f749778f3a7b13b8c7ae58c6f (patch)
treea96ffbbc9106a7c07a75e118f6a100d865bd66ad
parent914d6caa70f544fb3dd0710de59dff090c695caa (diff)
downloadpackages_apps_nfc-a80bb9a5333d4f4f749778f3a7b13b8c7ae58c6f.zip
packages_apps_nfc-a80bb9a5333d4f4f749778f3a7b13b8c7ae58c6f.tar.gz
packages_apps_nfc-a80bb9a5333d4f4f749778f3a7b13b8c7ae58c6f.tar.bz2
Do not activate a tag during NFC disable.
Could cause RF field to remain on. Bug: 7164846 Change-Id: I82efc29b96c7129465fea5354fa5484da31618a6
-rwxr-xr-xnci/jni/NativeNfcManager.cpp10
-rw-r--r--nci/jni/RouteDataSet.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp
index 99ffc77..e65e30e 100755
--- a/nci/jni/NativeNfcManager.cpp
+++ b/nci/jni/NativeNfcManager.cpp
@@ -267,7 +267,10 @@ static void nfaConnectionCallback (UINT8 connEvent, tNFA_CONN_EVT_DATA* eventDat
break;
case NFA_SELECT_RESULT_EVT: // NFC link/protocol discovery select response
- ALOGD("%s: NFA_SELECT_RESULT_EVT: status = %d, gIsSelectingRfInterface = %d", __FUNCTION__, eventData->status, gIsSelectingRfInterface);
+ ALOGD("%s: NFA_SELECT_RESULT_EVT: status = %d, gIsSelectingRfInterface = %d, sIsDisabling=%d", __FUNCTION__, eventData->status, gIsSelectingRfInterface, sIsDisabling);
+
+ if (sIsDisabling)
+ break;
if (eventData->status != NFA_STATUS_OK)
{
@@ -286,7 +289,10 @@ static void nfaConnectionCallback (UINT8 connEvent, tNFA_CONN_EVT_DATA* eventDat
break;
case NFA_ACTIVATED_EVT: // NFC link/protocol activated
- ALOGD("%s: NFA_ACTIVATED_EVT: gIsSelectingRfInterface=%d", __FUNCTION__, gIsSelectingRfInterface);
+ ALOGD("%s: NFA_ACTIVATED_EVT: gIsSelectingRfInterface=%d, sIsDisabling=%d", __FUNCTION__, gIsSelectingRfInterface, sIsDisabling);
+ if (sIsDisabling)
+ break;
+
NfcTag::getInstance().setActivationState ();
if (gIsSelectingRfInterface)
{
diff --git a/nci/jni/RouteDataSet.h b/nci/jni/RouteDataSet.h
index d937dec..d2a09b8 100644
--- a/nci/jni/RouteDataSet.h
+++ b/nci/jni/RouteDataSet.h
@@ -152,7 +152,7 @@ private:
** Name: RouteDataSet
**
** Description: Import and export general routing data using a XML file.
-** See /data/bcmnfc/param/route.xml
+** See /data/bcm/param/route.xml
**
*****************************************************************************/
class RouteDataSet