audio flinger: Bluetooth latency mode control

Add APIs to discover support and control the use
of latency mode control over Bluetooth link.

Bug: 257922898
Test: make

Change-Id: I8d23a40f21465d566f0adc553cfc77e64571395e
diff --git a/media/libaudioclient/IAudioFlinger.cpp b/media/libaudioclient/IAudioFlinger.cpp
index 81abfc2..ba3e703 100644
--- a/media/libaudioclient/IAudioFlinger.cpp
+++ b/media/libaudioclient/IAudioFlinger.cpp
@@ -846,6 +846,21 @@
     return NO_ERROR;
 }
 
+status_t AudioFlingerClientAdapter::setBluetoothLatencyModesEnabled(bool enabled) {
+    return statusTFromBinderStatus(mDelegate->setBluetoothLatencyModesEnabled(enabled));
+}
+
+status_t AudioFlingerClientAdapter::supportsBluetoothLatencyModes(bool* support) {
+    if (support == nullptr) {
+        return BAD_VALUE;
+    }
+
+    RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(
+            mDelegate->supportsBluetoothLatencyModes(support)));
+
+    return NO_ERROR;
+}
+
 status_t AudioFlingerClientAdapter::getSoundDoseInterface(
         const sp<media::ISoundDoseCallback> &callback,
         sp<media::ISoundDose>* soundDose) {
@@ -1374,6 +1389,14 @@
     return Status::ok();
 }
 
+Status AudioFlingerServerAdapter::setBluetoothLatencyModesEnabled(bool enabled) {
+    return Status::fromStatusT(mDelegate->setBluetoothLatencyModesEnabled(enabled));
+}
+
+Status AudioFlingerServerAdapter::supportsBluetoothLatencyModes(bool *support) {
+    return Status::fromStatusT(mDelegate->supportsBluetoothLatencyModes(support));
+}
+
 Status AudioFlingerServerAdapter::getSoundDoseInterface(
         const sp<media::ISoundDoseCallback>& callback,
         sp<media::ISoundDose>* soundDose)