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

Bug: 175614345
Test: 'atest HealthTestCases'
Merged-In: Iac6fff029e9bbc5d0b294ae194041d81428ff385
Change-Id: Iac6fff029e9bbc5d0b294ae194041d81428ff385
(cherry picked from commit b509d5329d9c5ae160e435d3c9c01fa0893108e5)
diff --git a/health/HealthService.cpp b/health/HealthService.cpp
index ffe96bb..a4e98b5 100644
--- a/health/HealthService.cpp
+++ b/health/HealthService.cpp
@@ -112,7 +112,6 @@
 void healthd_board_init(struct healthd_config*) {
     ccBackupRestoreBMS.Restore();
     lcBackupRestore.Restore();
-    battDefender.update();
 }
 
 int healthd_board_battery_update(struct android::BatteryProperties *props) {
@@ -124,7 +123,7 @@
     shutdownMetrics.logShutdownVoltage(props);
     ccBackupRestoreBMS.Backup(props->batteryLevel);
     lcBackupRestore.Backup();
-    battDefender.update();
+    battDefender.update(props);
     return 0;
 }