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

Commit 63e48c29 authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

HID host native cleanup

Log the link specification instead of raw address. Use consistent
logging format. Replace link spec pointers with link spec refrence
wherever possible.

Bug: 324120239
Test: mma packages/modules/Bluetooth
Flag: EXEMPT no logical change
Change-Id: I0f268fd4a7445f68412d8516d7835577fa3f9f87
parent 27cb2e93
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -519,7 +519,6 @@ void bta_hh_connect(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) {
 * Returns          void
 *
 ******************************************************************************/
void btif_hh_remove_device(tAclLinkSpec link_spec);
void bta_hh_api_disc_act(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) {
  CHECK(p_cb != nullptr);

+2 −2
Original line number Diff line number Diff line
@@ -132,9 +132,9 @@ typedef struct {
extern btif_hh_cb_t btif_hh_cb;

btif_hh_device_t* btif_hh_find_connected_dev_by_handle(uint8_t handle);
bt_status_t btif_hh_connect(const tAclLinkSpec& link_spec);
bt_status_t btif_hh_virtual_unplug(const tAclLinkSpec& link_spec);
void btif_hh_remove_device(const tAclLinkSpec& link_spec);
bt_status_t btif_hh_virtual_unplug(const tAclLinkSpec* link_spec);
void btif_hh_disconnect(const tAclLinkSpec* link_spec);
void btif_hh_setreport(btif_hh_device_t* p_dev, bthh_report_type_t r_type,
                       uint16_t size, uint8_t* report);
void btif_hh_senddata(btif_hh_device_t* p_dev, uint16_t size, uint8_t* report);
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@
 ******************************************************************************/

bt_status_t btif_storage_add_hid_device_info(
    tAclLinkSpec* link_spec, uint16_t attr_mask, uint8_t sub_class,
    const tAclLinkSpec& link_spec, uint16_t attr_mask, uint8_t sub_class,
    uint8_t app_id, uint16_t vendor_id, uint16_t product_id, uint16_t version,
    uint8_t ctry_code, uint16_t ssr_max_latency, uint16_t ssr_min_tout,
    uint16_t dl_len, uint8_t* dsc_list);
+3 −3
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ bt_status_t btif_storage_load_bonded_devices(void);
 ******************************************************************************/

bt_status_t btif_storage_add_hid_device_info(
    tAclLinkSpec* link_spec, uint16_t attr_mask, uint8_t sub_class,
    const tAclLinkSpec& link_spec, uint16_t attr_mask, uint8_t sub_class,
    uint8_t app_id, uint16_t vendor_id, uint16_t product_id, uint16_t version,
    uint8_t ctry_code, uint16_t ssr_max_latency, uint16_t ssr_min_tout,
    uint16_t dl_len, uint8_t* dsc_list);
@@ -447,7 +447,7 @@ bool btif_storage_get_stored_remote_name(const RawAddress& bd_addr, char* name);
 ******************************************************************************/

bt_status_t btif_storage_set_hid_connection_policy(
    const tAclLinkSpec* link_spec, bool reconnect_allowed);
    const tAclLinkSpec& link_spec, bool reconnect_allowed);

/*******************************************************************************
 *
@@ -460,7 +460,7 @@ bt_status_t btif_storage_set_hid_connection_policy(
 ******************************************************************************/

bt_status_t btif_storage_get_hid_connection_policy(
    const tAclLinkSpec* link_spec, bool* reconnect_allowed);
    const tAclLinkSpec& link_spec, bool* reconnect_allowed);

/******************************************************************************
 * Exported for unit tests
+2 −2
Original line number Diff line number Diff line
@@ -107,8 +107,8 @@ struct CodecInterface {
// that profiles can register themselves to.
struct HACK_ProfileInterface {
  // HID hacks
  bt_status_t (*btif_hh_connect)(const tAclLinkSpec* link_spec);
  bt_status_t (*btif_hh_virtual_unplug)(const tAclLinkSpec* link_spec);
  bt_status_t (*btif_hh_connect)(const tAclLinkSpec& link_spec);
  bt_status_t (*btif_hh_virtual_unplug)(const tAclLinkSpec& link_spec);
  tBTA_HH_STATUS (*bta_hh_read_ssr_param)(const tAclLinkSpec& link_spec,
                                          uint16_t* p_max_ssr_lat,
                                          uint16_t* p_min_ssr_tout);
Loading