am 227a64fe: Merge "Fix an NPE on overflow in BatteryStats history." into ics-mr1
* commit '227a64fe23b4e6f05dc31e5f51b0f4c142e52b18': Fix an NPE on overflow in BatteryStats history.
This commit is contained in:
@@ -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