cm: sepolicy: Create standard policy for LiveDisplay

Change-Id: Icb0047f261861c8fae99ffa4e9053de8d3aa8c73
diff --git a/sepolicy/file.te b/sepolicy/file.te
index 91b89a3..1a00339 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -14,3 +14,6 @@
 
 # Persistent property storage
 type persist_property_file, file_type;
+
+# Knobs for LiveDisplay
+type livedisplay_sysfs, sysfs_type, file_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 4c6baec..c706a5d 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -37,3 +37,9 @@
 
 # Persistent properties
 /persist/properties         u:object_r:persist_property_file:s0
+
+# LiveDisplay
+/sys/devices/virtual/graphics/fb0/aco           u:object_r:livedisplay_sysfs:s0
+/sys/devices/virtual/graphics/fb0/cabc          u:object_r:livedisplay_sysfs:s0
+/sys/devices/virtual/graphics/fb0/rgb           u:object_r:livedisplay_sysfs:s0
+/sys/devices/virtual/graphics/fb0/sre           u:object_r:livedisplay_sysfs:s0
diff --git a/sepolicy/livedisplay.te b/sepolicy/livedisplay.te
new file mode 100644
index 0000000..a260e07
--- /dev/null
+++ b/sepolicy/livedisplay.te
@@ -0,0 +1,2 @@
+# Various knobs used by LiveDisplay
+allow system_server livedisplay_sysfs:file rw_file_perms;
diff --git a/sepolicy/sepolicy.mk b/sepolicy/sepolicy.mk
index 382e241..75f4b09 100644
--- a/sepolicy/sepolicy.mk
+++ b/sepolicy/sepolicy.mk
@@ -21,6 +21,7 @@
     healthd.te \
     hostapd.te \
     installd.te \
+    livedisplay.te \
     mediaserver.te \
     netd.te \
     property.te \