Allow communication between mediaserver & statsd

Bug: 265488359
Test: atest cts/tests/media/misc/src/android/media/misc/cts/ResourceManagerTest.java
Change-Id: I34bcdc3c403093af90a0e09b18842d7b872c0392
This commit is contained in:
Girish 2023-01-24 00:38:43 +00:00
parent cbeec8f821
commit f9ef01a285
4 changed files with 13 additions and 0 deletions

View file

@ -18,3 +18,8 @@ get_prop(mediaserver, media_config_prop)
# Allow mediaserver to start media.transcoding service via ctl.start.
set_prop(mediaserver, ctl_mediatranscoding_prop);
# Needed for stats callback registration to statsd.
allow mediaserver stats_service:service_manager find;
allow mediaserver statsmanager_service:service_manager find;
binder_call(mediaserver, statsd)

View file

@ -45,6 +45,7 @@ neverallow {
-incidentd
-keystore
-mediametrics
-mediaserver
-platform_app
-priv_app
-rkpdapp

View file

@ -66,6 +66,9 @@ unix_socket_connect(mediaserver, drmserver, drmserver)
# but seems appropriate for all devices.
unix_socket_connect(mediaserver, bluetooth, bluetooth)
# Needed for mediaserver to send information to statsd socket.
unix_socket_send(mediaserver, statsdw, statsd)
add_service(mediaserver, mediaserver_service)
allow mediaserver activity_service:service_manager find;
allow mediaserver appops_service:service_manager find;

View file

@ -40,6 +40,10 @@ binder_call(statsd, keystore)
allow statsd mediametrics_service:service_manager find;
binder_call(statsd, mediametrics)
# Allow statsd to interact with mediametrics
allow statsd mediaserver_service:service_manager find;
binder_call(statsd, mediaserver)
# Allow logd access.
read_logd(statsd)
control_logd(statsd)