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

Commit 4172b7f8 authored by Gopi Sakshihally Bhuthaiah's avatar Gopi Sakshihally Bhuthaiah Committed by Gerrit Code Review
Browse files

Merge "HID Bluetooth crash fix" into main

parents f5a5c416 cceb8e52
Loading
Loading
Loading
Loading
+26 −22
Original line number Diff line number Diff line
@@ -1238,14 +1238,19 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) {
      log::verbose("BTA_HH_VC_UNPLUG_EVT: status = {}, handle = {}",
                   p_data->dev_status.status, p_data->dev_status.handle);
      p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);

      if (p_dev == NULL) {
        log::error("BTA_HH_VC_UNPLUG_EVT: device not found handle {}",
                   p_data->dev_status.handle);
        return;
      }

      if (p_dev->link_spec.transport == BT_TRANSPORT_LE) {
        log::error("BTA_HH_VC_UNPLUG_EVT: not expected for {}",
                   p_dev->link_spec.ToRedactedStringForLogging());
        return;
      }

      btif_hh_cb.status = (BTIF_HH_STATUS)BTIF_HH_DEV_DISCONNECTED;
      if (p_dev != NULL) {
      log::verbose("BTA_HH_VC_UNPLUG_EVT: link_spec = {}",
                   p_dev->link_spec.ToRedactedStringForLogging());

@@ -1267,7 +1272,6 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) {
                &(p_dev->link_spec.addrt.bda), p_dev->link_spec.addrt.type,
                p_dev->link_spec.transport,
                (bthh_status_t)p_data->dev_status.status);
      }
      break;

    case BTA_HH_API_ERR_EVT: