mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
[REFACTOR] health 2.0: BatteryMonitor::update split into 3 funcs
BatteryMonitor::update no longer calls healthd_board_battery_update and callback for us. Test: VTS health HAL 2.0 test Change-Id: I05fbf60b7e2c38f82e019d2fec2b5f535defaeae
This commit is contained in:
@@ -148,7 +148,14 @@ Return<Result> Health::update() {
|
||||
|
||||
// Retrieve all information and call healthd_mode_ops->battery_update, which calls
|
||||
// notifyListeners.
|
||||
bool chargerOnline = battery_monitor_->update();
|
||||
battery_monitor_->updateValues();
|
||||
struct BatteryProperties props = getBatteryProperties(battery_monitor_.get());
|
||||
bool log = healthd_board_battery_update(&props);
|
||||
if (log) {
|
||||
battery_monitor_->logValues();
|
||||
}
|
||||
healthd_mode_ops->battery_update(&props);
|
||||
bool chargerOnline = battery_monitor_->isChargerOnline();
|
||||
|
||||
// adjust uevent / wakealarm periods
|
||||
healthd_battery_update_internal(chargerOnline);
|
||||
|
||||
Reference in New Issue
Block a user