gengxin
author@CHENG <2393524978@qq.com>
Fri, 28 Jun 2024 09:25:46 +0000 (17:25 +0800)
committer@CHENG <2393524978@qq.com>
Fri, 28 Jun 2024 09:25:46 +0000 (17:25 +0800)
2.sdk/sdk/gui/lv_watch/lv_apps/sms_msg/sms_msg.c
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c

index 710c938..79827f8 100644 (file)
@@ -448,24 +448,7 @@ void sms_msg_app_new_sms_info_ind(app_adp_new_sms_info_ind_t *sms_info)
                        && (false == mmi_health_measure_state_is_ui_measure())
                        #endif
                        )
-               {
-                       uint8_t volume = 0;
-                       
-               #ifdef __MMI_USER_PROFILE_SUPPORT__
-                       volume = mmi_user_profile_current_mode_new_sms_volume_get();
-               #else
-                       volume = query_current_volume();
-               #endif
-               #ifdef __MMI_NEW_SMS_SILENT_SUPPORT__
-                       if(0 != mmi_new_sms_silent_swtich_get())
-                               volume = 0;
-               #endif
-                       Hal_NFFS_File_Play_Onetime(AUDIO_SETTING_AUDIO_MSG, volume, NULL, 0);
-
-                       if(true == mmi_watch_vibrate_is_permitted())
-                       {
-                               Hal_Vibrator_Play_Onetime(NULL, 1000);
-                       }
+               {                       
                        if(0 == Hal_Pm_Get_State())
                        {
                                printf("sms_msg_list_update -----> onkey_wakeup\n");
@@ -507,19 +490,6 @@ void sms_msg_app_new_sms_info_ind(app_adp_new_sms_info_ind_t *sms_info)
        printf("yzmin --> %s, time = %s\n", __FUNCTION__,sms_info->time);
        printf("yzmin ----> data_len = %d, data = %s\n",sms_info->data_len,sms_info->data);
 
-       //for(uint8_t i = 0; i < strlen(sms_info->data); i++)
-       //{
-       //      printf("[@CHENG_DEBUG][%s][%d]: %d,%d\n", __FUNCTION__, __LINE__, i, sms_info->data[i]);
-       //}
-
-//#ifdef __MMI_ZHSX_SUPPORT_SMS__
-//     if(true == mmi_protocol_sms_content_parse(sms_info->data, sms_info->number))
-//     {
-//             printf("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__);
-//             return;
-//     }
-//#endif
-
     Hal_NFFS_File_Play_Onetime(AUDIO_SETTING_AUDIO_MSG, query_current_volume(), NULL, 0);
     Hal_Vibrator_Play_Onetime(NULL, 1000);
        if(0 == Hal_Pm_Get_State())
@@ -1036,6 +1006,27 @@ static void  del_msg_sure_btn_cb(lv_obj_t * btn,lv_event_t e)
 void sms_msg_list_update(void)
 {
        printf("%s\n", __FUNCTION__);
+
+#ifdef __MMI_ZHSX_SUPPORT__
+       uint8_t volume = 0;
+       
+#ifdef __MMI_USER_PROFILE_SUPPORT__
+       volume = mmi_user_profile_current_mode_new_sms_volume_get();
+#else
+       volume = query_current_volume();
+#endif
+#ifdef __MMI_NEW_SMS_SILENT_SUPPORT__
+       if(0 != mmi_new_sms_silent_swtich_get())
+               volume = 0;
+#endif
+       Hal_NFFS_File_Play_Onetime(AUDIO_SETTING_AUDIO_MSG, volume, NULL, 0);
+
+       if(true == mmi_watch_vibrate_is_permitted())
+       {
+               Hal_Vibrator_Play_Onetime(NULL, 800);
+       }
+#endif
+       
        if(is_sms_activity())
        {
                lv_obj_t * activity_obj = lv_watch_get_activity_obj(ACT_ID_SMS_MSG);
index e077378..7043308 100644 (file)
@@ -190,7 +190,7 @@ void * mmi_protocol_fzd_send_space_init(MMI_PROTOCOL_FZD_ACTION_ENUM action, int
         return NULL;
     }
 
-       s_send_space_struct[action].ptr = (void *)lv_mem_alloc(size);
+       s_send_space_struct[action].ptr = (void *)lv_mem_alloc(size + 1);
        if(NULL == s_send_space_struct[action].ptr)
        {
                PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__, action);
@@ -198,6 +198,7 @@ void * mmi_protocol_fzd_send_space_init(MMI_PROTOCOL_FZD_ACTION_ENUM action, int
                s_send_space_struct[action].size = 0;
                return NULL;
        }
+       _lv_memset_00(s_send_space_struct[action].ptr, (size + 1));
        s_send_space_struct[action].size = size;
 
        PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: ptr=0x%x\n", __FUNCTION__, __LINE__, s_send_space_struct[action].ptr);