healthd: Add charge counter for BatteryProperties.

am: 3f9886b

* commit '3f9886bb0bce7297c676907ded51c402d7b61654':
  healthd: Add charge counter for BatteryProperties.

Change-Id: I4fbdeebcd50acae22712dde8a2192475051c9d96
This commit is contained in:
Ruchi Kandoi 2016-04-08 01:19:36 +00:00 committed by android-build-merger
commit 8df54e7721
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,7 @@ static void initBatteryProperties(BatteryProperties* props) {
props->batteryCurrent = 0;
props->batteryCycleCount = 0;
props->batteryFullCharge = 0;
props->batteryChargeCounter = 0;
props->batteryTechnology.clear();
}
@ -231,6 +232,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);