blob: 9f6d7af39d5087beaa1a83893337d8624aa18821 [file] [log] [blame]
Tri Voa5320882019-02-26 16:45:40 -08001type system_suspend, domain, coredomain, system_suspend_server;
2
3type system_suspend_exec, system_file_type, exec_type, file_type;
4init_daemon_domain(system_suspend)
5
6# To serve ISuspendControlService.aidl.
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;
Tri Vo131fa732019-02-07 13:29:39 -080012
Tri Vo5f1ac022019-11-07 13:37:34 -080013# Access to wakeup and suspend stats.
14r_dir_file(system_suspend, sysfs_suspend_stats)
15r_dir_file(system_suspend, sysfs_wakeup)
Tri Voe3e77ed2019-11-12 13:37:03 -080016# To resolve arbitrary sysfs paths from /sys/class/wakeup/* symlinks.
17allow system_suspend sysfs_type:dir search;
Tri Vo5f1ac022019-11-07 13:37:34 -080018
Michael Sun666992e2020-10-14 19:49:20 +000019# To call BTAA registered callbacks
20allow system_suspend bluetooth:binder call;
21
Tri Vo131fa732019-02-07 13:29:39 -080022neverallow {
23 domain
24 -atrace # tracing
Michael Sundf54a522020-10-14 00:31:01 +000025 -bluetooth # support Bluetooth activity attribution (BTAA)
Tri Vo131fa732019-02-07 13:29:39 -080026 -dumpstate # bug reports
27 -system_suspend # implements system_suspend_control_service
28 -system_server # configures system_suspend via ISuspendControlService
29 -traceur_app # tracing
30} system_suspend_control_service:service_manager find;