gengxin
author@CHENG <2393524978@qq.com>
Wed, 6 Mar 2024 08:29:56 +0000 (16:29 +0800)
committer@CHENG <2393524978@qq.com>
Wed, 6 Mar 2024 08:29:56 +0000 (16:29 +0800)
2.sdk/sdk/gui/lv_watch/lv_apps/phone/phone.c
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.c
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.h

index 49232c1..f3c2bdf 100644 (file)
@@ -60,7 +60,7 @@ extern phone_call_params_t  call_params;
 ***********************/
 #ifdef __MMI_ZHSX_SUPPORT__
 
-#define MMI_AUTO_ANSWER_TIMEOUT (1000 * 5) // ms
+#define MMI_AUTO_ANSWER_TIMEOUT (1000 * 10) // ms
 
 static TIMER_ID s_auto_answer_timer_id = NULL;
 
index c7b7b1c..48f90a7 100644 (file)
@@ -21,6 +21,7 @@ static MMI_PROTOCOL_SMS_PARSE_STRUCT s_sms_parse_info[] =
  /* Function not verified */   {"SETAPN:", 7, mmi_protocol_sms_parse_set_apn}, /* Function not verified */
        {"ts#", 3, mmi_protocol_sms_parse_get_info},
        {"TS#", 3, mmi_protocol_sms_parse_get_info},
+       {"SETWHITEPHB:", 12, mmi_protocol_sms_parse_set_white_list_switch},
 
 
        /*******add before this line*******/
@@ -600,6 +601,42 @@ bool mmi_protocol_sms_parse_get_info(char * fixed_str, char * data, char * numbe
        return true;
 }
 
+//SETWHITEPHB:0 / 1
+static uint32_t white_list_switch = 0;
+static void mmi_protocol_sms_set_white_list_switch_cb(watch_app_adp_sms_send_result_type_t result)
+{
+       SMS_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: %d\n", __FUNCTION__, __LINE__, result);
+       
+       if(APP_SMS_SEND_SUCCESS == result)
+       {
+               mmi_white_list_switch_set(white_list_switch);
+       }
+       else if(APP_SMS_SEND_FAIL == result)
+       {
+               //
+       }
+}
+
+bool mmi_protocol_sms_parse_set_white_list_switch(char * fixed_str, char * data, char * number)
+{
+       SMS_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: num=%s\n", __FUNCTION__, __LINE__, number);
+       SMS_DEBUG_PRINTF("[@CHENG_DEBUG][%d]: %s\n", __LINE__, data);
+       
+       if(0 == strlen(data))
+       {
+               SMS_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
+               return false;
+       }
+       
+       if(0 == atoi(data))
+               white_list_switch = 0;
+       else
+               white_list_switch = 2;
+
+       mmi_protocol_sms_parse_sms_reply(NULL, fixed_str, number, mmi_protocol_sms_set_white_list_switch_cb);
+
+       return true;
+}
 
 
 #endif
index 903c1cd..6b9d005 100644 (file)
@@ -52,6 +52,7 @@ bool mmi_protocol_sms_parse_get_imei(char * fixed_str, char * data, char * numbe
 bool mmi_protocol_sms_parse_unbind(char * fixed_str, char * data, char * number);
 bool mmi_protocol_sms_parse_set_apn(char * fixed_str, char * data, char * number);
 bool mmi_protocol_sms_parse_get_info(char * fixed_str, char * data, char * number);
+bool mmi_protocol_sms_parse_set_white_list_switch(char * fixed_str, char * data, char * number);
 
 
 #ifdef __cplusplus