1.解决点击蓝牙耳机界面死机问题
authorluozheng <1732036298@qq.com>
Mon, 26 May 2025 07:01:10 +0000 (15:01 +0800)
committerluozheng <1732036298@qq.com>
Mon, 26 May 2025 07:01:10 +0000 (15:01 +0800)
2.解决AI界面不录音问题

code/sdk/application/brandy/brandy_standard/thread_pri_init.c
code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/include/BluetoothPresenter.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/audio_capture_wrapper.cpp
code/sdk/zhihui/utils/custom_utils.c

index 770e095..d561124 100644 (file)
@@ -580,9 +580,9 @@ start_custom_ble_service();
     //开始播放开机动画,并启动ohos系统\r
     ohos_startup();\r
 #endif\r
-// #ifdef CUSTOM_UTILS\r
-//     startup_post_init();\r
-// #endif\r
+#ifdef CUSTOM_UTILS\r
+    startup_post_init();\r
+#endif\r
     set_startup_finish_flag();\r
 }\r
 \r
index 14dbbaa..81676d5 100644 (file)
@@ -619,6 +619,7 @@ namespace OHOS
             WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "type = %d", type);
             #ifdef SUPPORT_BLE_SERVICE
             streamingRecordAndSend_AI(type);//实时发送录音数据
+            #endif
 #else
             std::string audioPath = AiVoiceModel::GetInstance().GetAIAudioPath();
             if (uapi_delete_files(audioPath.c_str())) // 先删除文件
@@ -638,7 +639,6 @@ namespace OHOS
 #endif
             uapi_save_runtime_log(RUNTIME_LOG_RECORD_START_AI);//TOOD*
             AudioCaptureSample(6, (const char **)defaultArgs);            
-#endif
 #endif
         }
         return;
index 920bc87..6c84d5f 100644 (file)
@@ -48,9 +48,6 @@ public:
     bool OnDrag(UIView& view, const DragEvent& event) override;\r
     bool OnDragEnd(UIView& view, const DragEvent& event) override;\r
     bool OnKeyAct(UIView &view, const KeyEvent &event) override;\r
-    void OnStart() override;\r
-    void OnPause() override;\r
-    void OnResume() override;\r
     void OnStop() override;\r
     void ClickRescanButton(void);\r
     void ClickNewEquipmentButton(void);\r
index 38e09e7..2d6e322 100644 (file)
@@ -36,16 +36,6 @@ BluetoothPresenter::~BluetoothPresenter()
     WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothPresenter::~BluetoothPresenter");\r
 }\r
 \r
-void BluetoothPresenter::OnStart()\r
-{\r
-    Presenter<MainBluetoothView>::OnStart();\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothPresenter::On Start ");\r
-}\r
-\r
-void BluetoothPresenter::OnPause(void) {}\r
-\r
-void BluetoothPresenter::OnResume(void) {}\r
-\r
 void BluetoothPresenter::OnStop(void)\r
 {\r
     BluetoothEarPhoneView *bluetoothEarPhoneView = BluetoothEarPhoneView::GetInstance();\r
index 8a0e81d..38bf8f6 100644 (file)
@@ -417,7 +417,7 @@ EXIT:
 }
 
 /* ------------------------------- AI录音数据上传接口 ------------------------------- */
-#define AI_RECORD_TEST 0 //若需要调试可以打开该宏
+#define AI_RECORD_TEST 1 //若需要调试可以打开该宏
 #ifdef SUPPORT_BLE_SERVICE
 #include "bleService.h"
 static uint32_t AI_audio_size=0;
index b82d679..d1c0869 100644 (file)
@@ -484,9 +484,9 @@ bool stop_custom_ble_service(void)
 {
 #ifdef SUPPORT_BLE_SERVICE
     PRINT("stop custom protocol classic bt ble service !\r\n");
-#ifdef FD230_COMPONENT
+// #ifdef FD230_COMPONENT
     bluetooth_close_all();
-#endif
+// #endif
 
 #endif 
     //if(!uapi_dev_runtime_get_saveele_status())
@@ -565,9 +565,7 @@ void startup_post_init_task(void)
     // cm_initializeVoLTECall();
     //initialize4GCapability();
     //initializeMotionRecognition();
-#ifdef FD230_COMPONENT
     cm_initBluetoothDeviceList();
-#endif
     
     LOS_Msleep(5000);
 
@@ -586,14 +584,14 @@ void startup_post_init_task(void)
 #endif
 
 #endif
-    ble_SOS_data_init();
+    // ble_SOS_data_init();//开启会死机需适配
 
 #ifdef SUPPORT_CAT1_SERVICE
     // up_report_timer();
 #endif
     read_jsonHistory_weather();
 
-    ota_updata_init();
+    // ota_updata_init();//开启会死机需适配
 
 #ifdef FD230_COMPONENT
     system_init_uart();//配置uartat