1type battery_mitigation, domain; 2type battery_mitigation_exec, exec_type, vendor_file_type, file_type; 3init_daemon_domain(battery_mitigation) 4get_prop(battery_mitigation, boot_status_prop) 5get_prop(battery_mitigation, vendor_brownout_reason_prop) 6get_prop(battery_mitigation, system_boot_reason_prop) 7set_prop(battery_mitigation, vendor_mitigation_ready_prop) 8set_prop(battery_mitigation, vendor_brownout_br_feasible_prop) 9 10hal_client_domain(battery_mitigation, hal_thermal); 11hal_client_domain(battery_mitigation, hal_health); 12 13r_dir_file(battery_mitigation, sysfs_acpm_stats) 14r_dir_file(battery_mitigation, sysfs_batteryinfo) 15r_dir_file(battery_mitigation, sysfs_iio_devices) 16r_dir_file(battery_mitigation, sysfs_gpu) 17r_dir_file(battery_mitigation, sysfs_thermal) 18r_dir_file(battery_mitigation, thermal_link_device) 19r_dir_file(battery_mitigation, sysfs_odpm) 20r_dir_file(battery_mitigation, sysfs_power_stats) 21allow battery_mitigation sysfs_bcl:dir r_dir_perms; 22allow battery_mitigation sysfs_bcl:file rw_file_perms; 23allow battery_mitigation sysfs_bcl:lnk_file r_file_perms; 24allow battery_mitigation sysfs_thermal:lnk_file r_file_perms; 25allow battery_mitigation mitigation_vendor_data_file:dir rw_dir_perms; 26allow battery_mitigation mitigation_vendor_data_file:file create_file_perms; 27allow battery_mitigation dumpstate:fd use; 28allow battery_mitigation dumpstate:fifo_file rw_file_perms; 29 30# Allow battery_mitigation to use Binder IPC so that service manager can notify it for callbacks 31binder_use(battery_mitigation) 32# Allow battery_mitigation to listen brownout event by epoll_wait 33wakelock_use(battery_mitigation) 34# Allow battery_mitigation to run aidl service 35add_service(battery_mitigation, hal_battery_mitigation_service) 36# Allow battery_mitigation to run audio mitigation callback 37binder_call(battery_mitigation, hal_audio_default) 38binder_call(battery_mitigation, servicemanager) 39