Override the 'online' status for AC/USB for battery defender

Bug: 175614345
Test: 'atest HealthTestCases'
Merged-In: Ieab7d0b6e707bf7273aadf0b56317a1442e74618
Change-Id: Ieab7d0b6e707bf7273aadf0b56317a1442e74618
(cherry picked from commit 4a061d9735d601128d57daf7fe02442e72365564)
diff --git a/health/Health.cpp b/health/Health.cpp
index b36c94a..1de8f98 100644
--- a/health/Health.cpp
+++ b/health/Health.cpp
@@ -127,7 +127,6 @@
 void private_healthd_board_init(struct healthd_config *hc) {
   hc->ignorePowerSupplyNames.push_back(android::String8(kTCPMPSYName));
   ccBackupRestore.Restore();
-  battDefender.update();
 
   needs_wlc_updates = FileExists(kWlcCapacity);
 }
@@ -138,7 +137,7 @@
   battMetricsLogger.logBatteryProperties(props);
   shutdownMetrics.logShutdownVoltage(props);
   ccBackupRestore.Backup(props->batteryLevel);
-  battDefender.update();
+  battDefender.update(props);
 
   if (needs_wlc_updates &&
       !android::base::WriteStringToFile(std::to_string(props->batteryLevel),