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

Commit 24a092b8 authored by Michael Wachenschwanz's avatar Michael Wachenschwanz
Browse files

Avoid double OomAdjust update for start service.

updateOomAdjPendingTargetsLocked should be called instead of
updateOomAdjLocked after performing an enqueueOomAdjTargetLocked

Test: atest MockingOomAdjusterTests
Fixes: 319545764
Change-Id: I9034bb09054d243a19fb40d276f8af0850346633
parent 342c33d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5416,7 +5416,7 @@ public final class ActiveServices {
        // Force an immediate oomAdjUpdate, so the client app could be in the correct process state
        // before doing any service related transactions
        mAm.enqueueOomAdjTargetLocked(app);
        mAm.updateOomAdjLocked(app, OOM_ADJ_REASON_START_SERVICE);
        mAm.updateOomAdjPendingTargetsLocked(OOM_ADJ_REASON_START_SERVICE);

        boolean created = false;
        try {