From bc2db41abbc4c94aa642e17a44c94717877ba3b1 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Tue, 11 Jun 2024 18:47:35 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E4=BC=A0=E8=BE=93=E8=BF=87?= =?utf8?q?=E7=A8=8BUI=E9=95=BF=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../msg_center/src/notify/transmitting.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp index b76cb6d03..ef774916f 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp @@ -12,7 +12,7 @@ #include "components/ui_slider.h" // #include "UiConfig.h" #include "bleEvent.h" - +#include "power_display_service.h" namespace OHOS { static UIImageView *imageCharge = nullptr; @@ -147,6 +147,14 @@ namespace OHOS } transmitting_timer = nullptr; } + + const power_display_svr_api_t *display_api = power_display_svr_get_api(); + if (display_api->get_screen_state() != SCREEN_ON) + { + display_api->turn_on_screen(); + } + display_api->set_auto_timeout_function(true); + RootView::GetInstance()->Remove(UIViewGroup_transmitting); @@ -548,6 +556,13 @@ namespace OHOS UIViewGroup_transmitting->SetOnClickListener(button1Click); UIViewGroup_transmitting->SetTouchable(true); + const power_display_svr_api_t *display_api = power_display_svr_get_api(); + if (display_api->get_screen_state() != SCREEN_ON) + { + display_api->turn_on_screen(); + } + display_api->set_auto_timeout_function(false); + -- 2.17.1