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

Commit f2217deb 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

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

Change-Id: I929117cccace1c611e3c86822451116703367205
parents d631b959 0ad31ce7
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);