Atom: Pulled battery level
Atom to pull abttery level directly from health hal
Test: manual on blueline
Test: will do cts
Bug: 119686325
Change-Id: If2e40633b2bb9a6da61fbe1f63484735727e9ac2
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index fa0a018..3208d7d 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -204,6 +204,7 @@
DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040;
DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041;
ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042;
+ BatteryLevel battery_level = 10043;
}
// DO NOT USE field numbers above 100,000 in AOSP.
@@ -2679,6 +2680,17 @@
}
/**
+ * Pulls battery level (percent full, from 0 to 100).
+ *
+ * Pulled from:
+ * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp
+ */
+message BatteryLevel {
+ // Battery level. Should be in [0, 100].
+ optional int32 battery_level = 1;
+}
+
+/**
* Pulls the temperature of various parts of the device.
* The units are tenths of a degree Celsius. Eg: 30.3C is reported as 303.
*