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

Commit 2c14621f authored by Hansong Zhang's avatar Hansong Zhang
Browse files

BTA_DmAddDevice: is_trusted, tm, io_cap are 0

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I935b4284f1790ea9f1d3ce8173dd0afb8fd3c524
parent 910e5990
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -231,16 +231,12 @@ void BTA_DmConfirm(const RawAddress& bd_addr, bool accept) {
 *
 ******************************************************************************/
void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
                     const LinkKey& link_key, tBTA_SERVICE_MASK trusted_mask,
                     bool is_trusted, uint8_t key_type, tBTM_IO_CAP io_cap,
                     const LinkKey& link_key, uint8_t key_type,
                     uint8_t pin_length) {
  std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg =
      std::make_unique<tBTA_DM_API_ADD_DEVICE>();

  msg->bd_addr = bd_addr;
  msg->tm = trusted_mask;
  msg->is_trusted = is_trusted;
  msg->io_cap = io_cap;
  msg->link_key_known = true;
  msg->key_type = key_type;
  msg->link_key = link_key;
+1 −3
Original line number Diff line number Diff line
@@ -1002,9 +1002,7 @@ extern void BTA_DmConfirm(const RawAddress& bd_addr, bool accept);
 *
 ******************************************************************************/
extern void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
                            const LinkKey& link_key,
                            tBTA_SERVICE_MASK trusted_mask, bool is_trusted,
                            uint8_t key_type, tBTM_IO_CAP io_cap,
                            const LinkKey& link_key, uint8_t key_type,
                            uint8_t pin_length);

/*******************************************************************************
+2 −2
Original line number Diff line number Diff line
@@ -465,8 +465,8 @@ static bt_status_t btif_in_fetch_bonded_devices(
          if (btif_config_get_int(name, "DevClass", &cod))
            uint2devclass((uint32_t)cod, dev_class);
          btif_config_get_int(name, "PinLength", &pin_length);
          BTA_DmAddDevice(bd_addr, dev_class, link_key, 0, 0,
                          (uint8_t)linkkey_type, 0, pin_length);
          BTA_DmAddDevice(bd_addr, dev_class, link_key, (uint8_t)linkkey_type,
                          pin_length);

          if (btif_config_get_int(name, "DevType", &device_type) &&
              (device_type == BT_DEVICE_TYPE_DUMO)) {