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

Commit 31e455f8 authored by Josh Wu's avatar Josh Wu
Browse files

HAL: Bypass binder check when refetching

Binder check is to check whether AIDL should be used, so it's no
necessary when refetching. Also, when the binder process crashes, it
will take some time until recovering, so binder check usually fails
here.

Tag: #stability
Bug: 224534323
Test: atest BluetoothInstrumentationTests
Change-Id: Ibd1f741ad414c6e44c6b36517c966df45e86224a
parent 6fef8540
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -95,9 +95,11 @@ BluetoothAudioClientInterface::GetAudioCapabilities(SessionType session_type) {


void BluetoothAudioClientInterface::FetchAudioProvider() {
void BluetoothAudioClientInterface::FetchAudioProvider() {
  if (provider_ != nullptr) {
  if (provider_ != nullptr) {
    LOG(WARNING) << __func__ << ": reflash";
    LOG(WARNING) << __func__ << ": refetch";
  }
  } else if (!is_aidl_available()) {
  if (!is_aidl_available()) {
    // AIDL availability should only be checked at the beginning.
    // When refetching, AIDL may not be ready *yet* but it's expected to be
    // available later.
    return;
    return;
  }
  }
  auto provider_factory = IBluetoothAudioProviderFactory::fromBinder(
  auto provider_factory = IBluetoothAudioProviderFactory::fromBinder(