From: @CHENG <2393524978@qq.com> Date: Wed, 6 Mar 2024 08:29:56 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=615100a45a44c4201c1e0c6e9eaeb6e3d6a35445;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/phone/phone.c b/2.sdk/sdk/gui/lv_watch/lv_apps/phone/phone.c index 49232c15..f3c2bdf5 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/phone/phone.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/phone/phone.c @@ -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; diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.c b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.c index c7b7b1cf..48f90a7c 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.c @@ -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 diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.h b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.h index 903c1cda..6b9d005a 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.h +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_sms.h @@ -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