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

Commit c36671a9 authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Automerger Merge Worker
Browse files

Merge "Reset HID host callback after cleanup is complete" am: a1358322 am:...

Merge "Reset HID host callback after cleanup is complete" am: a1358322 am: d0763204 am: 13a6bef8

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



Change-Id: I0aaf3a0ffe79d818d73f2d980b4ee1dbed2d5c3d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 36f3ee7d 13a6bef8
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -775,6 +775,10 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) {
      break;

    case BTA_HH_DISABLE_EVT:
      if (btif_hh_cb.status == BTIF_HH_DISABLING) {
        bt_hh_callbacks = NULL;
      }

      btif_hh_cb.status = BTIF_HH_DISABLED;
      if (btif_hh_cb.service_dereg_active) {
        BTIF_TRACE_DEBUG("BTA_HH_DISABLE_EVT: enabling HID Device service");
@@ -1806,7 +1810,8 @@ static void cleanup(void) {
  BTIF_TRACE_EVENT("%s", __func__);
  btif_hh_device_t* p_dev;
  int i;
  if (btif_hh_cb.status == BTIF_HH_DISABLED) {
  if (btif_hh_cb.status == BTIF_HH_DISABLED ||
      btif_hh_cb.status == BTIF_HH_DISABLING) {
    BTIF_TRACE_WARNING("%s: HH disabling or disabled already, status = %d",
                       __func__, btif_hh_cb.status);
    return;
@@ -1817,7 +1822,6 @@ static void cleanup(void) {
     */
    btif_hh_cb.service_dereg_active = FALSE;
    btif_disable_service(BTA_HID_SERVICE_ID);
    bt_hh_callbacks = NULL;
  }
  for (i = 0; i < BTIF_HH_MAX_HID; i++) {
    p_dev = &btif_hh_cb.devices[i];