diff options
author | Martijn Coenen <maco@google.com> | 2014-09-16 14:55:10 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-16 14:55:11 +0000 |
commit | b3ac715d78fd5c18a121447eced959438234dd25 (patch) | |
tree | 602b1203ea18a87a93721eb1db2abd2ad50537c8 /nci | |
parent | e276d3323d755d8bdaccd59a551332c064970215 (diff) | |
parent | 31208d3ee36f583fd998c89508a3e93bb550cb29 (diff) | |
download | android_packages_apps_Nfc-b3ac715d78fd5c18a121447eced959438234dd25.tar.gz android_packages_apps_Nfc-b3ac715d78fd5c18a121447eced959438234dd25.tar.bz2 android_packages_apps_Nfc-b3ac715d78fd5c18a121447eced959438234dd25.zip |
Merge "Support for AID prefix registration." into lmp-dev
Diffstat (limited to 'nci')
-rw-r--r-- | nci/jni/RoutingManager.cpp | 13 | ||||
-rw-r--r-- | nci/jni/RoutingManager.h | 13 |
2 files changed, 25 insertions, 1 deletions
diff --git a/nci/jni/RoutingManager.cpp b/nci/jni/RoutingManager.cpp index d5d944ea..79b417e8 100644 --- a/nci/jni/RoutingManager.cpp +++ b/nci/jni/RoutingManager.cpp @@ -37,7 +37,8 @@ extern SyncEvent gDeactivatedEvent; const JNINativeMethod RoutingManager::sMethods [] = { {"doGetDefaultRouteDestination", "()I", (void*) RoutingManager::com_android_nfc_cardemulation_doGetDefaultRouteDestination}, - {"doGetDefaultOffHostRouteDestination", "()I", (void*) RoutingManager::com_android_nfc_cardemulation_doGetDefaultOffHostRouteDestination} + {"doGetDefaultOffHostRouteDestination", "()I", (void*) RoutingManager::com_android_nfc_cardemulation_doGetDefaultOffHostRouteDestination}, + {"doGetAidMatchingMode", "()I", (void*) RoutingManager::com_android_nfc_cardemulation_doGetAidMatchingMode} }; RoutingManager::RoutingManager () @@ -65,6 +66,11 @@ RoutingManager::RoutingManager () else mOffHostEe = 0xf4; + if (GetNumValue("AID_MATCHING_MODE", &num, sizeof(num))) + mAidMatchingMode = num; + else + mAidMatchingMode = AID_MATCHING_EXACT_ONLY; + ALOGD("%s: mOffHostEe=0x%02X", fn, mOffHostEe); memset (&mEeInfo, 0, sizeof(mEeInfo)); @@ -532,3 +538,8 @@ int RoutingManager::com_android_nfc_cardemulation_doGetDefaultOffHostRouteDestin { return getInstance().mOffHostEe; } + +int RoutingManager::com_android_nfc_cardemulation_doGetAidMatchingMode (JNIEnv*) +{ + return getInstance().mAidMatchingMode; +} diff --git a/nci/jni/RoutingManager.h b/nci/jni/RoutingManager.h index 32ce54dd..65ea3edb 100644 --- a/nci/jni/RoutingManager.h +++ b/nci/jni/RoutingManager.h @@ -48,10 +48,22 @@ private: void handleData (const UINT8* data, UINT32 dataLen, tNFA_STATUS status); void notifyActivated (); void notifyDeactivated (); + + // See AidRoutingManager.java for corresponding + // AID_MATCHING_ constants + + // Every routing table entry is matched exact (BCM20793) + static const int AID_MATCHING_EXACT_ONLY = 0x00; + // Every routing table entry can be matched either exact or prefix + static const int AID_MATCHING_EXACT_OR_PREFIX = 0x01; + // Every routing table entry is matched as a prefix + static const int AID_MATCHING_PREFIX_ONLY = 0x02; + static void nfaEeCallback (tNFA_EE_EVT event, tNFA_EE_CBACK_DATA* eventData); static void stackCallback (UINT8 event, tNFA_CONN_EVT_DATA* eventData); static int com_android_nfc_cardemulation_doGetDefaultRouteDestination (JNIEnv* e); static int com_android_nfc_cardemulation_doGetDefaultOffHostRouteDestination (JNIEnv* e); + static int com_android_nfc_cardemulation_doGetAidMatchingMode (JNIEnv* e); std::vector<UINT8> mRxDataBuffer; @@ -60,6 +72,7 @@ private: int mDefaultEe; int mOffHostEe; int mActiveSe; + int mAidMatchingMode; bool mReceivedEeInfo; tNFA_EE_DISCOVER_REQ mEeInfo; tNFA_TECHNOLOGY_MASK mSeTechMask; |