#ifdef __MMI_ZHSX_SUPPORT__
+static void mmi_sms_vib_prompt_task_cb(lv_task_t * task)
+{
+ Hal_Vibrator_Play_End();
+}
+
void sms_msg_app_new_sms_info_ind(app_adp_new_sms_info_ind_t *sms_info)
{
if(sms_info == NULL)
watch_wakeup_time_reset();
}
+ #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
+ if(0 != volume)
+ {
+ 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);
+ lv_task_t * task_ptr = lv_task_create(mmi_sms_vib_prompt_task_cb, 900, LV_TASK_PRIO_MID, NULL);
+ lv_task_once(task_ptr);
+ }
+ #endif
+
//notify ui
app_adaptor_recv_sms_notsify_update_ui();
}
}
}
-static void mmi_sms_vib_prompt_task_cb(lv_task_t * task)
-{
- Hal_Vibrator_Play_End();
-}
-
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);
-
- Hal_Vibrator_Play_End();
- if(true == mmi_watch_vibrate_is_permitted())
- {
- Hal_Vibrator_Play_Onetime(NULL, 800);
- lv_task_t * task_ptr = lv_task_create(mmi_sms_vib_prompt_task_cb, 900, LV_TASK_PRIO_MID, NULL);
- lv_task_once(task_ptr);
- }
-#endif
if(is_sms_activity())
{