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

Commit 7b932dfb authored by Chris Manton's avatar Chris Manton
Browse files

Remove name from BTM_SecAddBleDevice

bd_name is always nullptr

Toward readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I0ef22f288425dad0cc08d4e43acc12e5dd51d6dd
parent 95e579ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3410,7 +3410,7 @@ void bta_dm_add_blekey(const RawAddress& bd_addr, tBTA_LE_KEY_VALUE blekey,
 ******************************************************************************/
void bta_dm_add_ble_device(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
                           tBT_DEVICE_TYPE dev_type) {
  if (!BTM_SecAddBleDevice(bd_addr, NULL, dev_type, addr_type)) {
  if (!BTM_SecAddBleDevice(bd_addr, dev_type, addr_type)) {
    LOG(ERROR) << "BTA_DM: Error adding BLE Device for device " << bd_addr;
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -1863,7 +1863,7 @@ void btif_dm_create_bond_out_of_band(const RawAddress bd_addr, int transport,
    if (address_type == BLE_ADDR_PUBLIC || address_type == BLE_ADDR_RANDOM) {
      // bd_addr->address is already reversed, so use it instead of
      // oob_data->le_bt_dev_addr
      BTM_SecAddBleDevice(bd_addr, NULL, BT_DEVICE_TYPE_BLE, address_type);
      BTM_SecAddBleDevice(bd_addr, BT_DEVICE_TYPE_BLE, address_type);
    }
  }

+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ bt_status_t btif_gattc_test_command_impl(int command,
               params->bda1->ToString().c_str(), params->u1, params->u2);

      if (params->u1 == BT_DEVICE_TYPE_BLE)
        BTM_SecAddBleDevice(*params->bda1, NULL, BT_DEVICE_TYPE_BLE,
        BTM_SecAddBleDevice(*params->bda1, BT_DEVICE_TYPE_BLE,
                            static_cast<tBLE_ADDR_TYPE>(params->u2));

      if (!GATT_Connect(test_cb.gatt_if, *params->bda1, true, BT_TRANSPORT_LE,
+0 −1
Original line number Diff line number Diff line
@@ -909,7 +909,6 @@ uint8_t bluetooth::shim::BTM_GetEirUuidList(uint8_t* p_eir, size_t eir_len,
}

bool bluetooth::shim::BTM_SecAddBleDevice(const RawAddress& bd_addr,
                                          BD_NAME bd_name,
                                          tBT_DEVICE_TYPE dev_type,
                                          tBLE_ADDR_TYPE addr_type) {
  LOG_INFO("UNIMPLEMENTED %s", __func__);
+2 −3
Original line number Diff line number Diff line
@@ -394,15 +394,14 @@ uint8_t BTM_GetEirUuidList(uint8_t* p_eir, size_t eir_len, uint8_t uuid_size,
 *                  for a LE device stored in the NVRAM.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  bd_name          - Name of the peer device. NULL if unknown.
 *                  dev_type         - Remote device's device type.
 *                  addr_type        - LE device address type.
 *
 * Returns          true if added OK, else false
 *
 ******************************************************************************/
bool BTM_SecAddBleDevice(const RawAddress& bd_addr, BD_NAME bd_name,
                         tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type);
bool BTM_SecAddBleDevice(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type,
                         tBLE_ADDR_TYPE addr_type);

/*******************************************************************************
 *
Loading