Loading system/btif/src/btif_hh.cc +4 −22 Original line number Diff line number Diff line Loading @@ -1581,17 +1581,10 @@ static bt_status_t connect(RawAddress* bd_addr, tBLE_ADDR_TYPE addr_type, } btif_hh_device_t* p_dev = btif_hh_find_connected_dev_by_link_spec(link_spec); if (p_dev) { if (p_dev->dev_status == BTHH_CONN_STATE_CONNECTED || p_dev->dev_status == BTHH_CONN_STATE_CONNECTING) { if (p_dev != nullptr) { log::warn("device {} already connected", p_dev->link_spec.ToRedactedStringForLogging()); return BT_STATUS_DONE; } else if (p_dev->dev_status == BTHH_CONN_STATE_DISCONNECTING) { log::warn("device {} is busy with disconnecting", p_dev->link_spec.ToRedactedStringForLogging()); return BT_STATUS_BUSY; } } if (link_spec.transport == BT_TRANSPORT_AUTO) { Loading Loading @@ -1658,17 +1651,6 @@ static bt_status_t disconnect(RawAddress* bd_addr, tBLE_ADDR_TYPE addr_type, return BT_STATUS_UNHANDLED; } if (p_dev->dev_status == BTHH_CONN_STATE_DISCONNECTED || p_dev->dev_status == BTHH_CONN_STATE_DISCONNECTING) { log::error("device {} already disconnected.", p_dev->link_spec.ToRedactedStringForLogging()); return BT_STATUS_DONE; } else if (p_dev->dev_status == BTHH_CONN_STATE_CONNECTING) { log::error("device {} is busy with disconnecting.", p_dev->link_spec.ToRedactedStringForLogging()); return BT_STATUS_BUSY; } return btif_transfer_context(btif_hh_handle_evt, BTIF_HH_DISCONNECT_REQ_EVT, (char*)&p_dev->link_spec, sizeof(tAclLinkSpec), NULL); Loading Loading
system/btif/src/btif_hh.cc +4 −22 Original line number Diff line number Diff line Loading @@ -1581,17 +1581,10 @@ static bt_status_t connect(RawAddress* bd_addr, tBLE_ADDR_TYPE addr_type, } btif_hh_device_t* p_dev = btif_hh_find_connected_dev_by_link_spec(link_spec); if (p_dev) { if (p_dev->dev_status == BTHH_CONN_STATE_CONNECTED || p_dev->dev_status == BTHH_CONN_STATE_CONNECTING) { if (p_dev != nullptr) { log::warn("device {} already connected", p_dev->link_spec.ToRedactedStringForLogging()); return BT_STATUS_DONE; } else if (p_dev->dev_status == BTHH_CONN_STATE_DISCONNECTING) { log::warn("device {} is busy with disconnecting", p_dev->link_spec.ToRedactedStringForLogging()); return BT_STATUS_BUSY; } } if (link_spec.transport == BT_TRANSPORT_AUTO) { Loading Loading @@ -1658,17 +1651,6 @@ static bt_status_t disconnect(RawAddress* bd_addr, tBLE_ADDR_TYPE addr_type, return BT_STATUS_UNHANDLED; } if (p_dev->dev_status == BTHH_CONN_STATE_DISCONNECTED || p_dev->dev_status == BTHH_CONN_STATE_DISCONNECTING) { log::error("device {} already disconnected.", p_dev->link_spec.ToRedactedStringForLogging()); return BT_STATUS_DONE; } else if (p_dev->dev_status == BTHH_CONN_STATE_CONNECTING) { log::error("device {} is busy with disconnecting.", p_dev->link_spec.ToRedactedStringForLogging()); return BT_STATUS_BUSY; } return btif_transfer_context(btif_hh_handle_evt, BTIF_HH_DISCONNECT_REQ_EVT, (char*)&p_dev->link_spec, sizeof(tAclLinkSpec), NULL); Loading