diff --git a/whitechapel_pro/battery_mitigation.te b/whitechapel_pro/battery_mitigation.te index 59af9d53..5fecbcba 100644 --- a/whitechapel_pro/battery_mitigation.te +++ b/whitechapel_pro/battery_mitigation.te @@ -2,6 +2,7 @@ type battery_mitigation, domain; type battery_mitigation_exec, exec_type, vendor_file_type, file_type; init_daemon_domain(battery_mitigation) get_prop(battery_mitigation, boot_status_prop) +set_prop(battery_mitigation, vendor_mitigation_ready_prop) hal_client_domain(battery_mitigation, hal_thermal); hal_client_domain(battery_mitigation, hal_health); @@ -11,6 +12,9 @@ r_dir_file(battery_mitigation, sysfs_iio_devices) r_dir_file(battery_mitigation, sysfs_thermal) r_dir_file(battery_mitigation, thermal_link_device) r_dir_file(battery_mitigation, sysfs_odpm) +allow battery_mitigation sysfs_bcl:dir r_dir_perms; +allow battery_mitigation sysfs_bcl:file r_file_perms; +allow battery_mitigation sysfs_bcl:lnk_file r_file_perms; allow battery_mitigation sysfs_thermal:lnk_file r_file_perms; allow battery_mitigation mitigation_vendor_data_file:dir rw_dir_perms; allow battery_mitigation mitigation_vendor_data_file:file create_file_perms; diff --git a/whitechapel_pro/property.te b/whitechapel_pro/property.te index ec7d84ed..b88506be 100644 --- a/whitechapel_pro/property.te +++ b/whitechapel_pro/property.te @@ -36,3 +36,6 @@ vendor_internal_prop(vendor_dynamic_sensor_prop) # Telephony debug app vendor_internal_prop(vendor_telephony_app_prop) + +# Battery Mitigation +vendor_internal_prop(vendor_mitigation_ready_prop) diff --git a/whitechapel_pro/property_contexts b/whitechapel_pro/property_contexts index 98a7980a..f4c5eeb0 100644 --- a/whitechapel_pro/property_contexts +++ b/whitechapel_pro/property_contexts @@ -106,3 +106,6 @@ persist.vendor.ims. u:object_r:vendor_imssvc_prop:s0 # for vendor telephony debug app vendor.config.debug. u:object_r:vendor_telephony_app_prop:s0 + +# Battery Mitigation +vendor.brownout.mitigation.ready u:object_r:vendor_mitigation_ready_prop:s0