From 46d6a8821196ab313a5f28c009ce9b2548ea2569 Mon Sep 17 00:00:00 2001 From: Utku Utkan Date: Thu, 10 Aug 2023 08:55:18 -0700 Subject: [PATCH] Add SEPolicy config for PCS to act as a media app These are the minimum set of services that PCS needs to have access for it to be able act as a media app and use Exoplayer for playing recorded video files. However, there'll be a follow up change to broaden the permissions to be future proof and have greater flexibility as a media app, which will let PCS to be updated via Play Store without the worry of a missing SEPolicy config that is common among media apps. Bug: 287069860 Test: m && flashall Change-Id: I956219faacbc0c1b649cb638cede964480766718 --- camera/sepolicy/vendor_pcs_app.te | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/camera/sepolicy/vendor_pcs_app.te b/camera/sepolicy/vendor_pcs_app.te index 7946b9a..c179255 100644 --- a/camera/sepolicy/vendor_pcs_app.te +++ b/camera/sepolicy/vendor_pcs_app.te @@ -2,9 +2,14 @@ type vendor_pcs_app, domain, coredomain; app_domain(vendor_pcs_app); -allow vendor_pcs_app app_api_service:service_manager find; - -allow vendor_pcs_app cameraserver_service:service_manager find; +allow vendor_pcs_app { + app_api_service + audioserver_service + cameraserver_service + mediametrics_service + mediaserver_service + radio_service +}:service_manager find; # Allow PCS to find the LyricConfigProvider service through ServiceManager. allow vendor_pcs_app vendor_camera_lyricconfigprovider_service:service_manager find;