Skip to content

Commit

Permalink
Adding support for AGC debug functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeslin committed Jun 6, 2018
1 parent c30547b commit db7edc6
Showing 1 changed file with 83 additions and 4 deletions.
87 changes: 83 additions & 4 deletions patch_packages_apps_nfc.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp
old mode 100755
new mode 100644
index a0ee86d..eb9ad10
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_
Expand All @@ -12,7 +10,88 @@ index a0ee86d..eb9ad10
startRfDiscovery (true);
sDiscoveryEnabled = true;

@@ -8587,7 +8588,7 @@ Transcation_Check_t* nfcManager_transactionDetail(void)
@@ -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();
Expand Down

0 comments on commit db7edc6

Please sign in to comment.