summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Yoshida <gyoshida@google.com>2019-08-16 00:43:41 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-08-16 00:43:41 +0000
commitf43c63a72a6996d54a780d2a3ac4f6027b53210c (patch)
treeffd76335ba0cfa5260a7063d6b9438adccd6f485
parent4b77d124bfe037ac8a7b8da78b38b745887c93e3 (diff)
parent9b9094a16d200a9d33719b6c57eedeba592a831f (diff)
downloadvrservices-f43c63a72a6996d54a780d2a3ac4f6027b53210c.tar.gz
Merge "Add SELinux rules that are common to XR devices."
-rw-r--r--xr/sepolicy/README1
-rw-r--r--xr/sepolicy/property.te10
-rw-r--r--xr/sepolicy/property_contexts4
3 files changed, 15 insertions, 0 deletions
diff --git a/xr/sepolicy/README b/xr/sepolicy/README
new file mode 100644
index 0000000..30daeea
--- /dev/null
+++ b/xr/sepolicy/README
@@ -0,0 +1 @@
+These are SELinux policies that can be shared across XR devices.
diff --git a/xr/sepolicy/property.te b/xr/sepolicy/property.te
new file mode 100644
index 0000000..adad644
--- /dev/null
+++ b/xr/sepolicy/property.te
@@ -0,0 +1,10 @@
+# For VrHeadsetPowerPolicyService.
+type vr_performance_prop, property_type, extended_core_property_type;
+type vr_pps_state_prop, property_type, extended_core_property_type;
+type vr_pps_enabled_prop, property_type;
+
+set_prop(platform_app, vr_performance_prop)
+set_prop(platform_app, vr_pps_state_prop)
+get_prop(platform_app, vr_pps_enabled_prop)
+set_prop(surfaceflinger, vr_performance_prop)
+
diff --git a/xr/sepolicy/property_contexts b/xr/sepolicy/property_contexts
new file mode 100644
index 0000000..6e1a18c
--- /dev/null
+++ b/xr/sepolicy/property_contexts
@@ -0,0 +1,4 @@
+# For VrHeadsetPowerPolicyService.
+persist.sys.pps_enabled u:object_r:vr_pps_enabled_prop:s0
+sys.pps.state u:object_r:vr_pps_state_prop:s0
+sys.dvr.performance u:object_r:vr_performance_prop:s0