blob: 857fea849f46c85e438099d3f59df62c77d1878f [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
Michael Sun6445f192020-11-02 23:54:21 +00006# To serve ISuspendControlService and ISuspendControlServiceInternal.
Tri Voa5320882019-02-26 16:45:40 -08007binder_use(system_suspend)
Michael Sun6445f192020-11-02 23:54:21 +00008add_service(system_suspend, system_suspend_control_internal_service)
Tri Voa5320882019-02-26 16:45:40 -08009add_service(system_suspend, system_suspend_control_service)
10
11# Access to /sys/power/{ wakeup_count, state } suspend interface.
12allow system_suspend sysfs_power:file rw_file_perms;
Tri Vo131fa732019-02-07 13:29:39 -080013
Michael Sun9cb662b2020-10-16 07:22:44 +000014# Access to wakeup, suspend stats, and wakeup reasons.
Tri Vo5f1ac022019-11-07 13:37:34 -080015r_dir_file(system_suspend, sysfs_suspend_stats)
16r_dir_file(system_suspend, sysfs_wakeup)
Michael Sun9cb662b2020-10-16 07:22:44 +000017r_dir_file(system_suspend, sysfs_wakeup_reasons)
Tri Voe3e77ed2019-11-12 13:37:03 -080018# To resolve arbitrary sysfs paths from /sys/class/wakeup/* symlinks.
19allow system_suspend sysfs_type:dir search;
Tri Vo5f1ac022019-11-07 13:37:34 -080020
Benjamin Schwartz3e4d97b2020-10-30 13:55:21 -070021# Access to suspend_hal system properties
22get_prop(system_suspend, suspend_prop)
23
Michael Sun666992e2020-10-14 19:49:20 +000024# To call BTAA registered callbacks
25allow system_suspend bluetooth:binder call;
26
Tri Vo131fa732019-02-07 13:29:39 -080027neverallow {
28 domain
29 -atrace # tracing
Michael Sun6445f192020-11-02 23:54:21 +000030 -dumpstate # bug reports
31 -system_suspend # implements system_suspend_control_internal_service
32 -system_server # configures system_suspend via ISuspendControlServiceInternal
33 -traceur_app # tracing
34} system_suspend_control_internal_service:service_manager find;
35
36neverallow {
37 domain
38 -atrace # tracing
Michael Sundf54a522020-10-14 00:31:01 +000039 -bluetooth # support Bluetooth activity attribution (BTAA)
Tri Vo131fa732019-02-07 13:29:39 -080040 -dumpstate # bug reports
41 -system_suspend # implements system_suspend_control_service
42 -system_server # configures system_suspend via ISuspendControlService
43 -traceur_app # tracing
44} system_suspend_control_service:service_manager find;