• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1type system_suspend, domain, coredomain, system_suspend_server, system_suspend_internal_server;
2
3type system_suspend_exec, system_file_type, exec_type, file_type;
4init_daemon_domain(system_suspend)
5
6# To serve ISuspendControlService.
7binder_use(system_suspend)
8add_service(system_suspend, system_suspend_control_service)
9
10# Access to /sys/power/{ wakeup_count, state } suspend interface.
11allow system_suspend sysfs_power:file rw_file_perms;
12
13# Access to wakeup, suspend stats, and wakeup reasons.
14r_dir_file(system_suspend, sysfs_suspend_stats)
15r_dir_file(system_suspend, sysfs_wakeup)
16r_dir_file(system_suspend, sysfs_wakeup_reasons)
17# To resolve arbitrary sysfs paths from /sys/class/wakeup/* symlinks.
18allow system_suspend sysfs_type:dir search;
19
20# Access to suspend_hal system properties
21get_prop(system_suspend, suspend_prop)
22
23# To call BTAA registered callbacks
24allow system_suspend bluetooth:binder call;
25
26# For adding `dumpsys syspend_control` output to bugreport
27allow system_suspend dumpstate:fd use;
28allow system_suspend dumpstate:fifo_file write;
29
30neverallow {
31    domain
32    -atrace # tracing
33    -bluetooth # support Bluetooth activity attribution (BTAA)
34    -dumpstate # bug reports
35    -system_suspend # implements system_suspend_control_service
36    -system_server # configures system_suspend via ISuspendControlService
37    -traceur_app # tracing
38} system_suspend_control_service:service_manager find;
39