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

Commit 1cde03f6 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

audio_hal_interface: Fix WriteOutData command

provider_ represents HAL 2.0. What we need here is check if any provider
is available. IsValid() does it.

Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compile
Change-Id: I37833cdc65dd3a0ce22e01e8886558ca0168e0d0
parent 3213a372
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1060,8 +1060,8 @@ void BluetoothAudioClientInterface::RenewAudioProviderAndSession() {

size_t BluetoothAudioSourceClientInterface::WriteAudioData(const uint8_t* p_buf,
                                                           uint32_t len) {
  if (provider_ == nullptr) {
    LOG(ERROR) << __func__ << ": BluetoothAudioHal nullptr";
  if (!IsValid()) {
    LOG(ERROR) << __func__ << ": BluetoothAudioHal is not valid";
    return 0;
  }
  if (p_buf == nullptr || len == 0) return 0;