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

Commit 91d348bc authored by Chris Manton's avatar Chris Manton
Browse files

gd_acl: SCO temporary fix

Assume unknown disconnects are from SCO and
respond accordingly

Bug: 166280067
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Icce62bdc05f4e7ba17b1a05ca40b0db42d8e5cc8
parent b8a3fc10
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2830,8 +2830,12 @@ void acl_disconnect_after_role_switch(uint16_t conn_handle,
                                      tHCI_STATUS reason) {
  tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(conn_handle);
  if (p_acl == nullptr) {
    LOG_ERROR("Sending disconnect for unknown acl PLEASE FIX");
    LOG_ERROR("Sending disconnect for unknown acl:%hu PLEASE FIX", conn_handle);
    GetLegacyHciInterface().Disconnect(conn_handle, reason);
    if (bluetooth::shim::is_gd_acl_enabled() &&
        btm_sco_removed(conn_handle, HCI_ERR_CONN_CAUSE_LOCAL_HOST))
      LOG_ERROR(
          "Assuming this was a SCO connection and short circuiting disconnect");
    return;
  }