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

Commit 389a7d65 authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Fix inconsistent OomAdjuster computation result"

parents ff55e2fa caf294a2
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1102,10 +1102,13 @@ public final class OomAdjuster {
        // this gives us a baseline and makes sure we don't get into an
        // infinite recursion. If we're re-evaluating due to cycles, use the previously computed
        // values.
        app.setCurRawAdj(!cycleReEval ? adj : Math.min(adj, app.getCurRawAdj()));
        app.setCurRawProcState(!cycleReEval
                ? procState
                : Math.min(procState, app.getCurRawProcState()));
        if (cycleReEval) {
            procState = Math.min(procState, app.getCurRawProcState());
            adj = Math.min(adj, app.getCurRawAdj());
            schedGroup = Math.max(schedGroup, app.getCurrentSchedulingGroup());
        }
        app.setCurRawAdj(adj);
        app.setCurRawProcState(procState);

        app.hasStartedServices = false;
        app.adjSeq = mAdjSeq;