statsd: add Vibrator atom
Adds VibratorStateChanged atom.
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testVibratorState
Bug: 113352975
Change-Id: I7b2b80d6f13306d5b60e17c5c143e0c687718369
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 6065bbf..97891b0 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -128,6 +128,7 @@
LowMemReported low_mem_reported = 81;
GenericAtom generic_atom = 82;
KeyValuePairsAtom key_value_pairs_atom = 83;
+ VibratorStateChanged vibrator_state_changed = 84;
}
// Pulled events will start at field 10000.
@@ -1410,6 +1411,25 @@
optional ForegroundState foreground_state = 6;
}
+/**
+ * Logs when the vibrator state changes.
+ * Logged from:
+ * frameworks/base/services/core/java/com/android/server/VibratorService.java
+ */
+message VibratorStateChanged {
+ repeated AttributionNode attribution_node = 1;
+
+ enum State {
+ OFF = 0;
+ ON = 1;
+ }
+ optional State state = 2;
+
+ // Duration (in milliseconds) requested to keep the vibrator on.
+ // Only applicable for State == ON.
+ optional int64 duration_millis = 3;
+}
+
/*
* Allows other apps to push events into statsd.
* Logged from: