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

Commit 0b019e84 authored by Rahul Arya's avatar Rahul Arya Committed by Android (Google) Code Review
Browse files

Merge "Supply status on GATT close" into tm-qpr-dev

parents 5b689ffa 19c350b7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -596,6 +596,7 @@ void bta_gattc_close_fail(tBTA_GATTC_CLCB* p_clcb,
    cb_data.close.conn_id = p_data->hdr.layer_specific;
    cb_data.close.remote_bda = p_clcb->bda;
    cb_data.close.reason = BTA_GATT_CONN_NONE;
    cb_data.close.status = GATT_ERROR;

    LOG(WARNING) << __func__ << ": conn_id=" << loghex(cb_data.close.conn_id)
                 << ". Returns GATT_ERROR(" << +GATT_ERROR << ").";
@@ -646,7 +647,7 @@ void bta_gattc_close(tBTA_GATTC_CLCB* p_clcb, const tBTA_GATTC_DATA* p_data) {
  bta_gattc_clcb_dealloc(p_clcb);

  if (p_data->hdr.event == BTA_GATTC_API_CLOSE_EVT) {
    GATT_Disconnect(p_data->hdr.layer_specific);
    cb_data.close.status = GATT_Disconnect(p_data->hdr.layer_specific);
    cb_data.close.reason = GATT_CONN_TERMINATE_LOCAL_HOST;
    LOG_DEBUG("Local close event client_if:%hu conn_id:%hu reason:%s",
              cb_data.close.client_if, cb_data.close.conn_id,
@@ -654,6 +655,7 @@ void bta_gattc_close(tBTA_GATTC_CLCB* p_clcb, const tBTA_GATTC_DATA* p_data) {
                  static_cast<tGATT_DISCONN_REASON>(cb_data.close.reason))
                  .c_str());
  } else if (p_data->hdr.event == BTA_GATTC_INT_DISCONN_EVT) {
    cb_data.close.status = static_cast<tGATT_STATUS>(p_data->int_conn.reason);
    cb_data.close.reason = p_data->int_conn.reason;
    LOG_DEBUG("Peer close disconnect event client_if:%hu conn_id:%hu reason:%s",
              cb_data.close.client_if, cb_data.close.conn_id,