Abstract use of cameraserver behind an attribute
Bug: 124128212
Test: Builds
Change-Id: Ia0df765e15a72b3bdd1cba07ff1cf16128da5ae2
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
diff --git a/private/cameraserver.te b/private/cameraserver.te
index ef44bfa..2be3c9e 100644
--- a/private/cameraserver.te
+++ b/private/cameraserver.te
@@ -1,4 +1,6 @@
typeattribute cameraserver coredomain;
+typeattribute cameraserver camera_service_server;
+
init_daemon_domain(cameraserver)
tmpfs_domain(cameraserver)
diff --git a/public/attributes b/public/attributes
index 8f52637..4cae0ff 100644
--- a/public/attributes
+++ b/public/attributes
@@ -307,3 +307,4 @@
attribute wifi_keystore_service_server;
attribute mediaswcodec_server;
attribute system_suspend_server;
+attribute camera_service_server;
diff --git a/public/camera_service_server.te b/public/camera_service_server.te
new file mode 100644
index 0000000..352e1b7
--- /dev/null
+++ b/public/camera_service_server.te
@@ -0,0 +1 @@
+add_hwservice(camera_service_server, fwk_camera_hwservice)
diff --git a/public/cameraserver.te b/public/cameraserver.te
index 8ca5760..f4eed48 100644
--- a/public/cameraserver.te
+++ b/public/cameraserver.te
@@ -18,7 +18,6 @@
allow cameraserver hal_graphics_composer:fd use;
add_service(cameraserver, cameraserver_service)
-add_hwservice(cameraserver, fwk_camera_hwservice)
allow cameraserver activity_service:service_manager find;
allow cameraserver appops_service:service_manager find;