audio: Add IBluetoothA2dp

Similar to IBluetooth interface which controls SCO/HFP,
IBluetoothA2dp controls the A2DP profile. This interface
replaces the following string parameters:

AUDIO_PARAMETER_A2DP_RECONFIG_SUPPORTED
AUDIO_PARAMETER_RECONFIG_A2DP
"A2dpSuspended"

Also, refactor fields used by Module implementation
for persistent child interfaces.

Bug: 270731693
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie62952c3bc3af2f53535d716e5b57bf48c661306
Merged-In: Ie62952c3bc3af2f53535d716e5b57bf48c661306
diff --git a/audio/aidl/default/Bluetooth.cpp b/audio/aidl/default/Bluetooth.cpp
index 38e0c21..bd9a864 100644
--- a/audio/aidl/default/Bluetooth.cpp
+++ b/audio/aidl/default/Bluetooth.cpp
@@ -19,6 +19,7 @@
 
 #include "core-impl/Bluetooth.h"
 
+using aidl::android::hardware::audio::core::VendorParameter;
 using aidl::android::media::audio::common::Boolean;
 using aidl::android::media::audio::common::Float;
 using aidl::android::media::audio::common::Int;
@@ -79,4 +80,29 @@
     return ndk::ScopedAStatus::ok();
 }
 
+ndk::ScopedAStatus BluetoothA2dp::isEnabled(bool* _aidl_return) {
+    *_aidl_return = mEnabled;
+    LOG(DEBUG) << __func__ << ": returning " << *_aidl_return;
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothA2dp::setEnabled(bool in_enabled) {
+    mEnabled = in_enabled;
+    LOG(DEBUG) << __func__ << ": " << mEnabled;
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothA2dp::supportsOffloadReconfiguration(bool* _aidl_return) {
+    *_aidl_return = true;
+    LOG(DEBUG) << __func__ << ": returning " << *_aidl_return;
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus BluetoothA2dp::reconfigureOffload(
+        const std::vector<::aidl::android::hardware::audio::core::VendorParameter>& in_parameters
+                __unused) {
+    LOG(DEBUG) << __func__ << ": " << ::android::internal::ToString(in_parameters);
+    return ndk::ScopedAStatus::ok();
+}
+
 }  // namespace aidl::android::hardware::audio::core