Merge "Allow traced_probes to subscribe to statsd atoms"
diff --git a/private/stats.te b/private/stats.te
index 89b9488..5790faa 100644
--- a/private/stats.te
+++ b/private/stats.te
@@ -56,4 +56,5 @@
   -system_app
   -system_server
   -traceur_app
+  -traced_probes
 } stats_service:service_manager find;
diff --git a/private/traced_probes.te b/private/traced_probes.te
index 5cc271c..dfc4d07 100644
--- a/private/traced_probes.te
+++ b/private/traced_probes.te
@@ -100,8 +100,10 @@
 # On debug builds allow to ingest system logs into the trace.
 userdebug_or_eng(`read_logd(traced_probes)')
 
-# Allow traced_probes to talk to statsd for logging metrics.
+# Allow traced_probes to talk to statsd for logging metrics and recording atoms.
 unix_socket_send(traced_probes, statsdw, statsd)
+binder_call(traced_probes, statsd)
+allow traced_probes stats_service:service_manager find;
 
 ###
 ### Neverallow rules
diff --git a/public/statsd.te b/public/statsd.te
index e1c24c6..71597cc 100644
--- a/public/statsd.te
+++ b/public/statsd.te
@@ -34,6 +34,7 @@
 binder_call(statsd, appdomain)
 binder_call(statsd, incidentd)
 binder_call(statsd, system_server)
+binder_call(statsd, traced_probes)
 
 # Allow statsd to interact with gpuservice
 allow statsd gpu_service:service_manager find;