diff --git a/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp b/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp index 4e3a99b22c0ee6b95f0f05bb4c2d8a14ede8a55f..39ad53277be9f4046500786d130991d0a50b83d7 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; }