From: 胡传军 <1224667075@qq.com> Date: Tue, 14 Jan 2025 16:48:33 +0000 (+0000) Subject: Merge #1627 into sdk602patch0911 from refs/changes/1627/head X-Git-Tag: v1.3.113-repair_tp~36^2~1 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=0a82165ce50d26843b049808511d75afb8ad859c;p=mirrors%2FFD230.git Merge #1627 into sdk602patch0911 from refs/changes/1627/head Code review from 胡传军 * refs/changes/1627/head: (4 commits squashed) - 修改MP3最大下载死机问题 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0911 - 修复ble传输最大容量内存泄漏问题 - 修复创建BT服务时序问题导致的蓝牙状态不对,导致的蓝牙电话异常问题 Signed-off-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: Caisking <3449750381@qq.com> Reviewed-by: 罗正 <1732036298@qq.com> Reviewed-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Reviewed-by: aliyun6865282430 <1624952103@qq.com> Merged-by: Caisking <3449750381@qq.com> CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1627 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp index 2d76de6fc..0bf9d3558 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp @@ -175,6 +175,7 @@ static int bluetooth_init_all(void) BtInitCallBacks(); uapi_pbap_pce_reg_callback(); BtA2dpInit(); + PhoneServiceInit(); if(uapi_dev_runtime_get_safemode_flag()) { diff --git a/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp index c6f0621a4..8bdf0c4ce 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp @@ -156,6 +156,9 @@ void StatusReset(void) #endif { + #ifdef SUPPORT_CAT1_HFP_AG_SERV + do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT_AUDIO_END, nullptr, 0); + #endif do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_STOP, nullptr, 0); } } @@ -220,19 +223,21 @@ static void CallTimerCallbackProc(int data) { if(MainCallingView::GetInstance()->GetDisplayGroup()) { - // if(!MainCallingView::GetInstance()->GetDisplayGroup()->IsVisible()) - // { - // if( volte_voice_state!=2) - // { - // do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_START, nullptr, 0); - // } - // else if( && volte_voice_state()!=1) - // { - // do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_START, nullptr, 0); - // } - + #ifdef SUPPORT_CAT1_HFP_AG_SERV + if(!MainCallingView::GetInstance()->GetDisplayGroup()->IsVisible()) + { - // } + if( headset_SCO_Is_connect()==false && volte_voice_state()!=1) + { + if(volte_voice_state()==2) + { + do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_STOP, nullptr, 0); + } + do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_START, nullptr, 0); + } + } + #endif + } @@ -937,7 +942,7 @@ CallerLogModel::~CallerLogModel() {} void CallerLogModel::InitPhoneService() { WEARABLE_LOGD(HILOG_MODULE_AAFWK, "CallerLogModel::[InitPhoneService]::Init start"); - PhoneServiceInit(); + PhoneServiceCb serviceFoution; serviceFoution.callChanged = PhoneChangeStatusCallback; diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c index 8f9534109..76689b2a6 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -7118,6 +7118,8 @@ errcode_t decode_ota_json(ble_read_data *buffer_handle) { { TRANSMIT_DATA=TRANS_OTA_FAIL; CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1); + cJSON_Delete(root); + return ERRCODE_FAIL; } } @@ -7256,6 +7258,8 @@ errcode_t decode_mp3_json(ble_read_data *buffer_handle) if(IS_free_save_Mp3(ota_size_json->valueint)==false) { free(buffer_handle->file_recv_stat.file_name); + buffer_handle->file_recv_stat.file_name=NULL; + TRANSMIT_DATA=TRANS_MP3_MAX_FAIL; CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);