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
diff --git a/services/mediametrics/MediaMetricsService.cpp b/services/mediametrics/MediaMetricsService.cpp
index 2fd1355..811e135 100644
--- a/services/mediametrics/MediaMetricsService.cpp
+++ b/services/mediametrics/MediaMetricsService.cpp
@@ -436,6 +436,10 @@
     // 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 @@
                                      // other media
                                      "codec",
                                      "extractor",
+                                     "mediadrm",
                                      "nuplayer",
                                  }) {
         if (key == allowedKey) {