Add rule for system_server to send Perfetto a signal
Cancelling/ending traces wasn't working properly in the Developer
Telemetry APIs due to this missing rule. Now, calling destroyForcibly
on the Perfetto process running the trace successfully kills the
process.
Bug: 293957254
Test: locally with atest ProfilingFrameworkTests#testRequestProfilingCancel
Change-Id: I91d83dde01897eb9e48cf4a90e44d088c3f2a45f
diff --git a/private/system_server.te b/private/system_server.te
index 5b0caaa..37ef2b3 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -587,6 +587,9 @@
allow system_server perfetto_traces_profiling_data_file:file { rw_file_perms unlink };
allow system_server perfetto_traces_data_file:dir search;
+# Allow system server to kill perfetto processes for ProfilingService.
+allow system_server perfetto:process signal;
+
# Manage /data/backup.
allow system_server backup_data_file:dir create_dir_perms;
allow system_server backup_data_file:file create_file_perms;