Merge "[Bugfix][T106][task-view-458] sync code with T800 task view 291,  lift key info level in ril moddule to info"
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
index c4a4318..90d3409 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
@@ -211,14 +211,14 @@
     #define closeRequest           snprintf(tempPrintBuf, PRINTBUF_SIZE, "%s)", printBuf); \
                                    snprintf(printBuf, PRINTBUF_SIZE, "%s", tempPrintBuf)
     #define printRequest(token, req) if(enable_syslog) {         \
-        RLOGD("[%x]> %s %s", token, requestToString(req), printBuf);} else {\
+        RLOGI("[%x]> %s %s", token, requestToString(req), printBuf);} else {\
         printf("[%x]> %s %s\n", token, requestToString(req), printBuf);}
 
     #define startResponse           sprintf(printBuf, "%s {", printBuf)
     #define closeResponse           snprintf(tempPrintBuf, PRINTBUF_SIZE, "%s}", printBuf); \
                                     snprintf(printBuf, PRINTBUF_SIZE, "%s", tempPrintBuf)
     #define printResponse            if(enable_syslog) { \
-                                    RLOGD("%s", printBuf); } else { \
+                                    RLOGI("%s", printBuf); } else { \
                                     printf("%s\n", printBuf);}
 
     #define clearPrintBuf           printBuf[0] = 0
@@ -2931,71 +2931,71 @@
         startResponse;
 
 #ifdef TELEMATIC_5G_SUPPORT
-        appendPrintBuf("%s[GW_SS.signalStrength=%d,GW_SS.bitErrorRate=%d,GW_SS.timingAdvance=%d,\
-                CDMA_SS.dbm=%d,CDMA_SS.ecio=%d,\
-                EVDO_SS.dbm=%d,EVDO_SS.ecio=%d,EVDO_SS.signalNoiseRatio=%d,\
-                LTE_SS.signalStrength=%d,LTE_SS.rsrp=%d,LTE_SS.rsrq=%d,LTE_SS.rssnr=%d,LTE_SS.cqi=%d,LTE_SS.timingAdvance=%d,\
-                TDSCDMA_SS.signalStrength=%d,TDSCDMA_SS.bitErrorRate=%d,TDSCDMA_SS.rscp=%d,\
-                WCDMA_SS.signalStrength=%d,WCDMA_SS.bitErrorRate=%d,WCDMA_SS.rscp=%d,WCDMA_SS.ecno=%d,\
-                NR_SignalStrength.ssRsrp=%d,NR_SignalStrength.ssRsrq=%d,NR_SignalStrength.ssSinr=%d,\
-                NR_SignalStrength.csiRsrp=%d,NR_SignalStrength.csiRsrq=%d,NR_SignalStrength.csiSinr=%d]",
+        appendPrintBuf("%s[GW.rssi=%d,GW.bER=%d,GW.tA=%d,"
+                "W.rssi=%d,W.bER=%d,W.rscp=%d,W.ecno=%d,"                
+                "LTE.rssi=%d,LTE.rsrp=%d,LTE.rsrq=%d,LTE.rssnr=%d,LTE.cqi=%d,LTE.tA=%d,"                
+                "NR.ssRsrp=%d,NR.ssRsrq=%d,NR.ssSinr=%d,"
+                "NR.csiRsrp=%d,NR.csiRsrq=%d,NR.csiSinr=%d,"
+                "CD.dbm=%d,CD.ecio=%d,"
+                "EV.dbm=%d,EV.ecio=%d,EV.SNR=%d,"
+                "TD.rssi=%d,TD.bER=%d,TD.rscp=%d]",                
                 printBuf,
                 p_cur->GW_SignalStrength.signalStrength,
                 p_cur->GW_SignalStrength.bitErrorRate,
                 p_cur->GW_SignalStrength.timingAdvance,
-                p_cur->CDMA_SignalStrength.dbm,
-                p_cur->CDMA_SignalStrength.ecio,
-                p_cur->EVDO_SignalStrength.dbm,
-                p_cur->EVDO_SignalStrength.ecio,
-                p_cur->EVDO_SignalStrength.signalNoiseRatio,
+                p_cur->WCDMA_SignalStrength.signalStrength,
+                p_cur->WCDMA_SignalStrength.bitErrorRate,
+                p_cur->WCDMA_SignalStrength.rscp,
+                p_cur->WCDMA_SignalStrength.ecno,               
                 p_cur->LTE_SignalStrength.signalStrength,
                 p_cur->LTE_SignalStrength.rsrp,
                 p_cur->LTE_SignalStrength.rsrq,
                 p_cur->LTE_SignalStrength.rssnr,
                 p_cur->LTE_SignalStrength.cqi,
-                p_cur->LTE_SignalStrength.timingAdvance,
-                p_cur->TD_SCDMA_SignalStrength.signalStrength,
-                p_cur->TD_SCDMA_SignalStrength.bitErrorRate,
-                p_cur->TD_SCDMA_SignalStrength.rscp,
-                p_cur->WCDMA_SignalStrength.signalStrength,
-                p_cur->WCDMA_SignalStrength.bitErrorRate,
-                p_cur->WCDMA_SignalStrength.rscp,
-                p_cur->WCDMA_SignalStrength.ecno,
+                p_cur->LTE_SignalStrength.timingAdvance,             
                 p_cur->NR_SignalStrength.ssRsrp,
                 p_cur->NR_SignalStrength.ssRsrq,
                 p_cur->NR_SignalStrength.ssSinr,
                 p_cur->NR_SignalStrength.csiRsrp,
                 p_cur->NR_SignalStrength.csiRsrq,
-                p_cur->NR_SignalStrength.csiSinr);
-#else
-        appendPrintBuf("%s[GW_SS.signalStrength=%d,GW_SS.bitErrorRate=%d,GW_SS.timingAdvance=%d,\
-                CDMA_SS.dbm=%d,CDMA_SS.ecio=%d,\
-                EVDO_SS.dbm=%d,EVDO_SS.ecio=%d,EVDO_SS.signalNoiseRatio=%d,\
-                LTE_SS.signalStrength=%d,LTE_SS.rsrp=%d,LTE_SS.rsrq=%d,LTE_SS.rssnr=%d,LTE_SS.cqi=%d,LTE_SS.timingAdvance=%d,\
-                TDSCDMA_SS.signalStrength=%d,TDSCDMA_SS.bitErrorRate=%d,TDSCDMA_SS.rscp=%d,\
-                WCDMA_SS.signalStrength=%d,WCDMA_SS.bitErrorRate=%d,WCDMA_SS.rscp=%d,WCDMA_SS.ecno=%d]",
-                printBuf,
-                p_cur->GW_SignalStrength.signalStrength,
-                p_cur->GW_SignalStrength.bitErrorRate,
-                p_cur->GW_SignalStrength.timingAdvance,
+                p_cur->NR_SignalStrength.csiSinr,
                 p_cur->CDMA_SignalStrength.dbm,
                 p_cur->CDMA_SignalStrength.ecio,
                 p_cur->EVDO_SignalStrength.dbm,
                 p_cur->EVDO_SignalStrength.ecio,
                 p_cur->EVDO_SignalStrength.signalNoiseRatio,
+                p_cur->TD_SCDMA_SignalStrength.signalStrength,
+                p_cur->TD_SCDMA_SignalStrength.bitErrorRate,
+                p_cur->TD_SCDMA_SignalStrength.rscp);
+#else
+       appendPrintBuf("%s[GW.rssi=%d,GW.bER=%d,GW.tA=%d,"
+                "W.rssi=%d,W.bER=%d,W.rscp=%d,W.ecno=%d,"                
+                "LTE.rssi=%d,LTE.rsrp=%d,LTE.rsrq=%d,LTE.rssnr=%d,LTE.cqi=%d,LTE.tA=%d,"                
+                "CD.dbm=%d,CD.ecio=%d,"
+                "EV.dbm=%d,EV.ecio=%d,EV.SNR=%d,"
+                "TD.rssi=%d,TD.bER=%d,TD.rscp=%d]",              
+                printBuf,
+                p_cur->GW_SignalStrength.signalStrength,
+                p_cur->GW_SignalStrength.bitErrorRate,
+                p_cur->GW_SignalStrength.timingAdvance,
+                p_cur->WCDMA_SignalStrength.signalStrength,
+                p_cur->WCDMA_SignalStrength.bitErrorRate,
+                p_cur->WCDMA_SignalStrength.rscp,
+                p_cur->WCDMA_SignalStrength.ecno,               
                 p_cur->LTE_SignalStrength.signalStrength,
                 p_cur->LTE_SignalStrength.rsrp,
                 p_cur->LTE_SignalStrength.rsrq,
                 p_cur->LTE_SignalStrength.rssnr,
                 p_cur->LTE_SignalStrength.cqi,
-                p_cur->LTE_SignalStrength.timingAdvance,
+                p_cur->LTE_SignalStrength.timingAdvance,                          
+                p_cur->CDMA_SignalStrength.dbm,
+                p_cur->CDMA_SignalStrength.ecio,
+                p_cur->EVDO_SignalStrength.dbm,
+                p_cur->EVDO_SignalStrength.ecio,
+                p_cur->EVDO_SignalStrength.signalNoiseRatio,
                 p_cur->TD_SCDMA_SignalStrength.signalStrength,
                 p_cur->TD_SCDMA_SignalStrength.bitErrorRate,
-                p_cur->TD_SCDMA_SignalStrength.rscp,
-                p_cur->WCDMA_SignalStrength.signalStrength,
-                p_cur->WCDMA_SignalStrength.bitErrorRate,
-                p_cur->WCDMA_SignalStrength.rscp,
-                p_cur->WCDMA_SignalStrength.ecno);
+                p_cur->TD_SCDMA_SignalStrength.rscp);
 #endif
         closeResponse;
 
@@ -4463,7 +4463,7 @@
         if (e != RIL_E_SUCCESS) {
             appendPrintBuf("%s fails by %s", printBuf, failCauseToString(e));
         }
-
+#if 0
         if ((pRI->token & RIL_TOKEN_MARK) == RIL_TOKEN_MARK) {
             printf("%s\n", printBuf ? printBuf : "unkonwn");
         } else if (((pRI->pCI->requestNumber == RIL_REQUEST_DEVICE_IDENTITY)
@@ -4479,7 +4479,7 @@
             }
         }
 
-#if 0
+
         if (fd < 0) {
             RLOGD ("RIL onRequestComplete: Command channel closed");
         }
@@ -6232,7 +6232,7 @@
                 while(recvfrom(server_socket_fd, buffer, LYNQ_SOCKET_BUFFER,0,(struct sockaddr*)&lynqClient_addr, &client_addr_length) != -1)//add while by hq for bug 760 2023/02/09
                 {
                     client_tmp = (lynq_client_t*)buffer;
-                    RLOGD("[LYNQ socketId] utoken=%d,request=%d,len=%d,param=%s",client_tmp->uToken,client_tmp->request,client_tmp->paramLen,client_tmp->param);
+                    RLOGI("[LYNQ socketId] utoken=%d,request=%d,len=%d,param=%s",client_tmp->uToken,client_tmp->request,client_tmp->paramLen,client_tmp->param);
                     //char test[36] = {};
                     //sprintf(test,"test okay len = %d",client_tmp->paramLen);
                     //sendto(server_socket_fd,test,strlen(test),0,(struct sockaddr*)&client_addr,client_addr_length);
@@ -6248,11 +6248,10 @@
                             continue;
                         }
                     }
-                    printf("argc =%d\n",argc);
                     argc = argc+1;
                     for(int t = 0;t<argc;t++)
                     {
-                        RLOGD("warren test argv[%d]=%s\n",t,argv[t]);
+                        RLOGI("warren test argv[%d]=%s\n",t,argv[t]);
                     }
                     COMMAND *command = find_command(argv[0]);
                     if(!command)
@@ -6349,17 +6348,15 @@
 }
 int LYNQ_RIL_respSocket(Parcel &p,RIL_Token t)
 {
-    RLOGD("LYNQ_RIL_respSocket send start");
     ssize_t sent = 0;
     RequestInfo *pRI = (RequestInfo *)t;
+    RLOGI("LYNQ_RIL_respSocket token [%x] event %d app_token %d",pRI->token,pRI->lynqEvent,pRI->uToken);
     if(pRI->lynqEvent!=2)
     {
-        RLOGD("this is internal event!!!");
         return -1;
     }
     int dataSize = p.dataSize();
-    const uint8_t* data = p.data();
-    RLOGD("lynqSocketSend RESPONSE!!!! ");
+    const uint8_t* data = p.data();  
     sent = sendto(server_socket_fd, data, dataSize, 0, (struct sockaddr *)&pRI->uClient_addr, sizeof(pRI->uClient_addr));
     if( sent < 0 )
     {
@@ -6371,20 +6368,14 @@
 }
 int LYNQ_RIL_respSocket_sp(Parcel &p,RequestInfo *pRI)
 {
-    RLOGD("LYNQ_RIL_respSocket send start");
-    int ret =0;
-    bool sendResult =false;
-    ssize_t sent = 0;
-    uint8_t dataLength[4];
-    int verify = 0x55aa;
+    ssize_t sent = 0;   
+    RLOGI("LYNQ_RIL_respSocket token [%x] event %d app_token %d",pRI->token,pRI->lynqEvent,pRI->uToken);    
     int dataSize = p.dataSize();
     const uint8_t* data = p.data();
     if(pRI->lynqEvent!=2)
     {
-        RLOGD("this is internal event!!!");
         return -1;
     }
-    RLOGD("lynqSocketSend RESPONSE!!!! ");
 
     sent = sendto(server_socket_fd, data, dataSize, 0, (struct sockaddr *)&pRI->uClient_addr, sizeof(pRI->uClient_addr));
     if( sent < 0 )
@@ -6434,6 +6425,7 @@
 
 int LYNQ_RIL_urcBroadcast(Parcel &p, int urc_id)
 {
+    printResponse;
     RLOGD("LYNQ_RIL_urcBroadcast send start");
     int ret =0;   
     ssize_t sent = 0;