healthd: Add charge counter for BatteryProperties.
Bug: 27174034 Change-Id: I26de33714bb353faadb159d898f0b2142c76c657 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
This commit is contained in:
parent
1dcf56080f
commit
3f9886bb0b
1 changed files with 4 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ static void initBatteryProperties(BatteryProperties* props) {
|
||||||
props->batteryCurrent = 0;
|
props->batteryCurrent = 0;
|
||||||
props->batteryCycleCount = 0;
|
props->batteryCycleCount = 0;
|
||||||
props->batteryFullCharge = 0;
|
props->batteryFullCharge = 0;
|
||||||
|
props->batteryChargeCounter = 0;
|
||||||
props->batteryTechnology.clear();
|
props->batteryTechnology.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,6 +231,9 @@ bool BatteryMonitor::update(void) {
|
||||||
if (!mHealthdConfig->batteryCycleCountPath.isEmpty())
|
if (!mHealthdConfig->batteryCycleCountPath.isEmpty())
|
||||||
props.batteryCycleCount = getIntField(mHealthdConfig->batteryCycleCountPath);
|
props.batteryCycleCount = getIntField(mHealthdConfig->batteryCycleCountPath);
|
||||||
|
|
||||||
|
if (!mHealthdConfig->batteryChargeCounterPath.isEmpty())
|
||||||
|
props.batteryChargeCounter = getIntField(mHealthdConfig->batteryChargeCounterPath);
|
||||||
|
|
||||||
props.batteryTemperature = mBatteryFixedTemperature ?
|
props.batteryTemperature = mBatteryFixedTemperature ?
|
||||||
mBatteryFixedTemperature :
|
mBatteryFixedTemperature :
|
||||||
getIntField(mHealthdConfig->batteryTemperaturePath);
|
getIntField(mHealthdConfig->batteryTemperaturePath);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue