1.关机动画开始后关闭翻腕息屏,防止息屏后关机动画不执行
authorluozheng <1732036298@qq.com>
Tue, 29 Oct 2024 12:30:31 +0000 (20:30 +0800)
committeraliyun:aliyun0384013184_1JeGs <3449750381@qq.com>
Wed, 30 Oct 2024 03:55:24 +0000 (03:55 +0000)
2.关机动画启动禁止一切弹窗,通过设置Slice优先级为最高级实现

code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp

index 8116e9a..18ff179 100644 (file)
@@ -11,6 +11,8 @@
 #include "uicomponents/UIComponents.h"
 #include "vibrator_service.h"
 #include "bleEvent.h"
+#include "AppViewIDs.h"
+#include "NativeAbility.h"
 namespace OHOS
 {
 
@@ -84,6 +86,10 @@ namespace OHOS
         shutDownImageAnimatorView->Start();
         isShutDownImageAnimatorStart = true;
         ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); // 关机动画已经开始了不能息屏
+        
+        uapi_take_to_wake(0);//关闭抬腕亮屏,和息屏
+
+        NativeAbility::GetInstance().SetCurSlicePriority(0); //设置Slice优先级为最高,防止弹窗出现
 
         // 关机增加震动
         ui_api_vibrate_once_func();