blueooth/audio/aidl/default: Fix return code in startSession
BluetoothAudioProvider::startSession() currently doesn't use the
return code from onSessionReady() and that basically hides all
exceptions return by the child implementation, e.g
A2dpSoftwareAudioProvider::onSessionReady(). This commit fixed
that so the errors are propagated to the binder service.
Bug: 399554337
Test: m android.hardware.bluetooth.audio-V1-impl
Change-Id: I37be56769ceb00caacf0085eef3033469be2a9a8
diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
index 8d03fae..d68113d 100644
--- a/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp
@@ -78,8 +78,7 @@
cookie);
LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_);
- onSessionReady(_aidl_return);
- return ndk::ScopedAStatus::ok();
+ return onSessionReady(_aidl_return);
}
ndk::ScopedAStatus BluetoothAudioProvider::endSession() {