Skip to content

Commit 227a64f

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "Fix an NPE on overflow in BatteryStats history." into ics-mr1
2 parents 7257a32 + 45f0646 commit 227a64f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/com/android/internal/os/BatteryStatsImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ void addHistoryBufferLocked(long curTime) {
12751275
// record changes to the battery level.
12761276
if (mHistoryLastWritten.batteryLevel == mHistoryCur.batteryLevel &&
12771277
(dataSize >= MAX_MAX_HISTORY_BUFFER
1278-
|| ((mHistoryEnd.states^mHistoryCur.states)
1278+
|| ((mHistoryLastWritten.states^mHistoryCur.states)
12791279
& HistoryItem.MOST_INTERESTING_STATES) == 0)) {
12801280
return;
12811281
}

0 commit comments

Comments
 (0)