[Feature][ZXW-298][DATA]add uci feedback on the status of APN
Only Configure: No
Affected branch: master
Affected module: DATA
Is it affected on both ZXIC and MTK: ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I1bdf728d7433465598712d051f3ada1af634e60b
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.cpp
index c00501e..a9d44b2 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.cpp
@@ -168,7 +168,7 @@
static int net_id = 1000;
int ims_type_in_db = 0;
-
+int g_default_apnflag = 0;//jb.qi change for apn status uci on 20240605
static int data_call_num = 0;
RIL_Data_Call_Response_v6 *data_call_response = NULL;
@@ -1527,6 +1527,8 @@
{
int i = 0;
int pdp_count = 0;
+ int ret = 0; //jb.qi change for apn status uci on 20240605
+ int ret1 = 0;//jb.qi change for apn status uci on 20240605
RLOGD("in updateRILDataCallResponsev11");
if(num != 1)
{
@@ -1555,7 +1557,15 @@
lynq_apn_cid_table[j].status = (int)p_cur[i].status;
memcpy(lynq_apn_cid_table[j].address, p_cur[i].addresses, strlen(p_cur[i].addresses) + 1);
lynq_apn_cid_table[j].dialing = 0;
- //break;
+ /*jb.qi change for apn status uci start on 20240605*/
+ ret = strcmp(lynq_apn_cid_table[j].apntype, "iot_default");
+ ret1 = strcmp(lynq_apn_cid_table[j].apntype, "default");
+ if(ret == 0 || ret1 == 0)
+ {
+ lynq_set_value("lynq_apn","apn_status","1");
+ g_default_apnflag = 1;
+ }
+ /*jb.qi change for apn status uci end on 20240605*/
}
else
{
@@ -1673,6 +1683,11 @@
void handleUnsolDataCalllistChange(int num ,RIL_Data_Call_Response_v11* p_cur){
int i;
int pdp_count = 0;
+ /*jb.qi change for apn status uci start on 20240605*/
+ int apn_status = 0;
+ int ret = 0;
+ int ret1 = 0;
+ /*jb.qi change for apn status uci end on 20240605*/
RLOGD("num = %d, apn_count = %d", num, apn_count);
for(int j = 0; j < LYNQ_APN_CHANNEL_MAX; j++)
{
@@ -1747,9 +1762,28 @@
lynq_apn_cid_table[i].dialing);
if(lynq_apn_cid_table[i].cid != -1)
{
+ /*jb.qi change for apn status uci start on 20240605*/
+ if(g_default_apnflag == 1)
+ {
+ ret = strcmp(lynq_apn_cid_table[i].apntype, "iot_default");
+ ret1 = strcmp(lynq_apn_cid_table[i].apntype, "default");
+ if(ret == 0 || ret1 == 0)
+ {
+ apn_status = 1;
+ }
+ }
+ /*jb.qi change for apn status uci end on 20240605*/
pdp_count++;
}
}
+ /*jb.qi change for apn status uci start*/
+ if((apn_status == 0) && (g_default_apnflag == 1))
+ {
+ RLOGD("default apnstatus is 0");
+ lynq_set_value("lynq_apn","apn_status","0");
+ g_default_apnflag = 0;
+ }
+ /*jb.qi change for apn status uci end*/
if(pdp_count == 0)
{
#ifdef LED_SUPPORT
@@ -2022,3 +2056,4 @@
resetApnDB();
return 0;
}
+
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
index 8b24996..aabd1ba 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
@@ -34,6 +34,9 @@
config 1 'sdk_ready'
+config lynq_apn 'lynq_apn'
+ option apn_status '0'
+
config lynq_led_rw 'lynq_led'
option lynq_statusled_on '0'
- option lynq_netled_on '0'
\ No newline at end of file
+ option lynq_netled_on '0'