summaryrefslogtreecommitdiffstats
path: root/common/charger_monitor.te
blob: 125cb1bf295a06c1ec91cd96bc6aa75a6b9f60a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#integrated process
type charger_monitor, domain;
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:file rw_file_perms;
allow charger_monitor sysfs_wake_lock:file rw_file_perms;

allow charger_monitor sysfs_battery_supply:dir search;
allow charger_monitor sysfs_battery_supply:file rw_file_perms;
allow charger_monitor sysfs_usb_supply:dir search;
allow charger_monitor sysfs_usb_supply:file r_file_perms;