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
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue