From 9b0924e14161f25b843cf0963c8681025540ff6f Mon Sep 17 00:00:00 2001
From: Ray Essick <essick@google.com>
Date: Thu, 31 Aug 2017 11:52:58 -0700
Subject: [PATCH] Give media.metrics service access to uid/pkg info

relax the sepolicy for media.metrics to allow access to
package manager for uid->packagename mapping functionality.

Bug: 65027506
Test: read output of 'dumpsys media.metrics'
Change-Id: I0d25af16c06dc65154cfda854e28ab70ada097c4
---
 public/mediametrics.te | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/public/mediametrics.te b/public/mediametrics.te
index 4c10d878c..ada90cca3 100644
--- a/public/mediametrics.te
+++ b/public/mediametrics.te
@@ -17,6 +17,9 @@ allow mediametrics proc_meminfo:file r_file_perms;
 # allows interactions with dumpsys to GMScore
 allow mediametrics app_data_file:file write;
 
+# allow access to package manager for uid->apk mapping
+allow mediametrics package_native_service:service_manager find;
+
 ###
 ### neverallow rules
 ###
-- 
GitLab