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

Commit 015afd81 authored by guochuang's avatar guochuang Committed by Chuang Guo
Browse files

Avoid "android.media.mediacodec.log-session-id" print redundancy



set "log-session-id" media metrics only if it is not empty.

Test: adb shell dumpsys media.metrics | grep codec
Change-Id: I6c2fc61c587feb5d9dbb431aaa10157cb629866c
Signed-off-by: default avatarguochuang <guochuang@xiaomi.corp-partner.google.com>
parent 9a04a729
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2005,7 +2005,9 @@ status_t MediaCodec::configure(
        mediametrics_setInt32(nextMetricsHandle, kCodecEncoder,
                              (flags & CONFIGURE_FLAG_ENCODE) ? 1 : 0);

        if (!mLogSessionId.empty()) {
            mediametrics_setCString(nextMetricsHandle, kCodecLogSessionId, mLogSessionId.c_str());
        }

        // moved here from ::init()
        mediametrics_setCString(nextMetricsHandle, kCodecCodec, mInitName.c_str());