From c9c997e3b37e67b80dd9df7db9b0e5c45564775c Mon Sep 17 00:00:00 2001 From: Kalpaj Chaudhari Date: Mon, 26 Dec 2022 10:37:31 +0530 Subject: [PATCH] sm7325-common: Fixes related to system suspend sepolicies Change-Id: I2d7bca3e7db32627eddc5699dfb4cd7db6ec8784 --- sepolicy/private/system_suspend.te | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sepolicy/private/system_suspend.te diff --git a/sepolicy/private/system_suspend.te b/sepolicy/private/system_suspend.te new file mode 100644 index 0000000..0d845e9 --- /dev/null +++ b/sepolicy/private/system_suspend.te @@ -0,0 +1,17 @@ +init_daemon_domain(system_suspend) + +# To serve ISuspendControlService.aidl. +binder_use(system_suspend) +add_service(system_suspend, system_suspend_control_service) + +# Access to /sys/power/{ wakeup_count, state } suspend interface. +allow system_suspend sysfs_power:file rw_file_perms; + +allow system_suspend sysfs:dir { open read }; +allow system_suspend sysfs:file { getattr }; + +dontaudit system_suspend sysfs:file { open read }; + +# Access to /sys/power/{ wake_lock, wake_unlock } suspend blocker interface. +allow system_suspend self:global_capability2_class_set block_suspend; +allow system_suspend sysfs_wake_lock:file rw_file_perms;