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

Commit 0eb2def8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Check if stack down before caching scan result" am: 0ad31ce7 am: f2217deb

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1984786

Change-Id: Ia377cac4652b091909ce24e2a77213f661e5166a
parents 3243d766 f2217deb
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -494,6 +494,11 @@ bool BleScannerInterfaceImpl::parse_filter_command(
void BleScannerInterfaceImpl::handle_remote_properties(
    RawAddress bd_addr, tBLE_ADDR_TYPE addr_type,
    std::vector<uint8_t> advertising_data) {
  if (!bluetooth::shim::is_gd_stack_started_up()) {
    LOG_WARN("Gd stack is stopped, return");
    return;
  }

  // skip anonymous advertisment
  if (addr_type == BLE_ADDR_ANONYMOUS) {
    return;
@@ -541,11 +546,6 @@ void BleScannerInterfaceImpl::handle_remote_properties(
      }
    }
  }
  if (!bluetooth::shim::is_gd_stack_started_up()) {
    LOG_WARN("Gd stack is stopped, return");
    return;
  }

  auto* storage_module = bluetooth::shim::GetStorage();
  bluetooth::hci::Address address = ToGdAddress(bd_addr);