18 lines
616 B
Text
18 lines
616 B
Text
#integrated process
|
|
type charger_monitor, domain, domain_deprecated;
|
|
type charger_monitor_exec, exec_type, file_type;
|
|
|
|
#started by init
|
|
init_daemon_domain(charger_monitor)
|
|
|
|
#charger monitor will use uevent, visit sysfs and use the wake lock
|
|
allow charger_monitor self:netlink_kobject_uevent_socket { read create setopt bind };
|
|
allow charger_monitor{
|
|
sysfs_wake_lock
|
|
sysfs_battery_supply
|
|
}:file rw_file_perms;
|
|
|
|
allow charger_monitor sysfs:file w_file_perms;
|
|
allow charger_monitor sysfs_battery_supply:dir r_dir_perms;
|
|
r_dir_file(charger_monitor, sysfs_dc_supply)
|
|
r_dir_file(charger_monitor, sysfs_usb_supply)
|