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

Commit 5eb49e0f authored by Conley Owens's avatar Conley Owens Committed by Android Git Automerger
Browse files

am e321d064: am 2f463ef1: Merge "Adding a sanity test in the while loop in readHistory()"

* commit 'e321d064':
  Adding a sanity test in the while loop in readHistory()
parents ba40174b e321d064
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4708,7 +4708,7 @@ public final class BatteryStatsImpl extends BatteryStats {
        mHistory = mHistoryEnd = mHistoryCache = null;
        mHistoryBaseTime = 0;
        long time;
        while ((time=in.readLong()) >= 0) {
        while (in.dataAvail() > 0 && (time=in.readLong()) >= 0) {
            HistoryItem rec = new HistoryItem(time, in);
            addHistoryRecordLocked(rec);
            if (rec.time > mHistoryBaseTime) {