Log the thermal throttling event to enable conditional temperature pulling.
Test: statsd test
BUG: b/112432890
Change-Id: Ic0b175053ec6afe497eb67a31d3e1a7633df4c5b
Merged-in: If132bab9690043a9e3e89187dfb1a9ed8fd0c996
(cherry picked from commit 30658a2360d45bb54a034b2b074ea9189c340020)
diff --git a/stats/atoms.proto b/stats/atoms.proto
index ab9c7e8..18aa0d0 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -121,8 +121,7 @@
ANROccurred anr_occurred = 79;
WTFOccurred wtf_occurred = 80;
LowMemReported low_mem_reported = 81;
-
-
+ ThermalThrottlingStateChanged thermal_throttling = 86;
}
// Pulled events will start at field 10000.
@@ -198,6 +197,26 @@
*/
/**
+ * Logs when the Thermal service HAL notifies the throttling start/stop events.
+ *
+ * Logged from:
+ * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
+ */
+message ThermalThrottlingStateChanged {
+ optional android.os.TemperatureTypeEnum sensor_type = 1;
+
+ enum State {
+ UNKNOWN = 0;
+ START = 1;
+ STOP = 2;
+ }
+
+ optional State state = 2;
+
+ optional float temperature = 3;
+}
+
+/**
* Logs when the screen state changes.
*
* Logged from: