Merge #1315 into sdk602patch0911 from refs/changes/1315/head
author罗正 <1732036298@qq.com>
Fri, 1 Nov 2024 08:53:44 +0000 (08:53 +0000)
committer袁清梦 <3449750381@qq.com>
Fri, 1 Nov 2024 08:53:44 +0000 (08:53 +0000)
ScreenTurnOn与ScreenTurnOff配套使用优化

* refs/changes/1315/head: (3 commits squashed)

  - ScreenTurnOn与ScreenTurnOff配套使用优化

  - 解决蓝牙耳机按键退出有概率不取消常亮屏

  - Merge branch &#39;sdk602patch0911&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911

Signed-off-by: 罗正 <1732036298@qq.com>
Reviewed-by: Caisking <3449750381@qq.com>
Reviewed-by: 罗正 <1732036298@qq.com>
Reviewed-by: aliyun8003852482 <1224667075@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Reviewed-by: aliyun6865282430 <1624952103@qq.com>
Merged-by: Caisking <3449750381@qq.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1315
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceConnectingView.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothEarPhoneView.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 c5167cf..4a5bcec 100644 (file)
@@ -307,7 +307,6 @@ namespace OHOS
         if (!ret)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Bt is not Discovering");\r
-            return;\r
         }\r
         CancelBrScanHandle();\r
         return;\r
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()))
                 {
                     // 震动提醒