Merge "Override the 'online' status for AC/USB for battery defender" into rvc-qpr-dev
diff --git a/health/Health.cpp b/health/Health.cpp
index 664dd7b..12cf599 100644
--- a/health/Health.cpp
+++ b/health/Health.cpp
@@ -118,7 +118,6 @@
void private_healthd_board_init(struct healthd_config *hc) {
hc->ignorePowerSupplyNames.push_back(android::String8(kTCPMPSYName));
needs_wlc_updates = FileExists(kWlcCapacity);
- battDefender.update();
}
int private_healthd_board_battery_update(struct android::BatteryProperties *props) {
@@ -126,7 +125,7 @@
battThermalControl.updateThermalState(props);
battMetricsLogger.logBatteryProperties(props);
shutdownMetrics.logShutdownVoltage(props);
- battDefender.update();
+ battDefender.update(props);
if (needs_wlc_updates &&
!android::base::WriteStringToFile(std::to_string(props->batteryLevel), kWlcCapacity))