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

Commit f85b7aec authored by Chris Manton's avatar Chris Manton
Browse files

Streamline main/shim/acl::_reason

Bug: 166280067
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I5c494deb85fbb3101602078dcaeefc98ac695754
parent 82075007
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -482,23 +482,22 @@ void bluetooth::shim::legacy::Acl::CancelLeConnection(

void bluetooth::shim::legacy::Acl::OnClassicLinkDisconnected(
    HciHandle handle, hci::ErrorCode reason) {
  tHCI_STATUS legacy_reason = ToLegacyHciErrorCode(reason);
  LOG_DEBUG("Classic link disconnected handle:%hu reason:%s", handle,
            hci_error_code_text(legacy_reason).c_str());
            ErrorCodeText(reason).c_str());
  TRY_POSTING_ON_MAIN(acl_interface_.connection.classic.on_disconnected,
                      ToLegacyHciErrorCode(hci::ErrorCode::SUCCESS), handle,
                      legacy_reason);
                      ToLegacyHciErrorCode(reason));
  pimpl_->handle_to_classic_connection_map_.erase(handle);
}

void bluetooth::shim::legacy::Acl::OnLeLinkDisconnected(HciHandle handle,
                                                        hci::ErrorCode reason) {
  tHCI_STATUS legacy_reason = ToLegacyHciErrorCode(reason);
  LOG_DEBUG("Le link disconnected handle:%hu reason:%s", handle,
            hci_error_code_text(legacy_reason).c_str());
            ErrorCodeText(reason).c_str());
  pimpl_->handle_to_le_connection_map_.erase(handle);
  TRY_POSTING_ON_MAIN(acl_interface_.connection.le.on_disconnected,
                      ToLegacyHciErrorCode(hci::ErrorCode::SUCCESS), handle,
                      legacy_reason);
                      ToLegacyHciErrorCode(reason));
  pimpl_->handle_to_le_connection_map_.erase(handle);
}