Merge "Allow HAL test to pass without instance found."
diff --git a/bluetooth/audio/2.0/default/session/BluetoothAudioSession.cpp b/bluetooth/audio/2.0/default/session/BluetoothAudioSession.cpp
index d60e732..50119bf 100644
--- a/bluetooth/audio/2.0/default/session/BluetoothAudioSession.cpp
+++ b/bluetooth/audio/2.0/default/session/BluetoothAudioSession.cpp
@@ -90,14 +90,16 @@
// bluetooth_audio outputs
void BluetoothAudioSession::OnSessionEnded() {
std::lock_guard<std::recursive_mutex> guard(mutex_);
- if (IsSessionReady()) {
- ReportSessionStatus();
- }
+ bool toggled = IsSessionReady();
+ LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_);
audio_config_ = (session_type_ == SessionType::A2DP_HARDWARE_OFFLOAD_DATAPATH
? kInvalidOffloadAudioConfiguration
: kInvalidSoftwareAudioConfiguration);
stack_iface_ = nullptr;
UpdateDataPath(nullptr);
+ if (toggled) {
+ ReportSessionStatus();
+ }
}
// invoking the registered session_changed_cb_