• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# HwBinder IPC from client to server, and callbacks
2binder_call(hal_health_client, hal_health_server)
3binder_call(hal_health_server, hal_health_client)
4
5hal_attribute_hwservice(hal_health, hal_health_hwservice)
6
7# Common rules for a health service.
8
9# Allow to listen to uevents for updates
10allow hal_health_server self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
11
12# Allow to read /sys/class/power_supply directory
13allow hal_health_server sysfs:dir r_dir_perms;
14
15# Allow to read files under /sys/class/power_supply. Implementations typically have symlinks
16# to vendor specific files. Vendors should mark sysfs_batteryinfo on all files read by health
17# HAL service.
18r_dir_file(hal_health_server, sysfs_batteryinfo)
19
20# Allow to wake up to send periodic events
21wakelock_use(hal_health_server)
22
23# Write to /dev/kmsg
24allow hal_health_server kmsg_device:chr_file { getattr w_file_perms };
25
26# Allow to use timerfd to wake itself up periodically to send health info.
27allow hal_health_server self:capability2 wake_alarm;
28