Home | History | Annotate | Download | only in public
      1 # HwBinder IPC from client to server, and callbacks
      2 binder_call(hal_health_client, hal_health_server)
      3 binder_call(hal_health_server, hal_health_client)
      4 
      5 add_hwservice(hal_health_server, hal_health_hwservice)
      6 allow hal_health_client hal_health_hwservice:hwservice_manager find;
      7 
      8 # Read access to system files for HALs in
      9 # /{system,vendor,odm}/lib[64]/hw/ in order
     10 # to be able to open the hal implementation .so files
     11 r_dir_file(hal_health, system_file)
     12 
     13 # Common rules for a health service.
     14 
     15 # Allow to listen to uevents for updates
     16 allow hal_health_server self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
     17 
     18 # Allow to read /sys/class/power_supply directory
     19 allow hal_health_server sysfs:dir r_dir_perms;
     20 
     21 # Allow to read files under /sys/class/power_supply. Implementations typically have symlinks
     22 # to vendor specific files. Vendors should mark sysfs_batteryinfo on all files read by health
     23 # HAL service.
     24 r_dir_file(hal_health_server, sysfs_batteryinfo)
     25 
     26 # Allow to wake up to send periodic events
     27 wakelock_use(hal_health_server)
     28 
     29 # Write to /dev/kmsg
     30 allow hal_health_server kmsg_device:chr_file w_file_perms;
     31