From 461d91fe75140f07ce470b085459bd7a0e4a405a Mon Sep 17 00:00:00 2001 From: Wei Wang <wvw@google.com> Date: Thu, 1 Nov 2018 11:55:53 -0700 Subject: [PATCH] Move thermal service into system_server Bug: 118510237 Test: Boot and test callback on ThermalHAL 1.1 and ThermalHAL 2.0 (cherry picked from commit 75cc6bf2d59e84e82a32d4758f908a0229e95389) Change-Id: Iafb376e61dc579c3bfd173ac34a4d525b83d8e5c --- private/compat/28.0/28.0.cil | 6 ++---- private/file_contexts | 1 - private/system_server.te | 1 - private/thermalserviced.te | 4 ---- public/service.te | 2 +- public/thermalserviced.te | 14 -------------- 6 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 private/thermalserviced.te delete mode 100644 public/thermalserviced.te diff --git a/private/compat/28.0/28.0.cil b/private/compat/28.0/28.0.cil index 323fb0a0c..208eb8c69 100644 --- a/private/compat/28.0/28.0.cil +++ b/private/compat/28.0/28.0.cil @@ -14,6 +14,8 @@ (type thermalcallback_hwservice) (type untrusted_v2_app) (type vcs_device) +(type thermalserviced) +(type thermalserviced_exec) ;; Public 28.0 SEPolicy is divergent on different devices w.r.t ;; exported_audio_prop type. We need this typeattribute declaration so that the @@ -738,8 +740,6 @@ (expandtypeattribute (textservices_service_28_0) true) (expandtypeattribute (thermalcallback_hwservice_28_0) true) (expandtypeattribute (thermal_service_28_0) true) -(expandtypeattribute (thermalserviced_28_0) true) -(expandtypeattribute (thermalserviced_exec_28_0) true) (expandtypeattribute (timezone_service_28_0) true) (expandtypeattribute (tmpfs_28_0) true) (expandtypeattribute (tombstoned_28_0) true) @@ -1603,8 +1603,6 @@ (typeattributeset textservices_service_28_0 (textservices_service)) (typeattributeset thermalcallback_hwservice_28_0 (thermalcallback_hwservice)) (typeattributeset thermal_service_28_0 (thermal_service)) -(typeattributeset thermalserviced_28_0 (thermalserviced)) -(typeattributeset thermalserviced_exec_28_0 (thermalserviced_exec)) (typeattributeset timezone_service_28_0 (timezone_service)) (typeattributeset tmpfs_28_0 (tmpfs)) (typeattributeset tombstoned_28_0 (tombstoned)) diff --git a/private/file_contexts b/private/file_contexts index abef72b8f..3ba8fcff3 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -276,7 +276,6 @@ /system/bin/update_engine u:object_r:update_engine_exec:s0 /system/bin/bspatch u:object_r:update_engine_exec:s0 /system/bin/storaged u:object_r:storaged_exec:s0 -/system/bin/thermalserviced u:object_r:thermalserviced_exec:s0 /system/bin/wpantund u:object_r:wpantund_exec:s0 /system/bin/virtual_touchpad u:object_r:virtual_touchpad_exec:s0 /system/bin/hw/android\.frameworks\.bufferhub@1\.0-service u:object_r:fwk_bufferhub_exec:s0 diff --git a/private/system_server.te b/private/system_server.te index 3806d2394..902609c76 100644 --- a/private/system_server.te +++ b/private/system_server.te @@ -687,7 +687,6 @@ allow system_server netd_service:service_manager find; allow system_server nfc_service:service_manager find; allow system_server radio_service:service_manager find; allow system_server stats_service:service_manager find; -allow system_server thermal_service:service_manager find; allow system_server storaged_service:service_manager find; allow system_server surfaceflinger_service:service_manager find; allow system_server update_engine_service:service_manager find; diff --git a/private/thermalserviced.te b/private/thermalserviced.te deleted file mode 100644 index 1a09e203e..000000000 --- a/private/thermalserviced.te +++ /dev/null @@ -1,4 +0,0 @@ -typeattribute thermalserviced coredomain; - -init_daemon_domain(thermalserviced) - diff --git a/public/service.te b/public/service.te index 8a59bff92..5a849cb47 100644 --- a/public/service.te +++ b/public/service.te @@ -29,7 +29,6 @@ type secure_element_service, service_manager_type; type storaged_service, service_manager_type; type surfaceflinger_service, app_api_service, ephemeral_app_api_service, service_manager_type; type system_app_service, service_manager_type; -type thermal_service, service_manager_type; type update_engine_service, service_manager_type; type virtual_touchpad_service, service_manager_type; type vold_service, service_manager_type; @@ -153,6 +152,7 @@ type task_service, system_server_service, service_manager_type; type textclassification_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type; type textservices_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type; type telecom_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type; +type thermal_service, system_server_service, service_manager_type; type timedetector_service, system_server_service, service_manager_type; type timezone_service, system_server_service, service_manager_type; type timezonedetector_service, system_server_service, service_manager_type; diff --git a/public/thermalserviced.te b/public/thermalserviced.te deleted file mode 100644 index 471682622..000000000 --- a/public/thermalserviced.te +++ /dev/null @@ -1,14 +0,0 @@ -# thermalserviced -- thermal management services for system and vendor -type thermalserviced, domain; -type thermalserviced_exec, system_file_type, exec_type, file_type; - -binder_use(thermalserviced) -binder_service(thermalserviced) -add_service(thermalserviced, thermal_service) - -hwbinder_use(thermalserviced) -hal_client_domain(thermalserviced, hal_thermal) -add_hwservice(thermalserviced, thermalcallback_hwservice) - -binder_call(thermalserviced, platform_app) -binder_call(thermalserviced, system_server) -- GitLab