From 8560f58fad331083031efbb0cc6392a5834b8893 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Thu, 22 Aug 2024 17:52:25 +0800 Subject: [PATCH] =?utf8?q?=E5=BC=B9=E7=AA=97=E5=A2=9E=E5=8A=A0=E4=BC=98?= =?utf8?q?=E5=85=88=E7=BA=A7=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../msg_center/src/msg_center_customer.cpp | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) 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 d2866b960..0738afc09 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 @@ -373,7 +373,10 @@ void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req) } else { - NotificationManager::GetInstance()->ShowNotify(ShowChargeingNotify, (uint16_t)topic, true); + if (CheckPriority(topic)) + { + NotificationManager::GetInstance()->ShowNotify(ShowChargeingNotify, (uint16_t)topic, true); + } } } @@ -433,8 +436,11 @@ void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req) display_api->set_screen_set_keepon_timeout(1000*5); set_lowpower_falg(0); - NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO); - NotificationManager::GetInstance()->ShowNotify(showlowpowerNotify, (uint16_t)topic, true); + if (CheckPriority(topic)) + { + NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO); + NotificationManager::GetInstance()->ShowNotify(showlowpowerNotify, (uint16_t)topic, true); + } } else { @@ -448,9 +454,11 @@ void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req) set_lowpower_falg(1); if (NotificationManager::GetInstance()->HasNotifyShowing()) NotificationManager::GetInstance()->StopNotify(); - + if (CheckPriority(topic)) + { NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_ONE); NotificationManager::GetInstance()->ShowNotify(showlowpowerNotify, (uint16_t)topic, true); + } } @@ -708,6 +716,7 @@ void MsgCenterNotifyMessageProc(const Topic topic, Request* req) unused(req); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyMessageProc !"); if (CheckPriority(topic)) { + NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_THREE); NotificationManager::GetInstance()->ShowNotify(showMessageNotify, (uint16_t)topic, true); } } @@ -730,8 +739,10 @@ void MsgCenterNotifySleepProc(const Topic topic, Request* req) { NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_THREE); } - - NotificationManager::GetInstance()->ShowNotify(showSleepNotify, (uint16_t)topic, true); + if (CheckPriority(topic)) + { + NotificationManager::GetInstance()->ShowNotify(showSleepNotify, (uint16_t)topic, true); + } } #endif @@ -1151,8 +1162,12 @@ void MsgCenterNotifyArAlertProc(const Topic topic, Request* req) { return; } - MotionRecognitionViewEventListener::GetInstance().SetMotionTypeId(*motionType); - NotificationManager::GetInstance()->ShowNotify(showMotionRecognitionNotify, (uint16_t)topic, true); + if (CheckPriority(topic)) + { + MotionRecognitionViewEventListener::GetInstance().SetMotionTypeId(*motionType); + NotificationManager::GetInstance()->ShowNotify(showMotionRecognitionNotify, (uint16_t)topic, true); + } + } void MsgCenterNotifyInactivityProc(const Topic topic, Request *req) @@ -1195,7 +1210,10 @@ void MsgCenterNotifyInactivityProc(const Topic topic, Request *req) case INACTIVITY_MODE_SEDENTARY_OUTPUT: if(cywee_Inactivity_Info->status == 1) { - NotificationManager::GetInstance()->ShowNotify(showSedentaryReminderNotify, (uint16_t)topic, true); + if (CheckPriority(topic)) + { + NotificationManager::GetInstance()->ShowNotify(showSedentaryReminderNotify, (uint16_t)topic, true); + } } else if(cywee_Inactivity_Info->status==9) { -- 2.17.1