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

Commit 72be3d37 authored by Kenichi Ishibashi's avatar Kenichi Ishibashi
Browse files

Use isolated uid to set oom_score_adj

When a service is isolated, ProcessRecord.uid is different from
ProcessRecord.info.uid. We should use the former to set oom_score_adj.
Otherwize, lmkd fails to set memory.soft_limit_in_bytes for isolated
processes.

Bug: 64656396
Test: tested on gobo

Change-Id: I81fb1cf64f4680355365ad715b7c0ecd7ac560ed
parent b49fa218
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21937,7 +21937,7 @@ public class ActivityManagerService extends IActivityManager.Stub
        int changes = 0;
        if (app.curAdj != app.setAdj) {
            ProcessList.setOomAdj(app.pid, app.info.uid, app.curAdj);
            ProcessList.setOomAdj(app.pid, app.uid, app.curAdj);
            if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Slog.v(TAG_OOM_ADJ,
                    "Set " + app.pid + " " + app.processName + " adj " + app.curAdj + ": "
                    + app.adjType);