From: hcj <1224667075@qq.com> Date: Fri, 23 Aug 2024 03:06:08 +0000 (+0800) Subject: 修复弹窗可能无法显示BUG X-Git-Tag: release_V1.2.70_20241020_135402~600 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F772%2F2;p=mirrors%2FFD230.git 修复弹窗可能无法显示BUG --- diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index 0738afc09..6aab98aa2 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -410,7 +410,7 @@ void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req) void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req) { //unused(req); - unused(topic); + // unused(topic); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: LowPower Alarm !"); //if(req->data); uint8 *x= (uint8 *)(req->data); @@ -712,7 +712,7 @@ void MsgCenterNotifyStaticHeartRateProc(const Topic topic, Request* req) //消息通知 void MsgCenterNotifyMessageProc(const Topic topic, Request* req) { - unused(topic); + //unused(topic); unused(req); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyMessageProc !"); if (CheckPriority(topic)) { @@ -725,7 +725,9 @@ void MsgCenterNotifyMessageProc(const Topic topic, Request* req) void MsgCenterNotifySleepProc(const Topic topic, Request* req) { unused(req); - unused(topic); + // unused(topic); + if (CheckPriority(topic)) + { WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifySleepProc %d!",SleepModel::GetInstance().get_sleep_state()); @@ -739,8 +741,7 @@ void MsgCenterNotifySleepProc(const Topic topic, Request* req) { NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_THREE); } - if (CheckPriority(topic)) - { + NotificationManager::GetInstance()->ShowNotify(showSleepNotify, (uint16_t)topic, true); } @@ -1042,10 +1043,13 @@ void MsgCenterNotifyFindWatchProc(const Topic topic, Request* req) { unused(req); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyFindWatchProc !"); - FindWatchViewEventListener::GetInstance().SetFindWatchNotifyFlag(true); - FindWatchViewEventListener::GetInstance().PopInterPlayMusic(nullptr);//播放铃声 - NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO); - NotificationManager::GetInstance()->ShowNotify(showFindWatchNotify, (uint16_t)topic, true); + if (CheckPriority(topic)) + { + FindWatchViewEventListener::GetInstance().SetFindWatchNotifyFlag(true); + FindWatchViewEventListener::GetInstance().PopInterPlayMusic(nullptr);//播放铃声 + NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO); + NotificationManager::GetInstance()->ShowNotify(showFindWatchNotify, (uint16_t)topic, true); + } } //取消查找手表通知 @@ -1064,11 +1068,15 @@ void MsgCenterNotifyCanCelFindWatchProc(const Topic topic, Request* req) //喝水提醒通知 void MsgCenterNotifyDrinkReminderProc(const Topic topic, Request *req) { - unused(topic); + // unused(topic); unused(req); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyDrinkReminderProc !"); DrinkReminderViewEventListener::GetInstance().set_screen_on_and_vibration(); - NotificationManager::GetInstance()->ShowNotify(showDrinkReminderNotify, (uint16_t)topic, true); + if (CheckPriority(topic)) + { + NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO); + NotificationManager::GetInstance()->ShowNotify(showDrinkReminderNotify, (uint16_t)topic, true); + } } //每日训练数据刷新 void MsgCenterNotifyActivityProc(const Topic topic, Request* req) @@ -1173,7 +1181,7 @@ void MsgCenterNotifyArAlertProc(const Topic topic, Request* req) void MsgCenterNotifyInactivityProc(const Topic topic, Request *req) { WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyInactivityProc !"); - unused(topic); + //unused(topic); #ifdef FD230 if(day_timestamp == 0) { @@ -1212,6 +1220,7 @@ void MsgCenterNotifyInactivityProc(const Topic topic, Request *req) { if (CheckPriority(topic)) { + NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO); NotificationManager::GetInstance()->ShowNotify(showSedentaryReminderNotify, (uint16_t)topic, true); } }