From 2bd674bb8c7271615ea6f65fd224ee23fa7f8673 Mon Sep 17 00:00:00 2001 From: zhuchaochao Date: Tue, 19 Dec 2023 02:40:50 +0000 Subject: [PATCH] =?UTF-8?q?=E8=93=9D=E7=89=99inbarding=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhuchaochao Change-Id: If9be8b21eee7fb35f41bae3f5ebe27dfa2f397ab --- frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp b/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp index 4e3a99b22c..39ad53277b 100644 --- a/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp +++ b/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp @@ -292,7 +292,9 @@ int32_t AudioHfpManager::ConnectScoWithAudioScene(AudioScene scene) } std::lock_guard hfpLock(g_hfpInstanceLock); CHECK_AND_RETURN_RET_LOG(hfpInstance_ != nullptr, ERROR, "HFP AG profile instance unavailable"); - if (scene == AUDIO_SCENE_RINGING && !hfpInstance_->IsInbandRingingEnabled()) { + bool isInbardingEnabled = false; + hfpInstance_->IsInbandRingingEnabled(isInbardingEnabled); + if (scene == AUDIO_SCENE_RINGING && !isInbardingEnabled) { AUDIO_INFO_LOG("The inbarding switch is off, ignore the ring scene."); return SUCCESS; } -- Gitee