diff --git a/sepolicy/vendor/hal_power_stats_default.te b/sepolicy/vendor/hal_power_stats_default.te index f95e9b3a..da4c2989 100644 --- a/sepolicy/vendor/hal_power_stats_default.te +++ b/sepolicy/vendor/hal_power_stats_default.te @@ -3,4 +3,9 @@ r_dir_file(hal_power_stats_default, debugfs_rpm) r_dir_file(hal_power_stats_default, debugfs_wlan) # power.stats HAL needs access to the easel sysfs node -r_dir_file(hal_power_stats_default, sysfs_easel) \ No newline at end of file +r_dir_file(hal_power_stats_default, sysfs_easel) + +# Allow power.stats HAL to add the power_stats_service +vndbinder_use(hal_power_stats) +add_service(hal_power_stats_server, power_stats_service) + diff --git a/sepolicy/vendor/vndservice.te b/sepolicy/vendor/vndservice.te index 44c45ca5..75ac8e19 100644 --- a/sepolicy/vendor/vndservice.te +++ b/sepolicy/vendor/vndservice.te @@ -1,2 +1,4 @@ type qdisplay_service, vndservice_manager_type; type per_mgr_service, vndservice_manager_type; +type power_stats_service, vndservice_manager_type; + diff --git a/sepolicy/vendor/vndservice_contexts b/sepolicy/vendor/vndservice_contexts index 1db4aa0c..5ad35d6c 100644 --- a/sepolicy/vendor/vndservice_contexts +++ b/sepolicy/vendor/vndservice_contexts @@ -1,2 +1,4 @@ display.qservice u:object_r:qdisplay_service:s0 vendor.qcom.PeripheralManager u:object_r:per_mgr_service:s0 +power.stats-vendor u:object_r:power_stats_service:s0 +