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

Commit 9f0844c4 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5869577 from 02c09fbf to qt-qpr1-release

Change-Id: Iad91c4d82911a0ebc2e8300d943c7b9bfaaf7938
parents 9ce3e84f 02c09fbf
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -138,9 +138,7 @@ bool ConnectionHandler::ConnectDevice(const RawAddress& bdaddr) {
bool ConnectionHandler::DisconnectDevice(const RawAddress& bdaddr) {
  for (auto it = device_map_.begin(); it != device_map_.end(); it++) {
    if (bdaddr == it->second->GetAddress()) {
      it->second->DeviceDisconnected();
      uint8_t handle = it->first;
      device_map_.erase(handle);
      return avrc_->Close(handle) == AVRC_SUCCESS;
    }
  }
+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;
  }
}