diff options
author | Martijn Coenen <maco@google.com> | 2014-09-16 18:02:38 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-16 18:02:38 +0000 |
commit | 827d83cfe6b8d29e81ea91be5c2f662f7d14650e (patch) | |
tree | 8ad2483c60318963c5b620f51e41d209ed0d2607 /nci | |
parent | 346950efed22adf9c9107fb4eddc7a624fe815ae (diff) | |
parent | 34e6f0f2b67f85124e32b1bd22a5f39c9729d13b (diff) | |
download | android_packages_apps_Nfc-827d83cfe6b8d29e81ea91be5c2f662f7d14650e.tar.gz android_packages_apps_Nfc-827d83cfe6b8d29e81ea91be5c2f662f7d14650e.tar.bz2 android_packages_apps_Nfc-827d83cfe6b8d29e81ea91be5c2f662f7d14650e.zip |
am 34e6f0f2: am b3ac715d: Merge "Support for AID prefix registration." into lmp-dev
* commit '34e6f0f2b67f85124e32b1bd22a5f39c9729d13b':
Support for AID prefix registration.
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; |