EARC: Add Policy for EArc Service
Test: atest vts_treble_vintf_framework_test
atest vts_treble_vintf_vendor_test
Bug: 240388105
Change-Id: I561f647a68553fa0134f2e1bd65b0f18dd1785f1
diff --git a/vendor/file_contexts b/vendor/file_contexts
index a8655b0..c5f0d45 100644
--- a/vendor/file_contexts
+++ b/vendor/file_contexts
@@ -100,6 +100,7 @@
/(vendor|system/vendor)/bin/hw/android\.hardware\.thermal-service\.example u:object_r:hal_thermal_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.cec@1\.[01]-service u:object_r:hal_tv_cec_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.cec-service u:object_r:hal_tv_hdmi_cec_default_exec:s0
+/(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.earc-service u:object_r:hal_tv_earc_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.hdmi-service u:object_r:hal_tv_hdmi_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.input@1\.0-service u:object_r:hal_tv_input_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.input-service\.example u:object_r:hal_tv_input_default_exec:s0
diff --git a/vendor/hal_tv_earc_default.te b/vendor/hal_tv_earc_default.te
new file mode 100644
index 0000000..0f5814a
--- /dev/null
+++ b/vendor/hal_tv_earc_default.te
@@ -0,0 +1,5 @@
+type hal_tv_earc_default, domain;
+hal_server_domain(hal_tv_earc_default, hal_tv_earc)
+
+type hal_tv_earc_default_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(hal_tv_earc_default)