消息:更正消息的优先级
authorCaisking <3449750381@qq.com>
Thu, 12 Dec 2024 08:03:50 +0000 (16:03 +0800)
committerCaisking <3449750381@qq.com>
Thu, 12 Dec 2024 08:03:50 +0000 (16:03 +0800)
code/sdk/application/wearable/fd230app/nativeui/message/src/MessageModel.cpp
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp

index 4954658..aae7a45 100644 (file)
@@ -202,9 +202,9 @@ static void Notify(void *args, const Topic topic, Request *request) {
         }
 
 
-        // CustomEventPublish(TOPIC_EVENT_MESSAGENOTE, NULL, 0);
+        CustomEventPublish(TOPIC_EVENT_MESSAGENOTE, NULL, 0);
 
-        show_notify_messgae();
+        // show_notify_messgae();
 
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Message popup sent");  
 
index d5c0eb6..68d00d7 100644 (file)
@@ -996,11 +996,14 @@ 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)) {
-    do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_MESSAGE_DATA_NOTIFY, nullptr, 0); 
+      // do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_MESSAGE_DATA_NOTIFY,
+      // nullptr, 0);
+      OHOS::NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_THREE);
+      OHOS::NotificationManager::GetInstance()->ShowNotify(OHOS::CreateMessageView, TOPIC_EVENT_MESSAGENOTE, true);
     }
 }