From 181394f29e966ac590ad5913e41251f183c19c5e Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Mon, 27 Jun 2022 17:25:02 +0800 Subject: Add LeAudioBroadcastSession * Add Broadcast methods to MetricsCollector * Implement LogLeAudioBroadcastSessionReported logging API * Add Broadcast cases to MetricsCollectorTest Test: atest BluetoothInstrumentationTests Tag: #feature Bug: 207811438 Change-Id: I9858d3841de7e3244acc3ff62efe2e497b08899a Merged-In: I9858d3841de7e3244acc3ff62efe2e497b08899a (cherry picked from commit 4cb702cc4e4d6614b08960245b41f6bee599029f) --- system/common/metrics.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'system/common/metrics.cc') diff --git a/system/common/metrics.cc b/system/common/metrics.cc index 0664186cac..baf838b0c4 100644 --- a/system/common/metrics.cc +++ b/system/common/metrics.cc @@ -962,6 +962,13 @@ void LogLeAudioConnectionSessionReported( } } +void LogLeAudioBroadcastSessionReported(int64_t duration_nanos) { + int ret = stats_write(LE_AUDIO_BROADCAST_SESSION_REPORTED, duration_nanos); + if (ret < 0) { + LOG(WARNING) << __func__ << ": failed for duration=" << duration_nanos; + } +} + } // namespace common } // namespace bluetooth -- cgit v1.2.3-59-g8ed1b