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

Commit 4af3fcc8 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Update main/shim/::ble_addr_type am: 94b9bedc

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1418796

Change-Id: I34f0286bb8390e23d44955e16822ce0f6f6e202e
parents 5cbbba44 94b9bedc
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -152,8 +152,8 @@ void BTIF_RegisterBondStateChangeListener(
void BTIF_DM_ssp_reply(const RawAddress bd_addr, uint8_t addr_type, bt_ssp_variant_t variant, uint8_t accept) {
  // TODO: GD expects to receive correct address type.
  // pass addr_type once it's properly set in btif layer
  hci::AddressWithType address = ToAddressWithType(bd_addr, 0);
  hci::AddressWithType address2 = ToAddressWithType(bd_addr, 1);
  hci::AddressWithType address = ToAddressWithType(bd_addr, BLE_ADDR_PUBLIC);
  hci::AddressWithType address2 = ToAddressWithType(bd_addr, BLE_ADDR_RANDOM);
  auto security_manager = bluetooth::shim::GetSecurityModule()->GetSecurityManager();

  if (variant == BT_SSP_VARIANT_PASSKEY_CONFIRMATION) {
@@ -182,8 +182,8 @@ void BTIF_DM_ssp_reply(const RawAddress bd_addr, uint8_t addr_type, bt_ssp_varia
void BTIF_DM_pin_reply(const RawAddress bd_addr, uint8_t addr_type, uint8_t accept, uint8_t pin_len, bt_pin_code_t pin_code) {
  // TODO: GD expects to receive correct address type.
  // pass addr_type once it's properly set in btif layer
  hci::AddressWithType address = ToAddressWithType(bd_addr, 0);
  hci::AddressWithType address2 = ToAddressWithType(bd_addr, 1);
  hci::AddressWithType address = ToAddressWithType(bd_addr, BLE_ADDR_PUBLIC);
  hci::AddressWithType address2 = ToAddressWithType(bd_addr, BLE_ADDR_RANDOM);
  auto security_manager = bluetooth::shim::GetSecurityModule()->GetSecurityManager();

  if (!accept) {
+3 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ using BtmRemoteDeviceName = tBTM_REMOTE_DEV_NAME;
extern void btm_process_cancel_complete(uint8_t status, uint8_t mode);
extern void btm_process_inq_complete(uint8_t status, uint8_t result_type);
extern void btm_ble_process_adv_addr(RawAddress& raw_address,
                                     uint8_t* address_type);
                                     tBLE_ADDR_TYPE* address_type);
extern void btm_ble_process_adv_pkt_cont(
    uint16_t event_type, uint8_t address_type, const RawAddress& raw_address,
    uint8_t primary_phy, uint8_t secondary_phy, uint8_t advertising_sid,
@@ -153,7 +153,8 @@ static void store_le_address_type(RawAddress address, tBLE_ADDR_TYPE type) {
void Btm::ScanningCallbacks::on_advertisements(
    std::vector<std::shared_ptr<hci::LeReport>> reports) {
  for (auto le_report : reports) {
    uint8_t address_type = static_cast<uint8_t>(le_report->address_type_);
    tBLE_ADDR_TYPE address_type =
        static_cast<tBLE_ADDR_TYPE>(le_report->address_type_);
    uint16_t extended_event_type = 0;
    uint8_t* report_data = nullptr;
    size_t report_len = 0;
+1 −1
Original line number Diff line number Diff line
@@ -275,7 +275,7 @@ struct LeFixedChannelHelper {

    (freg_.pL2CA_FixedConn_Cb)(cid_, address, true, 0, BT_TRANSPORT_LE);
    bluetooth::shim::Btm::StoreAddressType(
        address, static_cast<uint8_t>(device.GetAddressType()));
        address, static_cast<tBLE_ADDR_TYPE>(device.GetAddressType()));
  }

  void on_incoming_data(bluetooth::hci::AddressWithType remote) {