Add SELinux config for new SensorFusion property
Add required SELinux configuration to support the sensor
configuration property:
sensors.aosp_low_power_sensor_fusion.maximum_rate
Test: use getprop to verify presence and readability
of the new property. dumpsys sensorservice to verify
sensor service is picking up the property value.
Change-Id: I96b8fd6ce72d7a5bf69b028802b329b03f261585
diff --git a/private/property.te b/private/property.te
index 66c9cea..8cf7c2a 100644
--- a/private/property.te
+++ b/private/property.te
@@ -51,6 +51,8 @@
system_internal_prop(virtualizationservice_prop)
system_internal_prop(ctl_apex_load_prop)
+system_internal_prop(sensors_config_prop)
+
# Properties which can't be written outside system
system_restricted_prop(device_config_virtualization_framework_native_prop)
system_restricted_prop(log_file_logger_prop)
diff --git a/private/property_contexts b/private/property_contexts
index d556acf..2dfc092 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -1566,3 +1566,6 @@
# Properties for Quick Start setup.
ro.quick_start.oem_id u:object_r:quick_start_prop:s0 exact string
ro.quick_start.device_id u:object_r:quick_start_prop:s0 exact string
+
+# Properties for sensor service
+sensors.aosp_low_power_sensor_fusion.maximum_rate u:object_r:sensors_config_prop:s0 exact uint
diff --git a/private/system_server.te b/private/system_server.te
index e78a734..9719e09 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -854,6 +854,10 @@
# Allow the heap dump ART plugin to the count of sessions waiting for OOME
get_prop(system_server, traced_oome_heap_session_count_prop)
+# Allow the sensor service (running in the system service) to read sensor
+# configuration properties
+get_prop(system_server, sensors_config_prop)
+
# Create a socket for connections from debuggerd.
allow system_server system_ndebug_socket:sock_file create_file_perms;