喝水提醒,运动识别,配对,久坐提醒(添加震动和10s时长),添加取消亮屏操作,防止其他界面设置亮屏时长不成功 1053/target/2 1054/2 1054/head 1055/target/1 1056/target/1
authorluozheng <1732036298@qq.com>
Sun, 29 Sep 2024 06:50:50 +0000 (14:50 +0800)
committerluozheng <1732036298@qq.com>
Sun, 29 Sep 2024 06:50:50 +0000 (14:50 +0800)
code/sdk/application/wearable/service/msg_center/src/notify/drinkReminder_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/motion_recognition_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/sedentaryReminder_notification.cpp

index 0d5b337..7cb4f9b 100644 (file)
@@ -253,6 +253,7 @@ namespace OHOS
             delete DrinkReminderGroupView;
             DrinkReminderGroupView = nullptr;
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Free DrinkReminderView succeed!!");
+            ScreenTurnOff();
         }
         return;
     }
index c4c9770..3a7908f 100644 (file)
@@ -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;
     }
index fac9a6c..0d2d954 100644 (file)
@@ -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();
         }
     }
 
index 5a28f09..881a508 100644 (file)
@@ -12,6 +12,8 @@
 #include <service/graphic_service.h>
 #include <thread>
 #include "ConfigModel.h"
+#include <ui_service.h>
+#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;
     }