Android.mk: conditional compilation of odm_sepolicy.cil
am: 1b2ea497aa

Change-Id: I6410593a4f7616958ca8b6cc1ca37401bfc693a6
diff --git a/private/app_neverallows.te b/private/app_neverallows.te
index 1c1deb0..f899683 100644
--- a/private/app_neverallows.te
+++ b/private/app_neverallows.te
@@ -231,6 +231,7 @@
   hal_wifi_supplicant_hwservice
   hidl_base_hwservice
   system_net_netd_hwservice
+  thermalcallback_hwservice
 }:hwservice_manager find;
 # HwBinder services offered by core components (as opposed to vendor components)
 # are considered somewhat safer due to point #2 above.
diff --git a/private/compat/27.0/27.0.cil b/private/compat/27.0/27.0.cil
index c596d3f..a91ffee 100644
--- a/private/compat/27.0/27.0.cil
+++ b/private/compat/27.0/27.0.cil
@@ -4,11 +4,10 @@
 (type mediacodec_exec)
 (type qtaguid_proc)
 (type reboot_data_file)
+(type vold_socket)
 (type rild)
 (type untrusted_v2_app)
 (type webview_zygote_socket)
-(type vold_socket)
-(type thermalcallback_hwservice)
 
 (expandtypeattribute (accessibility_service_27_0) true)
 (expandtypeattribute (account_service_27_0) true)
diff --git a/private/hwservice_contexts b/private/hwservice_contexts
index 9af432d..0649c04 100644
--- a/private/hwservice_contexts
+++ b/private/hwservice_contexts
@@ -50,6 +50,7 @@
 android.hardware.tetheroffload.config::IOffloadConfig           u:object_r:hal_tetheroffload_hwservice:s0
 android.hardware.tetheroffload.control::IOffloadControl         u:object_r:hal_tetheroffload_hwservice:s0
 android.hardware.thermal::IThermal                              u:object_r:hal_thermal_hwservice:s0
+android.hardware.thermal::IThermalCallback                      u:object_r:thermalcallback_hwservice:s0
 android.hardware.tv.cec::IHdmiCec                               u:object_r:hal_tv_cec_hwservice:s0
 android.hardware.tv.input::ITvInput                             u:object_r:hal_tv_input_hwservice:s0
 android.hardware.usb::IUsb                                      u:object_r:hal_usb_hwservice:s0
diff --git a/public/hwservice.te b/public/hwservice.te
index 3e3a6c8..7ed6b5a 100644
--- a/public/hwservice.te
+++ b/public/hwservice.te
@@ -61,3 +61,4 @@
 type system_net_netd_hwservice, hwservice_manager_type, coredomain_hwservice;
 type system_suspend_hwservice, hwservice_manager_type, coredomain_hwservice;
 type system_wifi_keystore_hwservice, hwservice_manager_type, coredomain_hwservice;
+type thermalcallback_hwservice, hwservice_manager_type;
diff --git a/public/thermalserviced.te b/public/thermalserviced.te
index 90140b2..1b40c6a 100644
--- a/public/thermalserviced.te
+++ b/public/thermalserviced.te
@@ -8,6 +8,7 @@
 
 hwbinder_use(thermalserviced)
 hal_client_domain(thermalserviced, hal_thermal)
+add_hwservice(thermalserviced, thermalcallback_hwservice)
 
 binder_call(thermalserviced, platform_app)
 binder_call(thermalserviced, system_server)