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

Commit 227a64fe authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Fix an NPE on overflow in BatteryStats history." into ics-mr1

parents 7257a32b 45f06460
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;
            }