From: hcj <1224667075@qq.com> Date: Tue, 14 Jan 2025 07:35:32 +0000 (+0800) Subject: 修复创建BT服务时序问题导致的蓝牙状态不对,导致的蓝牙电话异常问题 X-Git-Tag: v1.3.113-repair_tp~30^2~4 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1627%2F3;p=mirrors%2FFD230.git 修复创建BT服务时序问题导致的蓝牙状态不对,导致的蓝牙电话异常问题 --- 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;