From: hcj <1224667075@qq.com> Date: Fri, 25 Oct 2024 09:11:49 +0000 (+0800) Subject: 优化蓝牙连接 X-Git-Tag: fd230_release_V1.3.102~181^2~18 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=0678df75b6845f0f18a0ef83e410af06ce986d48;p=mirrors%2FFD230.git 优化蓝牙连接 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp index 7137e4db3..4e7b09998 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp @@ -1551,7 +1551,7 @@ static void CallStateChanged(const bd_addr_t *bdAddr, const hfp_hf_calls_info_t return; } } - + SetCompleteCallFlag(call); CatCallStateChangedInfo(bdAddr, call); CallAudioHandle(call); @@ -2163,6 +2163,10 @@ int uapi_hfp_connect_(void) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[bt_is_acl_connected is true"); ret = hfp_hf_connect(&bdaddr); + if(ret!=ERRCODE_SUCC) + { + ret=gap_reconnect_media_device(&bdaddr); + } WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[uapi_hfp_connect] ret:%X", ret); }