p_cb->mode = p_data->api_conn.mode;
bta_hh_cb.p_cur = p_cb;
- if (bta_hh_is_le_device(p_cb, p_data->api_conn.bd_addr)) {
+ if (BTM_UseLeLink(p_data->api_conn.bd_addr)) {
+ p_cb->is_le_device = true;
bta_hh_le_open_conn(p_cb, p_data->api_conn.bd_addr);
return;
}
dev_info.bda = p_dev_info->bda;
/* initialize callback data */
if (p_cb->hid_handle == BTA_HH_INVALID_HANDLE) {
- if (bta_hh_is_le_device(p_cb, p_data->api_conn.bd_addr)) {
+ if (BTM_UseLeLink(p_data->api_conn.bd_addr)) {
+ p_cb->is_le_device = true;
dev_info.handle = bta_hh_le_add_device(p_cb, p_dev_info);
if (dev_info.handle != BTA_HH_INVALID_HANDLE)
dev_info.status = BTA_HH_OK;
extern void bta_hh_le_enable(void);
extern bool bta_hh_le_is_hh_gatt_if(tGATT_IF client_if);
extern void bta_hh_le_deregister(void);
-extern bool bta_hh_is_le_device(tBTA_HH_DEV_CB* p_cb,
- const RawAddress& remote_bda);
extern void bta_hh_le_open_conn(tBTA_HH_DEV_CB* p_cb,
const RawAddress& remote_bda);
extern void bta_hh_le_api_disc_act(tBTA_HH_DEV_CB* p_cb);
******************************************************************************/
void bta_hh_le_deregister(void) { BTA_GATTC_AppDeregister(bta_hh_cb.gatt_if); }
-/*******************************************************************************
- *
- * Function bta_hh_is_le_device
- *
- * Description Check to see if the remote device is a LE only device
- *
- * Parameters:
- *
- ******************************************************************************/
-bool bta_hh_is_le_device(tBTA_HH_DEV_CB* p_cb, const RawAddress& remote_bda) {
- p_cb->is_le_device = BTM_UseLeLink(remote_bda);
-
- return p_cb->is_le_device;
-}
-
/******************************************************************************
*
* Function bta_hh_le_get_le_cb