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

Commit 532c9c9a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "HID: Remove device from database in error case"

parents 3b255bf6 8f2db260
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -543,6 +543,14 @@ bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr) {
    p_dev->local_vup = true;
    p_dev->local_vup = true;
    BTA_HhSendCtrl(p_dev->dev_handle, BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG);
    BTA_HhSendCtrl(p_dev->dev_handle, BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG);
    return BT_STATUS_SUCCESS;
    return BT_STATUS_SUCCESS;
  } else if ((p_dev != NULL) &&
             (p_dev->dev_status == BTHH_CONN_STATE_CONNECTED)) {
    BTIF_TRACE_ERROR("%s: Virtual unplug not suported, disconnecting device");
    /* start the timer */
    btif_hh_start_vup_timer(bd_addr);
    p_dev->local_vup = true;
    BTA_HhClose(p_dev->dev_handle);
    return BT_STATUS_SUCCESS;
  } else {
  } else {
    BTIF_TRACE_ERROR("%s: Error, device %s not opened, status = %d", __func__,
    BTIF_TRACE_ERROR("%s: Error, device %s not opened, status = %d", __func__,
                     bd_addr->ToString().c_str(), btif_hh_cb.status);
                     bd_addr->ToString().c_str(), btif_hh_cb.status);