1type hal_googlebattery, domain; 2type hal_googlebattery_exec, exec_type, vendor_file_type, file_type; 3 4init_daemon_domain(hal_googlebattery) 5 6r_dir_file(hal_googlebattery, sysfs_batteryinfo) 7r_dir_file(hal_googlebattery, sysfs_wlc) 8 9allow hal_googlebattery sysfs_batteryinfo:file rw_file_perms; 10allow hal_googlebattery self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; 11allow hal_googlebattery sysfs_chargelevel:file rw_file_perms; 12allow hal_googlebattery sysfs_wlc:file rw_file_perms; 13 14set_prop(hal_googlebattery, vendor_battery_defender_prop) 15 16hwbinder_use(hal_googlebattery) 17add_hwservice(hal_googlebattery, hal_googlebattery_hwservice) 18get_prop(hal_googlebattery, hwservicemanager_prop) 19