diff --git a/services/audio_policy/server/domain/router/privacy_priority_router.cpp b/services/audio_policy/server/domain/router/privacy_priority_router.cpp index d63c0286bf2190dd605fd94b88f154cf5b00f699..1fbb62d742c5f64d5de44385249f905ad13f0293 100644 --- a/services/audio_policy/server/domain/router/privacy_priority_router.cpp +++ b/services/audio_policy/server/domain/router/privacy_priority_router.cpp @@ -140,8 +140,13 @@ shared_ptr PrivacyPriorityRouter::GetRecordCaptureDevice( return desc; } } - vector> descs = + vector> originDescs = AudioDeviceManager::GetAudioDeviceManager().GetMediaCapturePrivacyDevices(); + vector> descs; + for (const auto &desc : originDescs) { + CHECK_AND_CONTINUE(desc->deviceType_ != nullptr && desc->deviceType_ != DEVICE_TYPE_BLUETOOTH_A2DP_IN); + descs.push_back(make_shared(*desc)); + } shared_ptr desc = GetLatestNonExcludedConnectDevice(MEDIA_INPUT_DEVICES, descs); CHECK_AND_RETURN_RET_LOG(desc != nullptr, make_shared(), "nullptr desc"); AUDIO_DEBUG_LOG("sourceType %{public}d clientUID %{public}d fetch device %{public}d", sourceType,