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

Commit ca783f2b authored by Soonil Nagarkar's avatar Soonil Nagarkar Committed by Android (Google) Code Review
Browse files

Merge "Fix bug incrementing log time"

parents 7d79aae5 be77616a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ public abstract class LocalEventLog {
    private long mLastLogRealtimeMs;

    public LocalEventLog(int size) {
        Preconditions.checkArgument(size > 0);
        mLog = new Log[size];
        mLogSize = 0;
        mLogEndIndex = 0;
@@ -163,7 +164,7 @@ public abstract class LocalEventLog {

        if (mLogSize == mLog.length) {
            // if log is full, size will remain the same, but update the start time
            mStartRealtimeMs += event.getTimeDeltaMs();
            mStartRealtimeMs += mLog[startIndex()].getTimeDeltaMs();
        } else {
            // otherwise add an item
            mLogSize++;