Allow traced to notify traceur via property

This CL introduces allows traced to set the
sys.traceur.trace_end_signal property at the end
of the tracer. In turn that property notifies the
the Traceur app.
This is to allowing Traceur to be killed during
a long-trace and avoid wasting resources making
it a persistent service.
See aosp/886616 for the matching traceur change.

Test: manual
Bug: 116754732
Change-Id: I89e2f02b3f973813ce8ff3507d397a06502f84c1
diff --git a/private/compat/28.0/28.0.ignore.cil b/private/compat/28.0/28.0.ignore.cil
index c989825..ee482c1 100644
--- a/private/compat/28.0/28.0.ignore.cil
+++ b/private/compat/28.0/28.0.ignore.cil
@@ -110,6 +110,7 @@
     system_lmk_prop
     system_suspend_hwservice
     system_suspend_control_service
+    system_trace_prop
     staging_data_file
     task_profiles_file
     testharness_service
diff --git a/private/property_contexts b/private/property_contexts
index 4eb10dd..8024954 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -79,6 +79,7 @@
 pm.                     u:object_r:pm_prop:s0
 test.sys.boot.reason    u:object_r:test_boot_reason_prop:s0
 sys.lmk.                u:object_r:system_lmk_prop:s0
+sys.trace.              u:object_r:system_trace_prop:s0
 
 # Boolean property set by system server upon boot indicating
 # if device owner is provisioned.
diff --git a/private/traced.te b/private/traced.te
index a3c5d8b..0aeb11b 100644
--- a/private/traced.te
+++ b/private/traced.te
@@ -36,6 +36,10 @@
 allow traced iorapd:fd use;
 allow traced iorapd_tmpfs:file { read write };
 
+# Allow traced to notify Traceur when a trace ends by setting the
+# sys.trace.trace_end_signal property.
+set_prop(traced, system_trace_prop)
+
 ###
 ### Neverallow rules
 ###
diff --git a/public/property.te b/public/property.te
index 6cc67ed..8baef8d 100644
--- a/public/property.te
+++ b/public/property.te
@@ -74,6 +74,7 @@
 type system_boot_reason_prop, property_type;
 type system_prop, property_type, core_property_type;
 type system_radio_prop, property_type, core_property_type;
+type system_trace_prop, property_type;
 type test_boot_reason_prop, property_type;
 type test_harness_prop, property_type;
 type time_prop, property_type;
@@ -440,6 +441,7 @@
     -system_boot_reason_prop
     -system_prop
     -system_radio_prop
+    -system_trace_prop
     -test_boot_reason_prop
     -test_harness_prop
     -time_prop