From ec31c5b4db4e28ffed131d7cbfd6026b7a59e123 Mon Sep 17 00:00:00 2001 From: silens Date: Wed, 22 May 2024 10:34:09 +0800 Subject: LEA metrics use the same mechanim in system/gd/common for allocating metrics ID. Not use the mechanim in system/common Bug: 341843517 Flag: EXEMPT, modify metrics related code Test: atest --host bluetooth_le_audio_client_test:MetricsCollectorTest Change-Id: I4c612b07f24660a162586bdb04c78271dfe31f9b --- system/common/metrics.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/common/metrics.cc') diff --git a/system/common/metrics.cc b/system/common/metrics.cc index f2335e9f3e..badfcd851f 100644 --- a/system/common/metrics.cc +++ b/system/common/metrics.cc @@ -44,6 +44,7 @@ #include "osi/include/osi.h" #include "time_util.h" #include "types/raw_address.h" +#include "main/shim/metric_id_api.h" namespace fmt { template <> @@ -945,7 +946,7 @@ void LogLeAudioConnectionSessionReported( for (uint64_t i = 0; i < device_address.size(); i++) { if (!device_address[i].IsEmpty()) { device_metric_id[i] = - MetricIdAllocator::GetInstance().AllocateId(device_address[i]); + bluetooth::shim::AllocateIdFromMetricIdAllocator(device_address[i]); } else { device_metric_id[i] = 0; } -- cgit v1.2.3-59-g8ed1b