Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cf33017 authored by Yifan Hong's avatar Yifan Hong Committed by android-build-merger
Browse files

Merge "[REFACTOR] health 2.0: BatteryMonitor::update split into 3 funcs" am:...

Merge "[REFACTOR] health 2.0: BatteryMonitor::update split into 3 funcs" am: 17fad821 am: 7970a4ad
am: 7ae63ccd

Change-Id: Ib0e116a5637cb9c7bd5a5b79f3891a0baffffb48
parents b84e5b00 7ae63ccd
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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);