From: luozheng <1732036298@qq.com> Date: Sun, 29 Sep 2024 06:50:50 +0000 (+0800) Subject: 喝水提醒,运动识别,配对,久坐提醒(添加震动和10s时长),添加取消亮屏操作,防止其他界面设置亮屏时长不成功 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1054%2Fhead;p=mirrors%2FFD230.git 喝水提醒,运动识别,配对,久坐提醒(添加震动和10s时长),添加取消亮屏操作,防止其他界面设置亮屏时长不成功 --- 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; }