Add support for HFP_HARDWARE_OFFLOAD_DATAPATH session type am: f1527f5a88 am: 559f8149a7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3211376
Change-Id: I55b440983c14cf2a97466e237211c04e0e68b02c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp
index 4fe2b37..a458c5b 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp
@@ -139,6 +139,12 @@
<< toString(session_type_);
return;
}
+ } else if(session_type_ == SessionType::HFP_HARDWARE_OFFLOAD_DATAPATH) {
+ if (audio_config.getTag() != AudioConfiguration::hfpConfig) {
+ LOG(ERROR) << __func__ << " invalid audio config type for SessionType ="
+ << toString(session_type_);
+ return;
+ }
} else {
LOG(ERROR) << __func__ << " invalid SessionType ="
<< toString(session_type_);
@@ -154,6 +160,12 @@
<< toString(session_type_);
return;
}
+ } else if(session_type_ == SessionType::HFP_HARDWARE_OFFLOAD_DATAPATH) {
+ if (audio_config.getTag() != AudioConfiguration::hfpConfig) {
+ LOG(ERROR) << __func__ << " invalid audio config type for SessionType ="
+ << toString(session_type_);
+ return;
+ }
} else {
LOG(ERROR) << __func__
<< " invalid SessionType =" << toString(session_type_);