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

Commit 57784a97 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Hearing aid: GATT disconnect reason is unused

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6361a0130a055dd104ea908b1e75b22022fc4001
parent dc28ce3f
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -1467,9 +1467,8 @@ class HearingAidImpl : public HearingAid {
    DoDisconnectAudioStop();
  }

  void OnGattDisconnected(tGATT_STATUS status, uint16_t conn_id,
                          tGATT_IF client_if, RawAddress remote_bda,
                          tBTA_GATT_REASON reason) {
  void OnGattDisconnected(uint16_t conn_id, tGATT_IF client_if,
                          RawAddress remote_bda) {
    HearingDevice* hearingDevice = hearingDevices.FindByConnId(conn_id);
    if (!hearingDevice) {
      VLOG(2) << "Skipping unknown device disconnect, conn_id="
@@ -1477,7 +1476,7 @@ class HearingAidImpl : public HearingAid {
      return;
    }
    VLOG(2) << __func__ << ": conn_id=" << loghex(conn_id)
            << ", reason=" << loghex(reason) << ", remote_bda=" << remote_bda;
            << ", remote_bda=" << remote_bda;

    // Inform the other side (if any) of this disconnection
    std::vector<uint8_t> inform_disconn_state(
@@ -1688,8 +1687,7 @@ void hearingaid_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC* p_data) {
    case BTA_GATTC_CLOSE_EVT: {
      if (!instance) return;
      tBTA_GATTC_CLOSE& c = p_data->close;
      instance->OnGattDisconnected(c.status, c.conn_id, c.client_if,
                                   c.remote_bda, c.reason);
      instance->OnGattDisconnected(c.conn_id, c.client_if, c.remote_bda);
    } break;

    case BTA_GATTC_SEARCH_CMPL_EVT: