From 25edb2d47854d9718f595b49d7dbdb9186e0f709 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 12 Sep 2024 21:11:42 +0800 Subject: [PATCH] =?utf8?q?#663,=E8=A7=A3=E5=86=B3=EF=BC=9A=E6=89=8B?= =?utf8?q?=E8=A1=A8=EF=BC=8CAPP=E5=BC=80=E5=90=AF=E6=B6=88=E6=81=AF?= =?utf8?q?=E6=8F=90=E9=86=92=E5=90=8E=EF=BC=8C=E6=89=8B=E8=A1=A8=E5=96=9D?= =?utf8?q?=E6=B0=B4=E6=8F=90=E9=86=92=E4=B8=8D=E5=BC=B9=E7=AA=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../service/msg_center/src/msg_center_customer.cpp | 4 ++-- .../src/notify/drinkReminder_notification.cpp | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 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 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!!"); } -- 2.17.1