[BugFix][T800][task-view-137]free dataconnection before reporting the PDN_DISCONNECTED

    Only Configure: Yes
    Affected branch: All
    Affected module: Data
    Is it affected on both ZXIC and MTK: only MTK
    Self-test: Yes
    Doc Update: No

Change-Id: Iab3b23578d91fddfb0705d7a9612b80d5e00aeee
diff --git a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/data/DcTracker.cpp b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/data/DcTracker.cpp
index 0f3917d..96d2901 100755
--- a/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/data/DcTracker.cpp
+++ b/IC_src/mtk/telephonyware/3.0/libvendor-ril/mtk-rilproxy/telephony/data/DcTracker.cpp
@@ -320,8 +320,11 @@
     ApnContext *apnContext = DcTracker::mApnContexts.find(apnType)->second;
     DataConnection *currentDataConnection = apnContext->getDataConnection();
 
+    //xy.he modified for task-view-137 on 20240808 started
     //the old connection is invalid.
-    apnContext->setSate(RIL_Data_Call_PdnState::PDN_DISCONNECTED);
+    //apnContext->setSate(RIL_Data_Call_PdnState::PDN_DISCONNECTED);
+    //xy.he modified for task-view-137 on 20240808 ended
+    
 
     if (currentDataConnection != NULL) {
         RFX_LOG_D(RFX_LOG_TAG, "onDeactiveConnectionCompleted, free data connection with info: %s .",
@@ -351,6 +354,11 @@
     }
 
     apnContext->setDataConnection(NULL);
+
+    //xy.he modified for task-view-137 on 20240808 started
+    //the old connection is invalid.
+    apnContext->setSate(RIL_Data_Call_PdnState::PDN_DISCONNECTED);
+    //xy.he modified for task-view-137 on 20240808 ended
     //the current apn setting should be invalid.
     apnContext->getApnSetting().clear();
     // remove the record