Statsd anomaly detection atom

Creates an atom to represent when statsd's anomaly detection alert
fires, so that statsd can log when it detects an anomaly (in the output
and for any further processing).

Test: manually confirmed that atom was logged
Change-Id: I3376e4038bdc3402a536aab7cebad24b104a9aee
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index c37f05e..1c6d9b0 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -79,7 +79,8 @@
         IsolatedUidChanged isolated_uid_changed = 43;
         PacketWakeupOccurred packet_wakeup_occurred = 44;
         DropboxErrorChanged dropbox_error_changed = 45;
-        AppHook app_hook = 46;
+        AnomalyDetected anomaly_detected = 46;
+        AppHook app_hook = 47;
         // TODO: Reorder the numbering so that the most frequent occur events occur in the first 15.
     }
 
@@ -841,6 +842,23 @@
 }
 
 /**
+ * Logs when statsd detects an anomaly.
+ *
+ * Logged from:
+ *   frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp
+ */
+message AnomalyDetected {
+    // Uid that owns the config whose anomaly detection alert fired.
+    optional int32 config_uid = 1;
+
+    // Name of the config whose anomaly detection alert fired.
+    optional string config_name = 2;
+
+    // Name of the alert (i.e. name of the anomaly that was detected).
+    optional string alert_name = 3;
+}
+
+/**
  * Pulls bytes transferred via wifi (Sum of foreground and background usage).
  *
  * Pulled from: