From: luozheng <1732036298@qq.com> Date: Mon, 26 May 2025 07:01:10 +0000 (+0800) Subject: 1.解决点击蓝牙耳机界面死机问题 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~278 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=e68fd5181d7b674ecc08190423dd0d31c9572762;p=mirrors%2FFD230.git 1.解决点击蓝牙耳机界面死机问题 2.解决AI界面不录音问题 --- diff --git a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c index 770e095ef..d56112415 100644 --- a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c +++ b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c @@ -580,9 +580,9 @@ start_custom_ble_service(); //开始播放开机动画,并启动ohos系统 ohos_startup(); #endif -// #ifdef CUSTOM_UTILS -// startup_post_init(); -// #endif +#ifdef CUSTOM_UTILS + startup_post_init(); +#endif set_startup_finish_flag(); } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp index 14dbbaa60..81676d564 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp @@ -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; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/include/BluetoothPresenter.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/include/BluetoothPresenter.h index 920bc8776..6c84d5fac 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/include/BluetoothPresenter.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/include/BluetoothPresenter.h @@ -48,9 +48,6 @@ public: bool OnDrag(UIView& view, const DragEvent& event) override; bool OnDragEnd(UIView& view, const DragEvent& event) override; bool OnKeyAct(UIView &view, const KeyEvent &event) override; - void OnStart() override; - void OnPause() override; - void OnResume() override; void OnStop() override; void ClickRescanButton(void); void ClickNewEquipmentButton(void); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp index 38e09e7ce..2d6e3229e 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bluetooth/src/BluetoothPresenter.cpp @@ -36,16 +36,6 @@ BluetoothPresenter::~BluetoothPresenter() WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothPresenter::~BluetoothPresenter"); } -void BluetoothPresenter::OnStart() -{ - Presenter::OnStart(); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothPresenter::On Start "); -} - -void BluetoothPresenter::OnPause(void) {} - -void BluetoothPresenter::OnResume(void) {} - void BluetoothPresenter::OnStop(void) { BluetoothEarPhoneView *bluetoothEarPhoneView = BluetoothEarPhoneView::GetInstance(); diff --git a/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_capture_wrapper.cpp b/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_capture_wrapper.cpp index 8a0e81dcb..38bf8f686 100644 --- a/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_capture_wrapper.cpp +++ b/code/sdk/middleware/services/media/foundation/sample/wrapper/audio_capture_wrapper.cpp @@ -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; diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index b82d67960..d1c08699c 100644 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -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