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

Commit 1100c1d1 authored by Phil Burk's avatar Phil Burk Committed by Android (Google) Code Review
Browse files

Merge "aaudio: remove LOG_ALWAYS_FATAL_IF from metrics" into rvc-dev

parents 31e5b479 60c0c5e2
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ aaudio_result_t AudioStream::open(const AudioStreamBuilder& builder)
}

void AudioStream::logOpen() {
    LOG_ALWAYS_FATAL_IF(mMetricsId.size() == 0, "mMetricsId is empty!");
    if (mMetricsId.size() > 0) {
        android::mediametrics::LogItem(mMetricsId)
                .set(AMEDIAMETRICS_PROP_PERFORMANCEMODE,
                     AudioGlobal_convertPerformanceModeToText(getPerformanceMode()))
@@ -114,14 +114,16 @@ void AudioStream::logOpen() {
                     AudioGlobal_convertSharingModeToText(getSharingMode()))
                .record();
    }
}

void AudioStream::logBufferState() {
    LOG_ALWAYS_FATAL_IF(mMetricsId.size() == 0, "mMetricsId is empty!");
    if (mMetricsId.size() > 0) {
        android::mediametrics::LogItem(mMetricsId)
                .set(AMEDIAMETRICS_PROP_BUFFERSIZEFRAMES, (int32_t) getBufferSize())
                .set(AMEDIAMETRICS_PROP_UNDERRUN, (int32_t) getXRunCount())
                .record();
    }
}

aaudio_result_t AudioStream::systemStart() {
    std::lock_guard<std::mutex> lock(mStreamLock);