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

Commit 7a8ca41f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "le_impl: Move le_client_callbacks_ check to exit earlier" am: e08f5e7a am: e8e7c5b4

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

Change-Id: I31bf806f84c4edc430f62090deaecf0311adf602
parents 3bde12d3 e8e7c5b4
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -429,6 +429,11 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
  }

  void create_le_connection(AddressWithType address_with_type, bool add_to_connect_list, bool is_direct) {
    if (le_client_callbacks_ == nullptr) {
      LOG_ERROR("No callbacks to call");
      return;
    }

    // TODO: Configure default LE connection parameters?
    if (add_to_connect_list) {
      add_device_to_connect_list(address_with_type);
@@ -462,10 +467,6 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
      canceled_connections_.insert(address_with_type);
      return;
    }
    if (le_client_callbacks_ == nullptr) {
      LOG_ERROR("No callbacks to call");
      return;
    }

    uint16_t le_scan_interval = kScanIntervalSlow;
    uint16_t le_scan_window = kScanWindowSlow;