sepolicy: enable wakeup_sources debugfs for system_app

for wakelocks

Change-Id: I49b19231db6e5fe74c5c94bb9006e67049f90741
diff --git a/sepolicy/file.te b/sepolicy/file.te
index bc2fbef..52c58d8 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -5,6 +5,7 @@
 #type sysfs_ioscheduler, fs_type, sysfs_type;
 #type sysfs_zram, fs_type, sysfs_type;
 #type sysfs_ksm, fs_type, sysfs_type;
+type debugsfs_wakelock, fs_type, debugfs_type;
 # Filesystems
 type exfat, sdcard_type, fs_type, mlstrustedobject;
 #type fuse_device, sdcard_type, fs_type, mlstrustedobject;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index e8d6201..a69449a 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -22,3 +22,6 @@
 # fsck
 /system/bin/fsck\.ntfs                          u:object_r:fsck_exec:s0
 /system/bin/mount\.exfat                         u:object_r:fsck_exec:s0
+
+# wakelocks
+/sys/kernel/debug/wakeup_source     u:object_r:debugsfs_wakelock:s0
diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te
index a142f29..798477d 100644
--- a/sepolicy/system_app.te
+++ b/sepolicy/system_app.te
@@ -9,5 +9,5 @@
 #allow system_app sysfs_ksm:file rw_file_perms;
 
 # Read /sys/kernel/debug/wakeup_sources.
-#allow system_app debugfs:file r_file_perms;
+allow system_app debugsfs_wakelock:file r_file_perms;