[Bugfix][T800][task-view-329] first ecall  after reboot no voice

    Only Configure: No
    Affected branch: unknown
    Affected module: network
    Is it affected on both ZXIC and MTK: only MTK
    Self-test: yes
    Doc Update: no

Change-Id: I656f8062bcaf6d15d2aba80a83677a43606b4fda
diff --git a/common_src/lib/liblynq-call/lynq_call.cpp b/common_src/lib/liblynq-call/lynq_call.cpp
index 0b7e385..43936e7 100755
--- a/common_src/lib/liblynq-call/lynq_call.cpp
+++ b/common_src/lib/liblynq-call/lynq_call.cpp
@@ -1015,7 +1015,7 @@
     } 

     else 

     {

-        LYINFLOG("System uptime is less than 40 seconds.");

+        LYERRLOG("System uptime is less than 40 seconds.");

         FILE *fp = NULL;

         if(check_file_access(CALL_REBOOT_FLAG) != 0)

         {

@@ -1033,6 +1033,17 @@
     return 0;

 

 }

+

+int lynq_call_pre_confirm(int call_type)

+{

+    try_reset_audio_service();

+

+#ifdef GSW_RIL_CFG

+    call_boot_check();

+#endif

+    return RESULT_OK;

+}

+

 int lynq_call(int* handle,char addr[])

 {

     if(g_module_init_flag != MODULE_RUNNING)

@@ -1040,11 +1051,8 @@
         LYERRLOG("%s module state %d error",__func__,g_module_init_flag);

         return LYNQ_E_CONFLICT;

     }

-    try_reset_audio_service();

-

-#ifdef GSW_RIL_CFG

-    call_boot_check();

-#endif

+    

+    (void) lynq_call_pre_confirm(call_type_mo);

 

     int lynq_call_id = -1;

 

@@ -1111,6 +1119,8 @@
         return LYNQ_E_CONFLICT;

     }   

 

+    (void) lynq_call_pre_confirm(call_type_mt);

+

     Parcel* p=NULL;    

     int ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_ANSWER,0,"");

     if(ret==RESULT_OK)

diff --git a/common_src/lib/liblynq-call/lynq_call_ecall.cpp b/common_src/lib/liblynq-call/lynq_call_ecall.cpp
index 3471245..ce60074 100755
--- a/common_src/lib/liblynq-call/lynq_call_ecall.cpp
+++ b/common_src/lib/liblynq-call/lynq_call_ecall.cpp
@@ -291,6 +291,8 @@
     RIL_ECall_Category ril_ecall_cat = lynq_get_ril_ecall_cat_from_lynq_cat(lynq_ecall_cat);

     char lynq_msd_data[MSD_MAX_LENGTH*2+1]={0};

     unsigned int i;          

+

+    (void) lynq_call_pre_confirm(call_type_mo);

    

     if(msd_length > MSD_MAX_LENGTH || msd_length <=0 || lynq_ecall_variant >=LYNQ_ECALL_MO_MAX)

     {

diff --git a/common_src/lib/liblynq-call/lynq_module_common.h b/common_src/lib/liblynq-call/lynq_module_common.h
index b82b2d8..471814f 100755
--- a/common_src/lib/liblynq-call/lynq_module_common.h
+++ b/common_src/lib/liblynq-call/lynq_module_common.h
@@ -92,6 +92,10 @@
 #define MODULE_SWITCHING  (1)

 #define MODULE_RUNNING (2)

 

+#define call_type_mo (0)

+#define call_type_mt (1)

+int lynq_call_pre_confirm(int call_type);

+

 extern int g_module_init_flag;

 

 #endif