Merge "Fix the missing longwake finish event problem." into qt-dev
am: eb5532eac8
Change-Id: I4f1b554cbf5f9da1b7a922ce89b77537b6be6667
This commit is contained in:
@@ -3609,8 +3609,8 @@ public class BatteryStatsImpl extends BatteryStats {
|
|||||||
|
|
||||||
public void createFakeHistoryEvents(long numEvents) {
|
public void createFakeHistoryEvents(long numEvents) {
|
||||||
for(long i = 0; i < numEvents; i++) {
|
for(long i = 0; i < numEvents; i++) {
|
||||||
noteWifiOnLocked();
|
noteLongPartialWakelockStart("name1", "historyName1", 1000);
|
||||||
noteWifiOffLocked();
|
noteLongPartialWakelockFinish("name1", "historyName1", 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3693,9 +3693,10 @@ public class BatteryStatsImpl extends BatteryStats {
|
|||||||
mHistoryBufferLastPos = -1;
|
mHistoryBufferLastPos = -1;
|
||||||
final long elapsedRealtime = mClocks.elapsedRealtime();
|
final long elapsedRealtime = mClocks.elapsedRealtime();
|
||||||
final long uptime = mClocks.uptimeMillis();
|
final long uptime = mClocks.uptimeMillis();
|
||||||
|
HistoryItem newItem = new HistoryItem();
|
||||||
|
newItem.setTo(cur);
|
||||||
startRecordingHistory(elapsedRealtime, uptime, false);
|
startRecordingHistory(elapsedRealtime, uptime, false);
|
||||||
|
addHistoryBufferLocked(elapsedRealtimeMs, HistoryItem.CMD_UPDATE, newItem);
|
||||||
addHistoryBufferLocked(elapsedRealtimeMs, HistoryItem.CMD_UPDATE, cur);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user