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

Commit 95615582 authored by Hui Yu's avatar Hui Yu Committed by android-build-merger
Browse files

Merge "Fix the missing longwake finish event problem." into qt-dev

am: eb5532ea

Change-Id: I4f1b554cbf5f9da1b7a922ce89b77537b6be6667
parents 0785d489 eb5532ea
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -3609,8 +3609,8 @@ public class BatteryStatsImpl extends BatteryStats {
    public void createFakeHistoryEvents(long numEvents) {
        for(long i = 0; i < numEvents; i++) {
            noteWifiOnLocked();
            noteWifiOffLocked();
            noteLongPartialWakelockStart("name1", "historyName1", 1000);
            noteLongPartialWakelockFinish("name1", "historyName1", 1000);
        }
    }
@@ -3693,9 +3693,10 @@ public class BatteryStatsImpl extends BatteryStats {
            mHistoryBufferLastPos = -1;
            final long elapsedRealtime = mClocks.elapsedRealtime();
            final long uptime = mClocks.uptimeMillis();
            HistoryItem newItem = new HistoryItem();
            newItem.setTo(cur);
            startRecordingHistory(elapsedRealtime, uptime, false);
            addHistoryBufferLocked(elapsedRealtimeMs, HistoryItem.CMD_UPDATE, cur);
            addHistoryBufferLocked(elapsedRealtimeMs, HistoryItem.CMD_UPDATE, newItem);
            return;
        }