增加传输过程UI长亮
authorhcj <1224667075@qq.com>
Tue, 11 Jun 2024 10:47:35 +0000 (18:47 +0800)
committerhcj <1224667075@qq.com>
Tue, 11 Jun 2024 10:47:35 +0000 (18:47 +0800)
code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp

index b76cb6d..ef77491 100644 (file)
@@ -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);
+