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

Commit 8fad208b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ProcessList: Handle invalid state when computing next PSS Time"

parents 542a2d33 4d0b712a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -541,6 +541,14 @@ final class ProcessList {
                : (first
                        ? sFirstAwakePssTimes
                        : sSameAwakePssTimes);

        // handle an invalid state scenario
        if ((procState < 0) || (procState >= table.length)) {
            Slog.w(ActivityManagerService.TAG,
                    "Invalid Process State within computeNextPssTime");
            return now + PSS_MIN_TIME_FROM_STATE_CHANGE;
        }

        return now + table[procState];
    }