ScreenTurnOn与ScreenTurnOff配套使用优化 1315/1
authorluozheng <1732036298@qq.com>
Fri, 1 Nov 2024 07:55:44 +0000 (15:55 +0800)
committerluozheng <1732036298@qq.com>
Fri, 1 Nov 2024 07:55:44 +0000 (15:55 +0800)
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceConnectingView.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothReconnectView.cpp
code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp

index 4d1a366..09e45f1 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-08-03 11:10:08
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-05 16:38:12
+ * @LastEditTime: 2024-11-01 15:46:19
  * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceConnectingView.cpp
  */
 #include "aivoice/include/AiVoiceConnectingView.h"
@@ -66,6 +66,7 @@ namespace OHOS
             delete scrollView;
             scrollView = nullptr;
         }
+        ScreenTurnOff();
     }
 
     AiVoiceConnectingView *AiVoiceConnectingView::GetInstance(void)
index 97fdb79..4fa4ea6 100644 (file)
@@ -947,7 +947,7 @@ static void ACLConnectionSuss(const bd_addr_t &bdAddr)
     {\r
         ui_api_vibrate_once_func();\r
     }\r
-    ScreenTurnOn(5*1000);\r
+    uapi_set_screen_on_api();\r
     /* -------------------------------------------------------------------------- */\r
 }\r
 \r
@@ -992,7 +992,7 @@ static void ACLConnectionFail(const bd_addr_t &bdAddr)
     {\r
         ui_api_vibrate_once_func();\r
     }\r
-    ScreenTurnOn(5*1000);\r
+    uapi_set_screen_on_api();\r
     /* -------------------------------------------------------------------------- */\r
 }\r
 \r
index 34e79e2..1b977f4 100644 (file)
@@ -54,6 +54,7 @@ BluetoothReconnectView::~BluetoothReconnectView()
         delete group;\r
         group = nullptr;\r
     }\r
+    ScreenTurnOff();\r
     stop_connect_timer();\r
     g_pBluetoothReconnectView = nullptr;\r
 }\r
index b977038..99cbf02 100644 (file)
@@ -1090,7 +1090,7 @@ namespace OHOS
             // 录取时长不足,停止录制并弹出警告
             if (RecordingPresenter::GetInstance())
             {
-                ScreenTurnOn(3 * 1000); // 亮屏3s
+                uapi_set_screen_on_api();
                 if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get()))
                 {
                     // 震动提醒