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

Commit dfa73082 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "GATT: Unregister notifications when disconnecting" am: a2d29496 am:...

Merge "GATT: Unregister notifications when disconnecting" am: a2d29496 am: 9d8a0af3 am: e09e9188

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2134471



Change-Id: Ifa0d04237a4da898a0f7eded0c5db33e04939899
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ec5fc6bc e09e9188
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -604,6 +604,14 @@ void bta_gattc_close(tBTA_GATTC_CLCB* p_clcb, const tBTA_GATTC_DATA* p_data) {
    bta_sys_conn_close(BTA_ID_GATTC, BTA_ALL_APP_ID, p_clcb->bda);
  }

  /* Clean up notification registration for closed client */
  for (int i = 0; i < BTA_GATTC_NOTIF_REG_MAX; i++) {
    if (p_clreg->notif_reg[i].in_use &&
        p_clreg->notif_reg[i].remote_bda == p_clcb->bda) {
      p_clreg->notif_reg[i] = {};
    }
  }

  bta_gattc_clcb_dealloc(p_clcb);

  if (p_data->hdr.event == BTA_GATTC_API_CLOSE_EVT) {