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

Commit 5fb3b465 authored by Janardhana Rao Bokka's avatar Janardhana Rao Bokka Committed by android-build-merger
Browse files

Merge "BLE: Updating the WL if addr_type is not matched for same BDaddr"

am: 26e739f4

Change-Id: I6d9eb4f6b25582a191e4085498021b683ba428ed
parents 4a4cd845 26e739f4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ extern void btm_send_hci_create_connection(
    uint16_t conn_timeout, uint16_t min_ce_len, uint16_t max_ce_len,
    uint8_t phy);
extern void btm_ble_create_conn_cancel();
void wl_remove_complete(uint8_t* p_data, uint16_t /* evt_len */);

// Unfortunately (for now?) we have to maintain a copy of the device whitelist
// on the host to determine if a device is pending to be connected or not. This
@@ -72,7 +73,14 @@ static void background_connection_add(uint8_t addr_type,
        BackgroundConnection{address, addr_type, false, 0, false};
  } else {
    BackgroundConnection* connection = &map_iter->second;
    if (addr_type != connection->addr_type) {
      LOG(INFO) << __func__ << " Addr type mismatch " << address;
      btsnd_hcic_ble_remove_from_white_list(
        connection->addr_type_in_wl, connection->address,
        base::Bind(&wl_remove_complete));
      connection->addr_type = addr_type;
      connection->in_controller_wl = false;
    }
    connection->pending_removal = false;
  }
}