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

Commit 7eaa1219 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Fix bluetooth crash when no bluetooth.audio provider is present

The stack does fall back to IBluetoothAudioOffload, if present, rather
than crashing.
This is observed on some GSI builds.

Bug: 179967994
Test: start Bluetooth on device without bluetooth.audio HAL
Change-Id: I2979d43a1721f5d41b3a89ec14f670b16ef0d660
parent 7620c00d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -246,6 +246,8 @@ void BluetoothAudioClientInterface::FetchAudioProvider() {

  android::sp<IBluetoothAudioProvidersFactory_2_0> providersFactory =
      HalVersionManager::GetProviderFactory_2_0();
  CHECK(providersFactory != nullptr)
      << "IBluetoothAudioProvidersFactory::getService() failed";

  auto getProviderCapabilities_cb =
      [& capabilities = this->capabilities_](
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ class HalVersionManager {
      return;
    }

    LOG(FATAL) << __func__ << " No supported HAL version";
    LOG(INFO) << __func__ << " No supported HAL version";
  }

 private: