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:
Amith Yamasani
2011-11-22 11:04:58 -08:00
committed by Android Git Automerger

View File

@@ -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;
}