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

Commit acbc0620 authored by Chris Manton's avatar Chris Manton Committed by Gerrit Code Review
Browse files

Merge changes I6d2b45e2,I1f4296f7,Ib7e57c70,Ibfdc1519,I9aede18a into main

* changes:
  mock: [40/63] Remove BTM_ReadRemoteDeviceName
  mock: [39/63] Remove BTM_ReadLocalDeviceNameFromController
  mock: [38/63] Remove BTM_ReadLocalDeviceName
  mock: [37/63] Remove BTM_ReadDevInfo
  mock: [36/63] Remove BTM_ReadConnectedTransportAddress
parents 5312ce77 7a9946f0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1243,7 +1243,8 @@ static void bta_dm_set_eir(char* local_name) {

  /* if local name is not provided, get it from controller */
  if (local_name == NULL) {
    if (BTM_ReadLocalDeviceName((const char**)&local_name) != BTM_SUCCESS) {
    if (get_btm_client_interface().local.BTM_ReadLocalDeviceName((const char**)&local_name) !=
        BTM_SUCCESS) {
      log::error("Fail to read local device name for EIR");
    }
  }
+0 −2
Original line number Diff line number Diff line
@@ -139,8 +139,6 @@ TEST_F(BtaSecTest, bta_dm_sp_cback__BTM_SP_CFM_REQ_EVT_WithoutName_RNRSuccess) {
          btm_status_text(bluetooth::legacy::testing::bta_dm_sp_cback(BTM_SP_CFM_REQ_EVT, &data)));
  ASSERT_EQ(kNumVal, bta_dm_sec_cb.num_val);
  ASSERT_FALSE(callback_sent);

  test::mock::stack_btm_inq::BTM_ReadRemoteDeviceName = {};
}

TEST_F(BtaSecTest, bta_dm_sp_cback__BTM_SP_CFM_REQ_EVT_WithoutName_RNRFail) {
+2 −2
Original line number Diff line number Diff line
@@ -731,7 +731,7 @@ bool is_device_le_audio_capable(const RawAddress bd_addr) {

  tBT_DEVICE_TYPE tmp_dev_type;
  tBLE_ADDR_TYPE addr_type = BLE_ADDR_PUBLIC;
  BTM_ReadDevInfo(bd_addr, &tmp_dev_type, &addr_type);
  get_btm_client_interface().peer.BTM_ReadDevInfo(bd_addr, &tmp_dev_type, &addr_type);
  if (tmp_dev_type & BT_DEVICE_TYPE_BLE) {
    /* LE Audio capable device is discoverable over both LE and Classic using
     * same address. Prefer to use LE transport, as we don't know if it can do
@@ -793,7 +793,7 @@ static void btif_dm_cb_create_bond(const RawAddress bd_addr, tBT_TRANSPORT trans
      // didn't store it, it defaults to BLE_ADDR_PUBLIC
      uint8_t tmp_dev_type;
      tBLE_ADDR_TYPE tmp_addr_type = BLE_ADDR_PUBLIC;
      BTM_ReadDevInfo(bd_addr, &tmp_dev_type, &tmp_addr_type);
      get_btm_client_interface().peer.BTM_ReadDevInfo(bd_addr, &tmp_dev_type, &tmp_addr_type);
      addr_type = tmp_addr_type;

      btif_storage_set_remote_addr_type(&bd_addr, addr_type);
+1 −1
Original line number Diff line number Diff line
@@ -1484,7 +1484,7 @@ static void btif_hh_transport_select(tAclLinkSpec& link_spec) {
  // Find the device type
  tBT_DEVICE_TYPE dev_type;
  tBLE_ADDR_TYPE addr_type;
  BTM_ReadDevInfo(bd_addr, &dev_type, &addr_type);
  get_btm_client_interface().peer.BTM_ReadDevInfo(bd_addr, &dev_type, &addr_type);

  // Find which transports are already connected
  bool bredr_acl =
+2 −2
Original line number Diff line number Diff line
@@ -1571,7 +1571,7 @@ tBTM_STATUS BTM_ReadRSSI(const RawAddress& remote_bda, tBTM_CMPL_CB* p_cb) {
    return BTM_BUSY;
  }

  BTM_ReadDevInfo(remote_bda, &dev_type, &addr_type);
  get_btm_client_interface().peer.BTM_ReadDevInfo(remote_bda, &dev_type, &addr_type);

  if (dev_type & BT_DEVICE_TYPE_BLE) {
    p = internal_.btm_bda_to_acl(remote_bda, BT_TRANSPORT_LE);
@@ -1617,7 +1617,7 @@ tBTM_STATUS BTM_ReadFailedContactCounter(const RawAddress& remote_bda, tBTM_CMPL
    return BTM_BUSY;
  }

  BTM_ReadDevInfo(remote_bda, &dev_type, &addr_type);
  get_btm_client_interface().peer.BTM_ReadDevInfo(remote_bda, &dev_type, &addr_type);
  if (dev_type == BT_DEVICE_TYPE_BLE) {
    transport = BT_TRANSPORT_LE;
  }
Loading