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

Commit f2055a3c authored by Chris Manton's avatar Chris Manton
Browse files

mock: [37/63] Remove BTM_ReadDevInfo

Use get_btm_client_interface() instead

Bug: 352129816
Test: m .
Flag: EXEMPT, Test infrastructure

Change-Id: Ibfdc15193a86a6798d07b00c8e2106ad93ea5c4d
parent aa277f23
Loading
Loading
Loading
Loading
+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;
  }
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ bool BTM_UseLeLink(const RawAddress& bd_addr) {

  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);
  return dev_type == BT_DEVICE_TYPE_BLE;
}

+2 −3
Original line number Diff line number Diff line
@@ -23,9 +23,8 @@
#include "btif/include/btif_storage.h"
#include "btm_ble_api.h"
#include "device/include/device_iot_config.h"
#include "internal_include/bt_target.h"
#include "os/log.h"
#include "stack/acl/acl.h"
#include "stack/include/btm_client_interface.h"

using namespace bluetooth;

@@ -64,7 +63,7 @@ void btm_iot_save_remote_properties(tACL_CONN* p_acl_cb) {

  DEVICE_IOT_CONFIG_ADDR_SET_INT(p_acl_cb->remote_addr, IOT_CONF_KEY_DEVCLASS, (int)cod);

  BTM_ReadDevInfo(p_acl_cb->remote_addr, &dev_type, &addr_type);
  get_btm_client_interface().peer.BTM_ReadDevInfo(p_acl_cb->remote_addr, &dev_type, &addr_type);

  // save remote dev type to iot conf file
  DEVICE_IOT_CONFIG_ADDR_SET_INT(p_acl_cb->remote_addr, IOT_CONF_KEY_DEVTYPE, (int)dev_type);
Loading