Add Peer-To-Peer priority mechanism
Most of NFC devices support card emulation now, there is a chance
that the remote NFC device is detected as a card not peer device.
This peer-to-peer priority mechanism will always try to establish
peer-to-peer connection than card emulation
Peer-To-Peer priority mechanism works only if NFCC is running in
bail out mode. The configuration option NFA_POLL_BAIL_OUT_MODE is to
define the mode of NFCC.
Change-Id: I45a099efa77fab132189ea92da97a90240cfba1d
diff --git a/src/adaptation/NfcAdaptation.cpp b/src/adaptation/NfcAdaptation.cpp
index 1a9e191..99bc87d 100644
--- a/src/adaptation/NfcAdaptation.cpp
+++ b/src/adaptation/NfcAdaptation.cpp
@@ -54,6 +54,7 @@
static UINT8 deviceHostWhiteList [NFA_HCI_MAX_HOST_IN_NETWORK];
static tNFA_HCI_CFG jni_nfa_hci_cfg;
extern tNFA_HCI_CFG *p_nfa_hci_cfg;
+extern BOOLEAN nfa_poll_bail_out_mode;
/*******************************************************************************
**
@@ -141,6 +142,11 @@
nfa_ee_max_ee_cfg = num;
ALOGD("%s: Overriding NFA_EE_MAX_EE_SUPPORTED to use %d", func, nfa_ee_max_ee_cfg);
}
+ if ( GetNumValue ( NAME_NFA_POLL_BAIL_OUT_MODE, &num, sizeof ( num ) ) )
+ {
+ nfa_poll_bail_out_mode = num;
+ ALOGD("%s: Overriding NFA_POLL_BAIL_OUT_MODE to use %d", func, nfa_poll_bail_out_mode);
+ }
//configure device host whitelist of HCI host ID's; see specification ETSI TS 102 622 V11.1.10
//(2012-10), section 6.1.3.1