[Bugfix]API-250

Change-Id: Ic54ed79e90ff7147dd61f52fe72935ed507e17e4
diff --git a/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h b/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
index e4a242d..bc12950 100755
--- a/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
+++ b/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
@@ -60,7 +60,7 @@
 int lynq_query_registration_state(const char *type,int* regState,int* imsRegState,char * LAC,char * CID,int *netType,int *radioTechFam,int *netRejected);

 int lynq_query_prefferred_networktype(int *preNetType);

 int lynq_set_prefferred_networktype(const int preffertype);

-int lynq_query_cell_info(int cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int * realNum);

+int lynq_query_cell_info(int cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int earfcn[CELLINFO_MAX_NUM],int * realNum);

 int lynq_set_unsol_cell_info_listrate(const int rate);

 int lynq_set_band_mode(const int bandmode);

 int lynq_query_available_bandmode(int availBanMode[]);

diff --git a/src/lynq/lib/liblynq-network/lynq_network.cpp b/src/lynq/lib/liblynq-network/lynq_network.cpp
index a67b4dd..3f5dbe6 100755
--- a/src/lynq/lib/liblynq-network/lynq_network.cpp
+++ b/src/lynq/lib/liblynq-network/lynq_network.cpp
@@ -340,7 +340,7 @@
     return 0;

 }

 

-int copyCellInfoList(Parcel &p,int *cellinfo,int *tac)

+int copyCellInfoList(Parcel &p,int *cellinfo,int *tac,int *earfcn)

 {

     int32_t v=0;

     int64_t v6=0;

@@ -369,6 +369,7 @@
             p.readInt32(&nothing);

             p.readInt32(&nothing);

             tac = &nothing;

+            earfcn = &nothing;

             break;

         }

         case RIL_CELL_INFO_TYPE_WCDMA: {

@@ -380,6 +381,7 @@
             p.readInt32(&nothing);

             p.readInt32(&nothing);

             tac = &nothing;

+            earfcn = &nothing;

             break;

         }

         case RIL_CELL_INFO_TYPE_CDMA: {

@@ -395,6 +397,7 @@
             p.readInt32(&nothing);

             cellinfo = 0;

             tac = &nothing;

+            earfcn = &nothing;

             break;

         }

         case RIL_CELL_INFO_TYPE_LTE: {

@@ -403,6 +406,7 @@
             p.readInt32(cellinfo);

             p.readInt32(&nothing);

             p.readInt32(tac);

+            p.readInt32(earfcn);

             p.readInt32(&nothing);

             p.readInt32(&nothing);

             p.readInt32(&nothing);

@@ -418,6 +422,8 @@
             p.readInt32(cellinfo);

             p.readInt32(&nothing);

             p.readInt32(&nothing);

+            tac = &nothing;

+            earfcn = &nothing;

             break;

         }

         case RIL_CELL_INFO_TYPE_NR: {

@@ -426,7 +432,7 @@
             p.readInt32(cellinfo);

             p.readInt32(&nothing);

             p.readInt32(tac);

-            p.readInt32(&nothing);

+            p.readInt32(earfcn);

             p.readInt32(&nothing);

             p.readInt32(&nothing);

             p.readInt32(&nothing);

@@ -437,6 +443,8 @@
         }

     }

     LYINFLOG("CID in fUNC :%d",*cellinfo);

+    LYINFLOG("tac in fUNC :%d",*tac);

+    LYINFLOG("earfcn in fUNC :%d",*earfcn);

     return 0;

 }

 

@@ -939,7 +947,7 @@
 

 }

 

-int lynq_query_cell_info(int cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int * realNum)

+int lynq_query_cell_info(int cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int earfcn[CELLINFO_MAX_NUM],int * realNum)

 {

     int ret = -1;

     if(NULL == realNum)

@@ -989,7 +997,7 @@
         *realNum = num;

         for(int i = 0;i<num;i++)

         {

-            copyCellInfoList(p,&cellinfo[i],&tac[i]);

+            copyCellInfoList(p,&cellinfo[i],&tac[i],&earfcn[i]);

         }

     }

     return response.error;

diff --git a/src/telephonyware/3.0/libvendor-ril/include/telephony/ril.h b/src/telephonyware/3.0/libvendor-ril/include/telephony/ril.h
old mode 100644
new mode 100755
index 73bfefc..b780a39
--- a/src/telephonyware/3.0/libvendor-ril/include/telephony/ril.h
+++ b/src/telephonyware/3.0/libvendor-ril/include/telephony/ril.h
@@ -1199,6 +1199,9 @@
     int ci;     /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
     int pci;    /* physical cell id 0..503, INT_MAX if unknown  */
     int tac;    /* 16-bit tracking area code, INT_MAX if unknown  */
+    /*Typethree add for T800 earfcn 2022/05/31 start*/
+    int earfcn; /* 18-bit LTE Absolute RF Channel Number; this value must be reported */
+    /*Typethree add for T800 earfcn 2022/05/31 end*/
 } RIL_CellIdentityLte;
 
 /** RIL_CellIdentityTdscdma */
diff --git a/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxParcelTransferUtils.cpp b/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxParcelTransferUtils.cpp
old mode 100644
new mode 100755
index bac1102..9cce323
--- a/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxParcelTransferUtils.cpp
+++ b/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxParcelTransferUtils.cpp
@@ -693,6 +693,9 @@
                 new_parcel->writeInt32(tmp_value);
                 /*CellInfo.lte.cellIdentityLte.earfcn  -diff*/
                 old_parcel->readInt32(&tmp_value);
+                /*Typethree add for T800 earfcn 2022/05/30 start*/
+                new_parcel->writeInt32(tmp_value);
+                /*Typethree add for T800 earfcn 2022/05/30 end*/
 
                 /*CellInfo.lte.cellIdentityLte.operName.longname  -diff*/
                 /*CellInfo.lte.cellIdentityLte.operName.shortname  -diff*/
diff --git a/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxTransferUtils.cpp b/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxTransferUtils.cpp
old mode 100644
new mode 100755
index dd95982..bd5e781
--- a/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxTransferUtils.cpp
+++ b/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/framework/base/RfxTransferUtils.cpp
@@ -3348,6 +3348,9 @@
                     p->readInt32(&entries[i].CellInfo.lte.cellIdentityLte.ci);
                     p->readInt32(&entries[i].CellInfo.lte.cellIdentityLte.pci);
                     p->readInt32(&entries[i].CellInfo.lte.cellIdentityLte.tac);
+                    /*Typethree add for T800 earfcn 2022/05/31 start*/
+                    p->readInt32(&entries[i].CellInfo.lte.cellIdentityLte.earfcn);
+                    /*Typethree add for T800 earfcn 2022/05/31 end*/
                     p->readInt32(&entries[i].CellInfo.lte.signalStrengthLte.signalStrength);
                     p->readInt32(&entries[i].CellInfo.lte.signalStrengthLte.rsrp);
                     p->readInt32(&entries[i].CellInfo.lte.signalStrengthLte.rsrq);
@@ -3361,6 +3364,9 @@
                     appendPrintBuf("ci=%X,",  entries[i].CellInfo.lte.cellIdentityLte.ci);
                     appendPrintBuf("pci=%d,", entries[i].CellInfo.lte.cellIdentityLte.pci);
                     appendPrintBuf("tac=%X,", entries[i].CellInfo.lte.cellIdentityLte.tac);
+					/*Typethree add for T800 earfcn 2022/05/31 start*/
+                    appendPrintBuf("earfcn=%d,", entries[i].CellInfo.lte.cellIdentityLte.earfcn);
+					/*Typethree add for T800 earfcn 2022/05/31 end*/
                     appendPrintBuf("signalStrength=%d,", entries[i].CellInfo.lte.signalStrengthLte.signalStrength);
                     appendPrintBuf("rsrp=%d,", entries[i].CellInfo.lte.signalStrengthLte.rsrp);
                     appendPrintBuf("rsrq=%d,", entries[i].CellInfo.lte.signalStrengthLte.rsrq);
diff --git a/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/nw/RpNwStateController.cpp b/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/nw/RpNwStateController.cpp
old mode 100644
new mode 100755
index d0fee80..167648e
--- a/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/nw/RpNwStateController.cpp
+++ b/src/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/nw/RpNwStateController.cpp
@@ -1205,7 +1205,9 @@
                 p->readInt32(&cellInfo.CellInfo.lte.cellIdentityLte.ci);
                 p->readInt32(&cellInfo.CellInfo.lte.cellIdentityLte.pci);
                 p->readInt32(&cellInfo.CellInfo.lte.cellIdentityLte.tac);
-
+                /*Typethree add for T800 earfcn 2022/05/30 start*/
+                p->readInt32(&cellInfo.CellInfo.lte.cellIdentityLte.earfcn);
+                /*Typethree add for T800 earfcn 2022/05/30 end*/
                 p->readInt32(&cellInfo.CellInfo.lte.signalStrengthLte.signalStrength);
                 p->readInt32(&cellInfo.CellInfo.lte.signalStrengthLte.rsrp);
                 p->readInt32(&cellInfo.CellInfo.lte.signalStrengthLte.rsrq);