解决因消息导致解绑关机动画屏幕息屏问题 1632/1
authorluozheng <1732036298@qq.com>
Wed, 15 Jan 2025 04:03:30 +0000 (12:03 +0800)
committerluozheng <1732036298@qq.com>
Wed, 15 Jan 2025 04:03:30 +0000 (12:03 +0800)
code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp
code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp

index d217f99..3f67875 100644 (file)
@@ -14,6 +14,7 @@
 #include "AppViewIDs.h"
 #include "NativeAbility.h"
 #include <custom_runtime.h>
+#include "uiservice/include/ui_service.h"
 namespace OHOS
 {
 
@@ -91,7 +92,9 @@ namespace OHOS
 
         uapi_dev_runtime_set_shutting_down_status(1);//设置关机状态runtime值
 
-        ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); // 关机动画已经开始了不能息屏
+        ScreenOffEnable(false);
+        uapi_set_screen_on_api();
+        // ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); // 关机动画已经开始了不能息屏
 
         uapi_take_to_wake(0); // 关闭抬腕亮屏,和息屏
 
index c0bd895..67d1986 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-12-23 18:25:27
+ * @LastEditTime: 2025-01-15 11:34:47
  * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp
  */
 #include "notification_manager.h"
@@ -560,7 +560,7 @@ namespace OHOS
             ui_api_vibrate_once_func(); // 震动一次
         }
 
-        ScreenTurnOff();    //先设置为0
+        // ScreenTurnOff();    //先设置为0
         ScreenTurnOn(40 * 1000); // 亮屏操作  40秒关闭
 
         PairingViewEventListener::GetInstance().Pairing_StartTimer(); // 开启一个40s后弹窗自动销毁定时器