From ce0b3c31df48f6ebfc495ae0ed271f1fdda2d334 Mon Sep 17 00:00:00 2001 From: Stephane Lee Date: Thu, 15 Oct 2020 16:14:07 -0700 Subject: [PATCH] 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) --- health/Health.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/health/Health.cpp b/health/Health.cpp index 7c5a135f..cc332a57 100644 --- a/health/Health.cpp +++ b/health/Health.cpp @@ -103,14 +103,13 @@ void fill_ufs_storage_attribute(StorageAttribute *attr) { 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; }