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

Commit 6f7bd9c7 authored by Chris Manton's avatar Chris Manton
Browse files

Streamline bta/hh/bta_hh_le::bta_hh_gatt_close

Bug: 163134718
Test: cert
Tag: #refactor

Change-Id: I02e2cd2064b387d42269b08fd178c74222cbf2d3
parent 86313c0f
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -1667,14 +1667,17 @@ void bta_hh_gatt_close(tBTA_HH_DEV_CB* p_cb, tBTA_HH_DATA* p_data) {
 *
 ******************************************************************************/
void bta_hh_le_api_disc_act(tBTA_HH_DEV_CB* p_cb) {
  if (p_cb->conn_id != GATT_INVALID_CONN_ID) {
  if (p_cb->conn_id == GATT_INVALID_CONN_ID) {
    LOG_ERROR("Tried to disconnect HID device with invalid id");
    return;
  }

  BtaGattQueue::Clean(p_cb->conn_id);
  BTA_GATTC_Close(p_cb->conn_id);
  /* remove device from background connection if intended to disconnect,
     do not allow reconnection */
  bta_hh_le_remove_dev_bg_conn(p_cb);
}
}

/*******************************************************************************
 *