Merge "Fix an NPE on overflow in BatteryStats history." into ics-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
227a64fe23
@@ -1275,7 +1275,7 @@ public final class BatteryStatsImpl extends BatteryStats {
|
||||
// record changes to the battery level.
|
||||
if (mHistoryLastWritten.batteryLevel == mHistoryCur.batteryLevel &&
|
||||
(dataSize >= MAX_MAX_HISTORY_BUFFER
|
||||
|| ((mHistoryEnd.states^mHistoryCur.states)
|
||||
|| ((mHistoryLastWritten.states^mHistoryCur.states)
|
||||
& HistoryItem.MOST_INTERESTING_STATES) == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user