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

Commit 0b92613e authored by Palash Ahuja's avatar Palash Ahuja
Browse files

BluetoothMetrics: Log ACL Start from the remote side

Test: m statsd_testdrive
Bug: 345564021
Flag: EXEMPT, metrics related changes
Change-Id: I85f4308020a035c061ed2426261d060052e6445f
parent 59ba2025
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "hci/event_checkers.h"
#include "hci/hci_layer.h"
#include "hci/remote_name_request.h"
#include "metrics/bluetooth_event.h"
#include "os/metrics.h"

namespace bluetooth {
@@ -258,6 +259,8 @@ public:
    client_handler_->CallOn(client_callbacks_, &ConnectionCallbacks::OnConnectRequest, address,
                            cod);

    bluetooth::metrics::LogIncomingAclStartEvent(address);

    acl_scheduler_->RegisterPendingIncomingConnection(address);

    if (is_classic_link_already_connected(address)) {
+5 −0
Original line number Diff line number Diff line
@@ -92,6 +92,11 @@ State MapHCIStatusToState(tHCI_STATUS status) {
  }
}

void LogIncomingAclStartEvent(const hci::Address& address) {
  bluetooth::os::LogMetricBluetoothEvent(address, EventType::ACL_CONNECTION_RESPONDER,
                                         State::START);
}

void LogAclCompletionEvent(const hci::Address& address, ErrorCode reason,
                           bool is_locally_initiated) {
  bluetooth::os::LogMetricBluetoothEvent(address,
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@
namespace bluetooth {
namespace metrics {

void LogIncomingAclStartEvent(const hci::Address& address);

void LogAclCompletionEvent(const hci::Address& address, hci::ErrorCode reason,
                           bool is_locally_initiated);