Loading system/bta/hh/bta_hh_act.cc +6 −1 Original line number Diff line number Diff line Loading @@ -907,10 +907,15 @@ void bta_hh_close_act(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) { void bta_hh_get_dscp_act(tBTA_HH_DEV_CB* p_cb, UNUSED_ATTR const tBTA_HH_DATA* p_data) { if (p_cb->is_le_device) { if (p_cb->hid_srvc.in_use) { p_cb->dscp_info.hid_handle = p_cb->hid_handle; } bta_hh_le_get_dscp_act(p_cb); } else } else { p_cb->dscp_info.hid_handle = p_cb->hid_handle; (*bta_hh_cb.p_cback)(BTA_HH_GET_DSCP_EVT, (tBTA_HH*)&p_cb->dscp_info); } } /******************************************************************************* * Loading system/bta/include/bta_hh_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,7 @@ typedef struct { uint8_t flag; tBTA_HH_DEV_DESCR descriptor; uint8_t hid_handle; std::string ToString() const { return base::StringPrintf("%04x::%04x::%04x", vendor_id, product_id, Loading system/btif/include/btif_hh.h +0 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,6 @@ typedef struct { btif_hh_device_t devices[BTIF_HH_MAX_HID]; uint32_t device_num; btif_hh_added_device_t added_devices[BTIF_HH_MAX_ADDED_DEV]; btif_hh_device_t* p_curr_dev; bool service_dereg_active; RawAddress pending_conn_address; } btif_hh_cb_t; Loading system/btif/src/btif_hh.cc +2 −3 Original line number Diff line number Diff line Loading @@ -811,8 +811,6 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) { if (check_cod(&p_data->conn.bda, COD_HID_KEYBOARD) || check_cod(&p_data->conn.bda, COD_HID_COMBO)) BTA_HhSetIdle(p_data->conn.handle, 0); btif_hh_cb.p_curr_dev = btif_hh_find_connected_dev_by_handle(p_data->conn.handle); BTA_HhGetDscpInfo(p_data->conn.handle); p_dev->dev_status = BTHH_CONN_STATE_CONNECTED; HAL_CBACK(bt_hh_callbacks, connection_state_cb, &(p_dev->bd_addr), Loading Loading @@ -956,10 +954,11 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) { case BTA_HH_GET_DSCP_EVT: len = p_data->dscp_info.descriptor.dl_len; BTIF_TRACE_DEBUG("BTA_HH_GET_DSCP_EVT: len = %d", len); p_dev = btif_hh_cb.p_curr_dev; p_dev = btif_hh_find_connected_dev_by_handle(p_data->dscp_info.hid_handle); if (p_dev == NULL) { BTIF_TRACE_ERROR( "BTA_HH_GET_DSCP_EVT: No HID device is currently connected"); p_data->dscp_info.hid_handle = BTA_HH_INVALID_HANDLE; return; } if (p_dev->fd < 0) { Loading Loading
system/bta/hh/bta_hh_act.cc +6 −1 Original line number Diff line number Diff line Loading @@ -907,10 +907,15 @@ void bta_hh_close_act(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) { void bta_hh_get_dscp_act(tBTA_HH_DEV_CB* p_cb, UNUSED_ATTR const tBTA_HH_DATA* p_data) { if (p_cb->is_le_device) { if (p_cb->hid_srvc.in_use) { p_cb->dscp_info.hid_handle = p_cb->hid_handle; } bta_hh_le_get_dscp_act(p_cb); } else } else { p_cb->dscp_info.hid_handle = p_cb->hid_handle; (*bta_hh_cb.p_cback)(BTA_HH_GET_DSCP_EVT, (tBTA_HH*)&p_cb->dscp_info); } } /******************************************************************************* * Loading
system/bta/include/bta_hh_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,7 @@ typedef struct { uint8_t flag; tBTA_HH_DEV_DESCR descriptor; uint8_t hid_handle; std::string ToString() const { return base::StringPrintf("%04x::%04x::%04x", vendor_id, product_id, Loading
system/btif/include/btif_hh.h +0 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,6 @@ typedef struct { btif_hh_device_t devices[BTIF_HH_MAX_HID]; uint32_t device_num; btif_hh_added_device_t added_devices[BTIF_HH_MAX_ADDED_DEV]; btif_hh_device_t* p_curr_dev; bool service_dereg_active; RawAddress pending_conn_address; } btif_hh_cb_t; Loading
system/btif/src/btif_hh.cc +2 −3 Original line number Diff line number Diff line Loading @@ -811,8 +811,6 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) { if (check_cod(&p_data->conn.bda, COD_HID_KEYBOARD) || check_cod(&p_data->conn.bda, COD_HID_COMBO)) BTA_HhSetIdle(p_data->conn.handle, 0); btif_hh_cb.p_curr_dev = btif_hh_find_connected_dev_by_handle(p_data->conn.handle); BTA_HhGetDscpInfo(p_data->conn.handle); p_dev->dev_status = BTHH_CONN_STATE_CONNECTED; HAL_CBACK(bt_hh_callbacks, connection_state_cb, &(p_dev->bd_addr), Loading Loading @@ -956,10 +954,11 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) { case BTA_HH_GET_DSCP_EVT: len = p_data->dscp_info.descriptor.dl_len; BTIF_TRACE_DEBUG("BTA_HH_GET_DSCP_EVT: len = %d", len); p_dev = btif_hh_cb.p_curr_dev; p_dev = btif_hh_find_connected_dev_by_handle(p_data->dscp_info.hid_handle); if (p_dev == NULL) { BTIF_TRACE_ERROR( "BTA_HH_GET_DSCP_EVT: No HID device is currently connected"); p_data->dscp_info.hid_handle = BTA_HH_INVALID_HANDLE; return; } if (p_dev->fd < 0) { Loading