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

Commit a8128c8b authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Fix check of HaveAllActiveAsesCisEst

If there is no ASES, function shall return false.

Bug: 245725461
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I4f75ae99cedafe904c283aa87b4ccbbf493af370
parent 5b68acab
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2179,6 +2179,11 @@ bool LeAudioDevice::IsReadyToSuspendStream(void) {
}

bool LeAudioDevice::HaveAllActiveAsesCisEst(void) {
  if (ases_.empty()) {
    LOG_WARN("No ases for device %s", address_.ToString().c_str());
    return false;
  }

  auto iter = std::find_if(ases_.begin(), ases_.end(), [](const auto& ase) {
    return ase.active &&
           (ase.data_path_state != AudioStreamDataPathState::CIS_ESTABLISHED);