Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 211d4783 authored by Jakub Tyszkowski's avatar Jakub Tyszkowski
Browse files

LeAudio: Fix error on updating config after session is stopped

Don't update audio configuration when the session is not running.

Fixes the following error logs:
 BTAudioProviderStub: updateAudioConfiguration - SessionType=LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH has NO session
 bt_stack: [ERROR:client_interface_aidl.cc(342)] UpdateAudioConfig: BluetoothAudioHal failure: Status(-3, EX_ILLEGAL_ARGUMENT): ''

Bug: 320275987
Test: m com.android.btservices
Flag: EXEMPT; trivial change
Change-Id: Ibe29cce0bffac352447b9d00bf47b66651b16517
parent 27da434b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -329,6 +329,11 @@ bool BluetoothAudioClientInterface::UpdateAudioConfig(
    return true;
  }

  if (!session_started_) {
    log::info("BluetoothAudioHal session has not started");
    return true;
  }

  auto aidl_retval = provider_->updateAudioConfiguration(audio_config);
  if (!aidl_retval.isOk()) {
    log::error("BluetoothAudioHal failure: {}", aidl_retval.getDescription());