Loading system/gd/metrics/bluetooth_event.cc +9 −0 Original line number Diff line number Diff line Loading @@ -260,5 +260,14 @@ void LogSDPComplete(const RawAddress& raw_address, tBTA_STATUS status) { status == tBTA_STATUS::BTA_SUCCESS ? State::SUCCESS : State::FAIL); } void LogLeAclCompletionEvent(const hci::Address& address, hci::ErrorCode reason, bool is_locally_initiated) { bluetooth::os::LogMetricBluetoothEvent(address, is_locally_initiated ? EventType::LE_ACL_CONNECTION_INITIATOR : EventType::LE_ACL_CONNECTION_RESPONDER, MapErrorCodeToState(reason)); } } // namespace metrics } // namespace bluetooth system/gd/metrics/bluetooth_event.h +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ void LogIncomingAclStartEvent(const hci::Address& address); void LogAclCompletionEvent(const hci::Address& address, hci::ErrorCode reason, bool is_locally_initiated); void LogLeAclCompletionEvent(const hci::Address& address, hci::ErrorCode reason, bool is_locally_initiated); void LogRemoteNameRequestCompletion(const RawAddress& raw_address, tHCI_STATUS hci_status); void LogAclDisconnectionEvent(const hci::Address& address, hci::ErrorCode reason, Loading system/main/shim/acl.cc +4 −0 Original line number Diff line number Diff line Loading @@ -1624,6 +1624,9 @@ void shim::Acl::OnLeConnectSuccess(hci::AddressWithType address_with_type, log::debug("Connection successful le remote:{} handle:{} initiator:{}", address_with_type, handle, (locally_initiated) ? "local" : "remote"); bluetooth::metrics::LogLeAclCompletionEvent(address_with_type.GetAddress(), hci::ErrorCode::SUCCESS, locally_initiated); BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type), "Connection successful", "Le"); } Loading @@ -1638,6 +1641,7 @@ void shim::Acl::OnLeConnectFail(hci::AddressWithType address_with_type, hci::Err TRY_POSTING_ON_MAIN(acl_interface_.connection.le.on_failed, legacy_address_with_type, handle, enhanced, status); bluetooth::metrics::LogLeAclCompletionEvent(address_with_type.GetAddress(), reason, true); pimpl_->shadow_acceptlist_.Remove(address_with_type); log::warn("Connection failed le remote:{}", address_with_type); BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type), "Connection failed", Loading Loading
system/gd/metrics/bluetooth_event.cc +9 −0 Original line number Diff line number Diff line Loading @@ -260,5 +260,14 @@ void LogSDPComplete(const RawAddress& raw_address, tBTA_STATUS status) { status == tBTA_STATUS::BTA_SUCCESS ? State::SUCCESS : State::FAIL); } void LogLeAclCompletionEvent(const hci::Address& address, hci::ErrorCode reason, bool is_locally_initiated) { bluetooth::os::LogMetricBluetoothEvent(address, is_locally_initiated ? EventType::LE_ACL_CONNECTION_INITIATOR : EventType::LE_ACL_CONNECTION_RESPONDER, MapErrorCodeToState(reason)); } } // namespace metrics } // namespace bluetooth
system/gd/metrics/bluetooth_event.h +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ void LogIncomingAclStartEvent(const hci::Address& address); void LogAclCompletionEvent(const hci::Address& address, hci::ErrorCode reason, bool is_locally_initiated); void LogLeAclCompletionEvent(const hci::Address& address, hci::ErrorCode reason, bool is_locally_initiated); void LogRemoteNameRequestCompletion(const RawAddress& raw_address, tHCI_STATUS hci_status); void LogAclDisconnectionEvent(const hci::Address& address, hci::ErrorCode reason, Loading
system/main/shim/acl.cc +4 −0 Original line number Diff line number Diff line Loading @@ -1624,6 +1624,9 @@ void shim::Acl::OnLeConnectSuccess(hci::AddressWithType address_with_type, log::debug("Connection successful le remote:{} handle:{} initiator:{}", address_with_type, handle, (locally_initiated) ? "local" : "remote"); bluetooth::metrics::LogLeAclCompletionEvent(address_with_type.GetAddress(), hci::ErrorCode::SUCCESS, locally_initiated); BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type), "Connection successful", "Le"); } Loading @@ -1638,6 +1641,7 @@ void shim::Acl::OnLeConnectFail(hci::AddressWithType address_with_type, hci::Err TRY_POSTING_ON_MAIN(acl_interface_.connection.le.on_failed, legacy_address_with_type, handle, enhanced, status); bluetooth::metrics::LogLeAclCompletionEvent(address_with_type.GetAddress(), reason, true); pimpl_->shadow_acceptlist_.Remove(address_with_type); log::warn("Connection failed le remote:{}", address_with_type); BTM_LogHistory(kBtmLogTag, ToLegacyAddressWithType(address_with_type), "Connection failed", Loading