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

Commit 1b31bad0 authored by Zero Liu's avatar Zero Liu Committed by Huirong Liao
Browse files

Fix BTLE percision mouse can not use issue

[Root Cause]
BTLE Precision Mouse sends "Error code: Read Not Permitted"
for read report map request, that will cause DUT get descp len 0

[Solution]
managed to avoid get descp len 0.

Bug: 249709008
Test: atest net_test_btif_hh

Change-Id: Ia90d3390666e1eca5312ee51009810fc0015ef44
parent f7a75b6d
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -1997,8 +1997,12 @@ void bta_hh_le_write_dev_act(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) {
 ******************************************************************************/
 ******************************************************************************/
void bta_hh_le_get_dscp_act(tBTA_HH_DEV_CB* p_cb) {
void bta_hh_le_get_dscp_act(tBTA_HH_DEV_CB* p_cb) {
  if (p_cb->hid_srvc.state >= BTA_HH_SERVICE_DISCOVERED) {
  if (p_cb->hid_srvc.state >= BTA_HH_SERVICE_DISCOVERED) {
    if (p_cb->hid_srvc.descriptor.dl_len != 0) {
      p_cb->dscp_info.descriptor.dl_len = p_cb->hid_srvc.descriptor.dl_len;
      p_cb->dscp_info.descriptor.dl_len = p_cb->hid_srvc.descriptor.dl_len;
      p_cb->dscp_info.descriptor.dsc_list = p_cb->hid_srvc.descriptor.dsc_list;
      p_cb->dscp_info.descriptor.dsc_list = p_cb->hid_srvc.descriptor.dsc_list;
    } else {
      LOG_WARN("hid_srvc.descriptor.dl_len is 0");
    }


    (*bta_hh_cb.p_cback)(BTA_HH_GET_DSCP_EVT, (tBTA_HH*)&p_cb->dscp_info);
    (*bta_hh_cb.p_cback)(BTA_HH_GET_DSCP_EVT, (tBTA_HH*)&p_cb->dscp_info);
  }
  }