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

Commit 8d188356 authored by Edwin Wong's avatar Edwin Wong
Browse files

Displays mediadrm and Widevine metrics in dumpsys

Make the list of keys in allowedKey to match the
statsd_handlers[] in iface_statsd.cpp for dumpsys
to display mediadrm and Widevine metrics.

Bug: 149246413

Test: adb shell dumpsys media.metrics | grep -i drm
Test: adb shell dumpsys media.metrics | grep -i widevine
Change-Id: I7811eb3a4228a906bb3dbc615ce42d1947082a07
parent 18be1332
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -436,6 +436,10 @@ bool MediaMetricsService::isContentValid(const mediametrics::Item *item, bool is
    // untrusted uids can only send us a limited set of keys
    const std::string &key = item->getKey();
    if (startsWith(key, "audio.")) return true;
    if (startsWith(key, "drm.vendor.")) return true;
    // the list of allowedKey uses statsd_handlers
    // in iface_statsd.cpp as reference
    // drmmanager is from a trusted uid, therefore not needed here
    for (const char *allowedKey : {
                                     // legacy audio
                                     "audiopolicy",
@@ -445,6 +449,7 @@ bool MediaMetricsService::isContentValid(const mediametrics::Item *item, bool is
                                     // other media
                                     "codec",
                                     "extractor",
                                     "mediadrm",
                                     "nuplayer",
                                 }) {
        if (key == allowedKey) {