From 5a86d5f3f3ae63b44ff7e01d80bb59072f56dca8 Mon Sep 17 00:00:00 2001 From: Venkatarama Avadhani Date: Wed, 14 Dec 2022 13:10:07 +0530 Subject: [PATCH] HDMI: Refactor HDMI packages Organize the HDMI packages into CEC, EArc and connection under a common hdmi package. Bug: 261729059 Test: atest vts_treble_vintf_framework_test atest vts_treble_vintf_vendor_test Change-Id: Ief5bff996028775ea355b392a4028a091fb83b99 --- build/soong/service_fuzzer_bindings.go | 6 +++--- private/compat/33.0/33.0.ignore.cil | 4 ++-- private/service_contexts | 6 +++--- private/system_server.te | 4 ++-- public/attributes | 4 ++-- public/hal_tv_earc.te | 7 ------- public/hal_tv_hdmi.te | 7 ------- public/hal_tv_hdmi_cec.te | 4 ++-- public/hal_tv_hdmi_connection.te | 7 +++++++ public/hal_tv_hdmi_earc.te | 7 +++++++ public/service.te | 4 ++-- public/su.te | 4 ++-- vendor/file_contexts | 6 +++--- vendor/hal_tv_earc_default.te | 5 ----- vendor/hal_tv_hdmi_connection_default.te | 5 +++++ vendor/hal_tv_hdmi_default.te | 5 ----- vendor/hal_tv_hdmi_earc_default.te | 5 +++++ 17 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 public/hal_tv_earc.te delete mode 100644 public/hal_tv_hdmi.te create mode 100644 public/hal_tv_hdmi_connection.te create mode 100644 public/hal_tv_hdmi_earc.te delete mode 100644 vendor/hal_tv_earc_default.te create mode 100644 vendor/hal_tv_hdmi_connection_default.te delete mode 100644 vendor/hal_tv_hdmi_default.te create mode 100644 vendor/hal_tv_hdmi_earc_default.te diff --git a/build/soong/service_fuzzer_bindings.go b/build/soong/service_fuzzer_bindings.go index b89e1c301..63e3f7aeb 100644 --- a/build/soong/service_fuzzer_bindings.go +++ b/build/soong/service_fuzzer_bindings.go @@ -113,9 +113,9 @@ var ( "android.hardware.sensors.ISensors/default": EXCEPTION_NO_FUZZER, "android.hardware.soundtrigger3.ISoundTriggerHw/default": EXCEPTION_NO_FUZZER, "android.hardware.thermal.IThermal/default": EXCEPTION_NO_FUZZER, - "android.hardware.tv.cec.IHdmiCec/default": EXCEPTION_NO_FUZZER, - "android.hardware.tv.earc.IEArc/default": EXCEPTION_NO_FUZZER, - "android.hardware.tv.hdmi.IHdmi/default": EXCEPTION_NO_FUZZER, + "android.hardware.tv.hdmi.cec.IHdmiCec/default": EXCEPTION_NO_FUZZER, + "android.hardware.tv.hdmi.connection.IHdmiConnection/default": EXCEPTION_NO_FUZZER, + "android.hardware.tv.hdmi.earc.IEArc/default": EXCEPTION_NO_FUZZER, "android.hardware.tv.input.ITvInput/default": EXCEPTION_NO_FUZZER, "android.hardware.tv.tuner.ITuner/default": EXCEPTION_NO_FUZZER, "android.hardware.usb.IUsb/default": EXCEPTION_NO_FUZZER, diff --git a/private/compat/33.0/33.0.ignore.cil b/private/compat/33.0/33.0.ignore.cil index 2e776db21..8b623e827 100644 --- a/private/compat/33.0/33.0.ignore.cil +++ b/private/compat/33.0/33.0.ignore.cil @@ -22,9 +22,9 @@ hal_thermal_service hal_usb_gadget_service hal_tv_input_service - hal_tv_earc_service - hal_tv_hdmi_service hal_tv_hdmi_cec_service + hal_tv_hdmi_connection_service + hal_tv_hdmi_earc_service hal_wifi_service healthconnect_service hypervisor_restricted_prop diff --git a/private/service_contexts b/private/service_contexts index 49912ac15..9427c42ee 100644 --- a/private/service_contexts +++ b/private/service_contexts @@ -87,9 +87,9 @@ android.hardware.security.sharedsecret.ISharedSecret/default u:objec android.hardware.sensors.ISensors/default u:object_r:hal_sensors_service:s0 android.hardware.soundtrigger3.ISoundTriggerHw/default u:object_r:hal_audio_service:s0 android.hardware.thermal.IThermal/default u:object_r:hal_thermal_service:s0 -android.hardware.tv.cec.IHdmiCec/default u:object_r:hal_tv_hdmi_cec_service:s0 -android.hardware.tv.earc.IEArc/default u:object_r:hal_tv_earc_service:s0 -android.hardware.tv.hdmi.IHdmi/default u:object_r:hal_tv_hdmi_service:s0 +android.hardware.tv.hdmi.cec.IHdmiCec/default u:object_r:hal_tv_hdmi_cec_service:s0 +android.hardware.tv.hdmi.connection.IHdmiConnection/default u:object_r:hal_tv_hdmi_connection_service:s0 +android.hardware.tv.hdmi.earc.IEArc/default u:object_r:hal_tv_hdmi_earc_service:s0 android.hardware.tv.tuner.ITuner/default u:object_r:hal_tv_tuner_service:s0 android.hardware.tv.input.ITvInput/default u:object_r:hal_tv_input_service:s0 android.hardware.usb.IUsb/default u:object_r:hal_usb_service:s0 diff --git a/private/system_server.te b/private/system_server.te index 83531ad0b..068999f7c 100644 --- a/private/system_server.te +++ b/private/system_server.te @@ -331,9 +331,9 @@ hal_client_domain(system_server, hal_sensors) hal_client_domain(system_server, hal_tetheroffload) hal_client_domain(system_server, hal_thermal) hal_client_domain(system_server, hal_tv_cec) -hal_client_domain(system_server, hal_tv_earc) -hal_client_domain(system_server, hal_tv_hdmi) hal_client_domain(system_server, hal_tv_hdmi_cec) +hal_client_domain(system_server, hal_tv_hdmi_connection) +hal_client_domain(system_server, hal_tv_hdmi_earc) hal_client_domain(system_server, hal_tv_input) hal_client_domain(system_server, hal_usb) hal_client_domain(system_server, hal_usb_gadget) diff --git a/public/attributes b/public/attributes index ebc199c3a..55098136b 100644 --- a/public/attributes +++ b/public/attributes @@ -370,9 +370,9 @@ hal_attribute(telephony); hal_attribute(tetheroffload); hal_attribute(thermal); hal_attribute(tv_cec); -hal_attribute(tv_earc); -hal_attribute(tv_hdmi); hal_attribute(tv_hdmi_cec); +hal_attribute(tv_hdmi_connection); +hal_attribute(tv_hdmi_earc); hal_attribute(tv_input); hal_attribute(tv_tuner); hal_attribute(usb); diff --git a/public/hal_tv_earc.te b/public/hal_tv_earc.te deleted file mode 100644 index 419d16e0c..000000000 --- a/public/hal_tv_earc.te +++ /dev/null @@ -1,7 +0,0 @@ -# Binder IPC from clients into server, and callbacks -binder_call(hal_tv_earc_client, hal_tv_earc_server) -binder_call(hal_tv_earc_server, hal_tv_earc_client) -binder_use(hal_tv_earc_client) -binder_use(hal_tv_earc_server) - -hal_attribute_service(hal_tv_earc, hal_tv_earc_service) diff --git a/public/hal_tv_hdmi.te b/public/hal_tv_hdmi.te deleted file mode 100644 index 8e91aa27b..000000000 --- a/public/hal_tv_hdmi.te +++ /dev/null @@ -1,7 +0,0 @@ -# Binder IPC from clients into server, and callbacks -binder_call(hal_tv_hdmi_client, hal_tv_hdmi_server) -binder_call(hal_tv_hdmi_server, hal_tv_hdmi_client) -binder_call(hal_tv_hdmi_client, servicemanager) -binder_call(hal_tv_hdmi_server, servicemanager) - -hal_attribute_service(hal_tv_hdmi, hal_tv_hdmi_service) diff --git a/public/hal_tv_hdmi_cec.te b/public/hal_tv_hdmi_cec.te index 1b756763e..eb01b67c3 100644 --- a/public/hal_tv_hdmi_cec.te +++ b/public/hal_tv_hdmi_cec.te @@ -1,7 +1,7 @@ # Binder IPC from clients into server, and callbacks binder_call(hal_tv_hdmi_cec_client, hal_tv_hdmi_cec_server) binder_call(hal_tv_hdmi_cec_server, hal_tv_hdmi_cec_client) -binder_call(hal_tv_hdmi_cec_client, servicemanager) -binder_call(hal_tv_hdmi_cec_server, servicemanager) +binder_use(hal_tv_hdmi_cec_client) +binder_use(hal_tv_hdmi_cec_server) hal_attribute_service(hal_tv_hdmi_cec, hal_tv_hdmi_cec_service) diff --git a/public/hal_tv_hdmi_connection.te b/public/hal_tv_hdmi_connection.te new file mode 100644 index 000000000..f6de27d27 --- /dev/null +++ b/public/hal_tv_hdmi_connection.te @@ -0,0 +1,7 @@ +# Binder IPC from clients into server, and callbacks +binder_call(hal_tv_hdmi_connection_client, hal_tv_hdmi_connection_server) +binder_call(hal_tv_hdmi_connection_server, hal_tv_hdmi_connection_client) +binder_use(hal_tv_hdmi_connection_client) +binder_use(hal_tv_hdmi_connection_server) + +hal_attribute_service(hal_tv_hdmi_connection, hal_tv_hdmi_connection_service) diff --git a/public/hal_tv_hdmi_earc.te b/public/hal_tv_hdmi_earc.te new file mode 100644 index 000000000..2d76fc665 --- /dev/null +++ b/public/hal_tv_hdmi_earc.te @@ -0,0 +1,7 @@ +# Binder IPC from clients into server, and callbacks +binder_call(hal_tv_hdmi_earc_client, hal_tv_hdmi_earc_server) +binder_call(hal_tv_hdmi_earc_server, hal_tv_hdmi_earc_client) +binder_use(hal_tv_hdmi_earc_client) +binder_use(hal_tv_hdmi_earc_server) + +hal_attribute_service(hal_tv_hdmi_earc, hal_tv_hdmi_earc_service) diff --git a/public/service.te b/public/service.te index 58d8a15e7..abd51566d 100644 --- a/public/service.te +++ b/public/service.te @@ -313,9 +313,9 @@ type hal_secure_element_service, protected_service, hal_service_type, service_ma type hal_sharedsecret_service, protected_service, hal_service_type, service_manager_type; type hal_system_suspend_service, protected_service, hal_service_type, service_manager_type; type hal_thermal_service, protected_service, hal_service_type, service_manager_type; -type hal_tv_earc_service, protected_service, hal_service_type, service_manager_type; -type hal_tv_hdmi_service, protected_service, hal_service_type, service_manager_type; type hal_tv_hdmi_cec_service, protected_service, hal_service_type, service_manager_type; +type hal_tv_hdmi_connection_service, protected_service, hal_service_type, service_manager_type; +type hal_tv_hdmi_earc_service, protected_service, hal_service_type, service_manager_type; type hal_tv_input_service, protected_service, hal_service_type, service_manager_type; type hal_tv_tuner_service, protected_service, hal_service_type, service_manager_type; type hal_usb_service, protected_service, hal_service_type, service_manager_type; diff --git a/public/su.te b/public/su.te index 60d0230a5..3473e74b3 100644 --- a/public/su.te +++ b/public/su.te @@ -97,9 +97,9 @@ userdebug_or_eng(` typeattribute su hal_tetheroffload_client; typeattribute su hal_thermal_client; typeattribute su hal_tv_cec_client; - typeattribute su hal_tv_earc_client; - typeattribute su hal_tv_hdmi_client; typeattribute su hal_tv_hdmi_cec_client; + typeattribute su hal_tv_hdmi_connection_client; + typeattribute su hal_tv_hdmi_earc_client; typeattribute su hal_tv_input_client; typeattribute su hal_tv_tuner_client; typeattribute su hal_usb_client; diff --git a/vendor/file_contexts b/vendor/file_contexts index c5f0d4556..7d083a52d 100644 --- a/vendor/file_contexts +++ b/vendor/file_contexts @@ -99,9 +99,9 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@1\.[01]-service u:object_r:hal_thermal_default_exec:s0 /(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\.hdmi.cec-service u:object_r:hal_tv_hdmi_cec_default_exec:s0 +/(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.hdmi.connection-service u:object_r:hal_tv_hdmi_connection_default_exec:s0 +/(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.hdmi.earc-service u:object_r:hal_tv_hdmi_earc_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 /(vendor|system/vendor)/bin/hw/android\.hardware\.tv\.tuner@1\.[01]-service u:object_r:hal_tv_tuner_default_exec:s0 diff --git a/vendor/hal_tv_earc_default.te b/vendor/hal_tv_earc_default.te deleted file mode 100644 index 0f5814a4c..000000000 --- a/vendor/hal_tv_earc_default.te +++ /dev/null @@ -1,5 +0,0 @@ -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) diff --git a/vendor/hal_tv_hdmi_connection_default.te b/vendor/hal_tv_hdmi_connection_default.te new file mode 100644 index 000000000..bad896189 --- /dev/null +++ b/vendor/hal_tv_hdmi_connection_default.te @@ -0,0 +1,5 @@ +type hal_tv_hdmi_connection_default, domain; +hal_server_domain(hal_tv_hdmi_connection_default, hal_tv_hdmi_connection) + +type hal_tv_hdmi_connection_default_exec, exec_type, vendor_file_type, file_type; +init_daemon_domain(hal_tv_hdmi_connection_default) diff --git a/vendor/hal_tv_hdmi_default.te b/vendor/hal_tv_hdmi_default.te deleted file mode 100644 index e974fd805..000000000 --- a/vendor/hal_tv_hdmi_default.te +++ /dev/null @@ -1,5 +0,0 @@ -type hal_tv_hdmi_default, domain; -hal_server_domain(hal_tv_hdmi_default, hal_tv_hdmi) - -type hal_tv_hdmi_default_exec, exec_type, vendor_file_type, file_type; -init_daemon_domain(hal_tv_hdmi_default) diff --git a/vendor/hal_tv_hdmi_earc_default.te b/vendor/hal_tv_hdmi_earc_default.te new file mode 100644 index 000000000..d2a729dfd --- /dev/null +++ b/vendor/hal_tv_hdmi_earc_default.te @@ -0,0 +1,5 @@ +type hal_tv_hdmi_earc_default, domain; +hal_server_domain(hal_tv_hdmi_earc_default, hal_tv_hdmi_earc) + +type hal_tv_hdmi_earc_default_exec, exec_type, vendor_file_type, file_type; +init_daemon_domain(hal_tv_hdmi_earc_default)