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

Commit e628a40d authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Gerrit Code Review
Browse files

Merge "Remove pending HID connection when removing the device" into main

parents 8234b73e 10d5cc12
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -978,6 +978,9 @@ void bta_hh_maint_dev_act(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* p_data) {

          /* remove from known device list in BTA */
          bta_hh_clean_up_kdev(p_cb);
        } else if (com::android::bluetooth::flags::remove_pending_hid_connection()) {
          log::warn("Failed to remove device {}", dev_info.link_spec);
          bta_hh_clean_up_kdev(p_cb);
        }
      }
      break;
+5 −0
Original line number Diff line number Diff line
@@ -977,6 +977,11 @@ void btif_hh_remove_device(const tAclLinkSpec& link_spec) {
    } else {
      log::warn("device_num = 0");
    }

    if (com::android::bluetooth::flags::remove_pending_hid_connection()) {
      BTA_HhRemoveDev(p_dev->dev_handle);  // Remove the connection, in case it was pending
    }

    bta_hh_co_close(p_dev);
    p_dev->dev_status = BTHH_CONN_STATE_UNKNOWN;
    p_dev->dev_handle = BTA_HH_INVALID_HANDLE;