-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch-packages_apps_Nfc-pn7150.txt
110 lines (107 loc) · 4.55 KB
/
patch-packages_apps_Nfc-pn7150.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
103
104
105
106
107
108
109
110
diff --git a/nci/jni/Android.mk b/nci/jni/Android.mk
old mode 100644
new mode 100755
index 2a7d34a..b7a4235
--- a/nci/jni/Android.mk
+++ b/nci/jni/Android.mk
@@ -50,7 +50,7 @@ LOCAL_CFLAGS += -DJCOP_VER_3_1=$(JCOP_VER_3_1)
LOCAL_CFLAGS += -DJCOP_VER_3_2=$(JCOP_VER_3_2)
LOCAL_CFLAGS += -DJCOP_VER_3_3=$(JCOP_VER_3_3)
-NFC_NXP_ESE:= TRUE
+NFC_NXP_ESE:= FALSE
ifeq ($(NFC_NXP_ESE),TRUE)
LOCAL_CFLAGS += -DNFC_NXP_ESE=TRUE
LOCAL_CFLAGS += -DNFC_NXP_ESE_VER=$(JCOP_VER_3_3)
@@ -59,7 +59,7 @@ LOCAL_CFLAGS += -DNFC_NXP_ESE=FALSE
endif
#### Select the CHIP ####
-NXP_CHIP_TYPE := $(PN551)
+NXP_CHIP_TYPE := $(PN548C2)
ifeq ($(NXP_CHIP_TYPE),$(PN547C2))
LOCAL_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2
diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp
old mode 100644
new mode 100755
index dbbd7c5..373b50d
--- a/nci/jni/NativeNfcManager.cpp
+++ b/nci/jni/NativeNfcManager.cpp
@@ -5504,48 +5504,19 @@ void checkforTranscation(UINT8 connEvent, void* eventData)
#endif
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)
- && eventDM_Conn_data->rf_field.rf_field_status == 0)
- {
- ALOGD("start_timer");
-#if((NFC_NXP_CHIP_TYPE == PN548C2) || (NFC_NXP_CHIP_TYPE == PN551))
- set_AGC_process_state(false);
-#endif
- transaction_data.current_transcation_state = NFA_TRANS_DM_RF_FIELD_EVT_OFF;
- scleanupTimerProc_transaction.set (50, cleanupTimerProc_transaction);
- }
- 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)
+ eventDM_Conn_data->rf_field.rf_field_status == 1)
{
#if((NFC_NXP_CHIP_TYPE == PN548C2) || (NFC_NXP_CHIP_TYPE == PN551))
nfcManagerEnableAGCDebug(connEvent);
#endif
- transaction_data.current_transcation_state = NFA_TRANS_DM_RF_FIELD_EVT_ON;
- ALOGD("Payment is in progress hold the screen on/off request ");
- transaction_data.current_transcation_state = NFA_TRANS_DM_RF_TRANS_START;
- scleanupTimerProc_transaction.kill ();
-
}
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)
+ eventDM_Conn_data->rf_field.rf_field_status == 0)
{
ALOGD("Transcation is done");
#if((NFC_NXP_CHIP_TYPE == PN548C2) || (NFC_NXP_CHIP_TYPE == PN551))
set_AGC_process_state(false);
#endif
- transaction_data.current_transcation_state = NFA_TRANS_DM_RF_TRANS_PROGRESS;
- //set_transcation_stat(false);
- cleanup_timer();
- }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)
- {
-
- ALOGD("No transaction done cleaning up the variables");
- cleanup_timer();
}
break;
default:
@@ -6668,8 +6639,9 @@ static void nfcManagerEnableAGCDebug(UINT8 connEvent)
ALOGD ("%s AGCDebug not enabled", __FUNCTION__);
return;
}
+ ALOGD ("%s connEvent=%d, menableAGC_debug_t.AGCdebugrunning=%d", __FUNCTION__, connEvent, menableAGC_debug_t.AGCdebugrunning);
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;
@@ -6679,7 +6651,7 @@ static void nfcManagerEnableAGCDebug(UINT8 connEvent)
pthread_attr_destroy(&attr);
if(retvalue == 0)
{
- menableAGC_debug_t.AGCdebugstarted = true;
+ menableAGC_debug_t.AGCdebugrunning = true;
set_AGC_process_state(true);
}
}
@@ -6688,7 +6660,7 @@ static void nfcManagerEnableAGCDebug(UINT8 connEvent)
void *enableAGCThread(void *arg)
{
tNFA_STATUS status = NFA_STATUS_FAILED;
- while( menableAGC_debug_t.AGCdebugstarted == true )
+ while( menableAGC_debug_t.AGCdebugrunning == true )
{
if(get_AGC_process_state() == false)
{