Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d61b61d6 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android Git Automerger
Browse files

am 227a64fe: Merge "Fix an NPE on overflow in BatteryStats history." into ics-mr1

* commit '227a64fe':
  Fix an NPE on overflow in BatteryStats history.
parents b8ee50ee 227a64fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
            }