From 2215e47be59562713c5410848bd5216e54121d45 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sun, 29 Sep 2024 14:50:50 +0800 Subject: [PATCH] =?utf8?q?=E5=96=9D=E6=B0=B4=E6=8F=90=E9=86=92=EF=BC=8C?= =?utf8?q?=E8=BF=90=E5=8A=A8=E8=AF=86=E5=88=AB=EF=BC=8C=E9=85=8D=E5=AF=B9?= =?utf8?q?=EF=BC=8C=E4=B9=85=E5=9D=90=E6=8F=90=E9=86=92(=E6=B7=BB=E5=8A=A0?= =?utf8?q?=E9=9C=87=E5=8A=A8=E5=92=8C10s=E6=97=B6=E9=95=BF)=EF=BC=8C?= =?utf8?q?=E6=B7=BB=E5=8A=A0=E5=8F=96=E6=B6=88=E4=BA=AE=E5=B1=8F=E6=93=8D?= =?utf8?q?=E4=BD=9C=EF=BC=8C=E9=98=B2=E6=AD=A2=E5=85=B6=E4=BB=96=E7=95=8C?= =?utf8?q?=E9=9D=A2=E8=AE=BE=E7=BD=AE=E4=BA=AE=E5=B1=8F=E6=97=B6=E9=95=BF?= =?utf8?q?=E4=B8=8D=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../msg_center/src/notify/drinkReminder_notification.cpp | 1 + .../src/notify/motion_recognition_notification.cpp | 3 ++- .../service/msg_center/src/notify/pairing_notification.cpp | 4 +++- .../src/notify/sedentaryReminder_notification.cpp | 7 +++++++ 4 files changed, 13 insertions(+), 2 deletions(-) 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 0d5b33766..7cb4f9b81 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 @@ -253,6 +253,7 @@ namespace OHOS delete DrinkReminderGroupView; DrinkReminderGroupView = nullptr; WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Free DrinkReminderView succeed!!"); + ScreenTurnOff(); } return; } diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/motion_recognition_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/motion_recognition_notification.cpp index c4c9770a0..3a7908fb9 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/motion_recognition_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/motion_recognition_notification.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-08-17 16:44:20 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-20 11:01:16 + * @LastEditTime: 2024-09-29 14:36:18 * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/motion_recognition_notification.cpp */ #include "notification_manager.h" @@ -374,6 +374,7 @@ namespace OHOS delete MotionRecognitionGroupView; MotionRecognitionGroupView = nullptr; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Free MotionRecognitionView succeed!!"); + ScreenTurnOff(); } return; } diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp index fac9a6c3d..0d2d95498 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-22 10:04:36 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-11 17:27:05 + * @LastEditTime: 2024-09-29 14:36:41 * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp */ #include "notification_manager.h" @@ -764,6 +764,7 @@ namespace OHOS delete DeviceBindingView; DeviceBindingView = nullptr; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[FreeDeviceBindingView] success"); + ScreenTurnOff(); } } @@ -815,6 +816,7 @@ namespace OHOS DeviceUnBindingView = nullptr; FreeDeviceUnbindingRequestGroupView(); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[FreeDeviceUnBindingView] success"); + ScreenTurnOff(); } } diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp index 5a28f093a..881a50828 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp @@ -12,6 +12,8 @@ #include #include #include "ConfigModel.h" +#include +#include "vibrator_service.h" namespace OHOS { @@ -244,6 +246,10 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Create SedentaryReminderView succeed!!"); } + /* -------------------------------------------------------------------------- */ + ScreenTurnOn(10*1000);//显示时长10s + ui_api_vibrate_once_func(); + /* -------------------------------------------------------------------------- */ NotificationManager::GetInstance()->RegisterNotifyCleanupFunction(FreeSedentaryReminderView); return SedentaryReminderGroupView; } @@ -275,6 +281,7 @@ namespace OHOS delete SedentaryReminderGroupView; SedentaryReminderGroupView = nullptr; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Free SedentaryReminderView succeed!!"); + ScreenTurnOff(); } return; } -- 2.17.1