From: luozheng <1732036298@qq.com> Date: Thu, 12 Sep 2024 13:11:42 +0000 (+0800) Subject: #663,解决:手表,APP开启消息提醒后,手表喝水提醒不弹窗bug X-Git-Tag: release_V1.2.70_20241020_135402~485^2^2~12 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=25edb2d47854d9718f595b49d7dbdb9186e0f709;p=mirrors%2FFD230.git #663,解决:手表,APP开启消息提醒后,手表喝水提醒不弹窗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 2f1ddd19d..0ff8da9f4 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 @@ -121,7 +121,7 @@ const PriorityMapper PRI_MAPPER[] = { #endif {TOPIC_EVENT_FIND_WATCH,PRIORITY_TWO},// 找手表 [2] {TOPIC_EVENT_CANCEL_FIND_WATCH,PRIORITY_TWO},// 取消找手表 [2] - {TOPIC_EVENT_DRINKREMINDER,PRIORITY_THREE},//喝水提醒 [3] + {TOPIC_EVENT_DRINKREMINDER,PRIORITY_TWO},//喝水提醒 [2] {TOPIC_EVENT_MESSAGENOTE,PRIORITY_THREE},//消息提醒 [3] {TOPIC_EVENT_MESSAGE_UPDATA,PRIORITY_TWO},//消息更新提醒 [3] {TOPIC_EVENT_SLEEPNOTE,PRIORITY_THREE},//睡眠弹窗 [3] @@ -1126,7 +1126,7 @@ void MsgCenterNotifyDrinkReminderProc(const Topic topic, Request *req) // unused(topic); unused(req); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyDrinkReminderProc !"); - DrinkReminderViewEventListener::GetInstance().set_screen_on_and_vibration(); + // DrinkReminderViewEventListener::GetInstance().set_screen_on_and_vibration(); if (CheckPriority(topic)) { NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO); diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/drinkReminder_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/drinkReminder_notification.cpp index f7db40c09..0d5b33766 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/drinkReminder_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/drinkReminder_notification.cpp @@ -16,7 +16,8 @@ #include #include "vibrator_service.h" #include "../../../../../../../drivers/peripheral/utils/custom_runtime.h" - +#include +#include "../../../../../../drivers/peripheral/vibrator/service/vibrator_service.h" namespace OHOS { @@ -209,6 +210,15 @@ namespace OHOS DrinkReminderGroupView->Add(DrinkReminderButton); DrinkReminderGroupView->Add(DrinkReminderLabel); + /* -------------------------------------------------------------------------- */ + if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) + { + ui_api_vibrate_once_func(); // 震动一次 + } + + ScreenTurnOn(10 * 1000); // 亮屏操作 10秒关闭 + /* -------------------------------------------------------------------------- */ + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Create DrinkReminderView succeed!!"); }