Add BluetoothLeAudioCodecsProvider Unit Test
Add unit test for BluetoothLeAudioCodecsProvider and simplify
the public interface of BluetoothLeAudioCodecsProvider class
Bug: 253569201
Test: atest VtsHalBluetoothAudioTargetTest
Test: atest BluetoothLeAudioCodecsProviderTest
Test: manual test
Change-Id: I064eb4058b129a571cf9dbb91b85bafe7236b735
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
index 855dd28..faebbbf 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioCodecs.cpp
@@ -398,8 +398,11 @@
}
if (kDefaultOffloadLeAudioCapabilities.empty()) {
+ auto le_audio_offload_setting =
+ BluetoothLeAudioCodecsProvider::ParseFromLeAudioOffloadSettingFile();
kDefaultOffloadLeAudioCapabilities =
- BluetoothLeAudioCodecsProvider::GetLeAudioCodecCapabilities();
+ BluetoothLeAudioCodecsProvider::GetLeAudioCodecCapabilities(
+ le_audio_offload_setting);
}
return kDefaultOffloadLeAudioCapabilities;