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

Commit a889afd4 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov Committed by Android (Google) Code Review
Browse files

Merge "Keep recording battery history when already charged" into main

parents f2767e98 306eff8a
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -15300,15 +15300,6 @@ public class BatteryStatsImpl extends BatteryStats {
                mHistory.writeHistoryItem(elapsedRealtimeMs, uptimeMs);
            }
        }
        if (!onBattery &&
                (status == BatteryManager.BATTERY_STATUS_FULL ||
                        status == BatteryManager.BATTERY_STATUS_UNKNOWN)) {
            // We don't record history while we are plugged in and fully charged
            // (or when battery is not present).  The next time we are
            // unplugged, history will be cleared.
            mHistory.setHistoryRecordingEnabled(DEBUG);
        }
        mLastLearnedBatteryCapacityUah = chargeFullUah;
        if (mMinLearnedBatteryCapacityUah == -1) {
            mMinLearnedBatteryCapacityUah = chargeFullUah;