Override the 'online' status for AC/USB for battery defender
Bug: 175614345
Test: 'atest HealthTestCases'
Merged-In: Ib099078dac155ae9ab45010cd2649ddc58e4c49a
Change-Id: Ib099078dac155ae9ab45010cd2649ddc58e4c49a
(cherry picked from commit 3ae9842677c71826800c64ec791d65ab4adc4d74)
diff --git a/health/Health.cpp b/health/Health.cpp
index 7c5a135..cc332a5 100644
--- a/health/Health.cpp
+++ b/health/Health.cpp
@@ -103,14 +103,13 @@
void private_healthd_board_init(struct healthd_config *hc) {
hc->ignorePowerSupplyNames.push_back(android::String8(kTCPMPSYName));
- battDefender.update();
}
int private_healthd_board_battery_update(struct android::BatteryProperties *props) {
deviceHealth.update(props);
battMetricsLogger.logBatteryProperties(props);
shutdownMetrics.logShutdownVoltage(props);
- battDefender.update();
+ battDefender.update(props);
return 0;
}