-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch_packages_apps_nfc.txt
102 lines (101 loc) · 4.36 KB
/
patch_packages_apps_nfc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp
index a0ee86d..c414682 100755
--- a/nci/jni/NativeNfcManager.cpp
+++ b/nci/jni/NativeNfcManager.cpp
@@ -2942,6 +2942,7 @@ static void nfcManager_enableDiscovery (JNIEnv* e, jobject o, jint technologies_
}
}
// Actually start discovery.
+ usleep(100*1000);
startRfDiscovery (true);
sDiscoveryEnabled = true;
@@ -6425,49 +6426,13 @@ void checkforTranscation(uint8_t connEvent, void* eventData)
}
break;
case NFA_TRANS_DM_RF_FIELD_EVT:
- if (eventDM_Conn_data->rf_field.status == NFA_STATUS_OK &&
- (transaction_data.current_transcation_state == NFA_TRANS_EE_ACTION_EVT
- || transaction_data.current_transcation_state == NFA_TRANS_CE_DEACTIVATED
- || transaction_data.current_transcation_state == NFA_TRANS_CE_ACTIVATED)
- && eventDM_Conn_data->rf_field.rf_field_status == 0)
+ if (eventDM_Conn_data->rf_field.rf_field_status == 1)
{
- ALOGV("start_timer");
- if(nfcFL.chipType != pn547C2) {
- set_AGC_process_state(false);
- }
- transaction_data.current_transcation_state = NFA_TRANS_DM_RF_FIELD_EVT_OFF;
- pTransactionController->setAbortTimer(50/*msec*/);
- }
- else if (eventDM_Conn_data->rf_field.status == NFA_STATUS_OK &&
- transaction_data.current_transcation_state == NFA_TRANS_DM_RF_FIELD_EVT_OFF &&
- eventDM_Conn_data->rf_field.rf_field_status == 1)
- {
- if(nfcFL.chipType != pn547C2) {
- nfcManagerEnableAGCDebug(connEvent);
- }
- transaction_data.current_transcation_state = NFA_TRANS_DM_RF_FIELD_EVT_ON;
- ALOGV("Payment is in progress hold the screen on/off request ");
- transaction_data.current_transcation_state = NFA_TRANS_DM_RF_TRANS_START;
- pTransactionController->killAbortTimer();
-
+ nfcManagerEnableAGCDebug(connEvent);
}
- else if (eventDM_Conn_data->rf_field.status == NFA_STATUS_OK &&
- transaction_data.current_transcation_state == NFA_TRANS_DM_RF_TRANS_START &&
- eventDM_Conn_data->rf_field.rf_field_status == 0)
- {
- ALOGV("Transcation is done");
- if(nfcFL.chipType != pn547C2) {
- set_AGC_process_state(false);
- }
- transaction_data.current_transcation_state = NFA_TRANS_DM_RF_TRANS_PROGRESS;
- pTransactionController->lastRequestResume();
- }else if(eventDM_Conn_data->rf_field.status == NFA_STATUS_OK &&
- transaction_data.current_transcation_state == NFA_TRANS_ACTIVATED_EVT &&
- eventDM_Conn_data->rf_field.rf_field_status == 0)
+ else
{
-
- ALOGD("No transaction done cleaning up the variables");
- pTransactionController->lastRequestResume();
+ set_AGC_process_state(false);
}
break;
default:
@@ -8350,7 +8315,7 @@ static void nfcManagerEnableAGCDebug(uint8_t connEvent)
return;
}
if(connEvent == NFA_TRANS_DM_RF_FIELD_EVT &&
- menableAGC_debug_t.AGCdebugstarted == false)
+ menableAGC_debug_t.AGCdebugrunning == false)
{
pthread_t agcThread;
pthread_attr_t attr;
@@ -8360,7 +8325,7 @@ static void nfcManagerEnableAGCDebug(uint8_t connEvent)
pthread_attr_destroy(&attr);
if(retvalue == 0)
{
- menableAGC_debug_t.AGCdebugstarted = true;
+ menableAGC_debug_t.AGCdebugrunning = true;
set_AGC_process_state(true);
}
}
@@ -8373,7 +8338,7 @@ void *enableAGCThread(void *arg)
return NULL;
}
tNFA_STATUS status = NFA_STATUS_FAILED;
- while( menableAGC_debug_t.AGCdebugstarted == true )
+ while( menableAGC_debug_t.AGCdebugrunning == true )
{
if(get_AGC_process_state() == false)
{
@@ -8587,7 +8552,7 @@ Transcation_Check_t* nfcManager_transactionDetail(void)
void nfcManager_getFeatureList() {
tNFC_chipType chipType;// = pn553;
chipType = NFC_GetChipType();
- ALOGV("%s : chipType",__func__);
+ ALOGV("%s : chipType=%d",__func__, chipType);
CONFIGURE_FEATURELIST(chipType);
}
/*******************************************************************************