diff options
author | Ruchi Kandoi <kandoiruchi@google.com> | 2016-04-07 12:34:40 -0700 |
---|---|---|
committer | Ruchi Kandoi <kandoiruchi@google.com> | 2016-04-07 23:10:14 +0000 |
commit | 3f9886bb0bce7297c676907ded51c402d7b61654 (patch) | |
tree | c63a4079660fa58da4851c9c20fec304aa20047a /healthd | |
parent | 1dcf56080f7a396d57a9bd0e2c601f739a4bdf9a (diff) | |
download | system_core-3f9886bb0bce7297c676907ded51c402d7b61654.tar.gz system_core-3f9886bb0bce7297c676907ded51c402d7b61654.tar.bz2 system_core-3f9886bb0bce7297c676907ded51c402d7b61654.zip |
healthd: Add charge counter for BatteryProperties.
Bug: 27174034
Change-Id: I26de33714bb353faadb159d898f0b2142c76c657
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Diffstat (limited to 'healthd')
-rw-r--r-- | healthd/BatteryMonitor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp index ae84d1e18..a8646c5a9 100644 --- a/healthd/BatteryMonitor.cpp +++ b/healthd/BatteryMonitor.cpp @@ -73,6 +73,7 @@ static void initBatteryProperties(BatteryProperties* props) { props->batteryCurrent = 0; props->batteryCycleCount = 0; props->batteryFullCharge = 0; + props->batteryChargeCounter = 0; props->batteryTechnology.clear(); } @@ -230,6 +231,9 @@ bool BatteryMonitor::update(void) { if (!mHealthdConfig->batteryCycleCountPath.isEmpty()) props.batteryCycleCount = getIntField(mHealthdConfig->batteryCycleCountPath); + if (!mHealthdConfig->batteryChargeCounterPath.isEmpty()) + props.batteryChargeCounter = getIntField(mHealthdConfig->batteryChargeCounterPath); + props.batteryTemperature = mBatteryFixedTemperature ? mBatteryFixedTemperature : getIntField(mHealthdConfig->batteryTemperaturePath); |