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

Commit 76b8dd08 authored by Abdelrahman Daim's avatar Abdelrahman Daim Committed by Omair Kamil
Browse files

Include gatt disconnect reason in BT dumpsys



Summary: BT dumpsys always logs reason 0 in case of gatt disconnect, add the reason.

Bug: 361326075
Flag: EXEMPT, logging change

Test: m Bluetooth, Observed the bt dumpsys after bel connect/disconnect

Change-Id: Icf05b0b74c538ee2bbe156c4458aaadc7cda5adf
Signed-off-by: default avatarAbdelrahman Daim <adaim@meta.com>
parent ec85141f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1450,11 +1450,11 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, const RawAddress& bdaddr, ui
  if (connected) {
    log::info("Connected client_if:{} addr:{}, transport:{} reason:{}", gattc_if, bdaddr,
              bt_transport_text(transport), gatt_disconnection_reason_text(reason));
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_CONNECTED, GATT_CONN_OK);
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_CONNECTED, reason);
  } else {
    log::info("Disconnected att_id:{} addr:{}, transport:{} reason:{}", gattc_if, bdaddr,
              bt_transport_text(transport), gatt_disconnection_reason_text(reason));
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, GATT_CONN_OK);
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, reason);
  }

  tBTA_GATTC_DATA* p_buf = (tBTA_GATTC_DATA*)osi_calloc(sizeof(tBTA_GATTC_DATA));