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

Commit 40c87258 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

batstats: fix wake lock tracking, service bug

- Fix bug I introduced in handling wake lock changes where
  we weren't iterating over the new work sources correctly.
- Fix bug in ActiveServices that would wtf too much.
- Prepare to start tracking uptime in the battery history.

Change-Id: Ia94316be51bc6eab7b02f214a5c40c08e99cc3b1
parent c5dc251e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -577,6 +577,8 @@ public abstract class BatteryStats implements Parcelable {

        public int states;

        public int states2;

        // The wake lock that was acquired at this point.
        public HistoryTag wakelockTag;

@@ -1215,6 +1217,11 @@ public abstract class BatteryStats implements Parcelable {
     */
    public abstract int getHighDischargeAmountSinceCharge();

    /**
     * Retrieve the discharge amount over the selected discharge period <var>which</var>.
     */
    public abstract int getDischargeAmount(int which);

    /**
     * Get the amount the battery has discharged while the screen was on,
     * since the last time power was unplugged.