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

Commit 13114538 authored by Jing Ji's avatar Jing Ji
Browse files

Skip updating the process group of system_server

Previously launching/dismissing any activities within system_server
would update the process group of system_server, those customized
cpuset settings of some threads within system_server would get messed
up because of it.

Now as those remaining activities within system_server are fairly
simple, we could skip updating the process group of system_server,
keep using the existing default one.

Bug: 172245618
Test: Manual - launch/dismiss activities in system_server & cat cpuset
Change-Id: Ia4d58cc4b8fad1c4ff1a52a05c58f9e62b71df30
parent 3d46ae52
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -394,6 +394,10 @@ public class OomAdjuster {
        mProcessGroupHandler = new Handler(adjusterThread.getLooper(), msg -> {
            final int pid = msg.arg1;
            final int group = msg.arg2;
            if (pid == ActivityManagerService.MY_PID) {
                // Skip setting the process group for system_server, keep it as default.
                return true;
            }
            if (Trace.isTagEnabled(Trace.TRACE_TAG_ACTIVITY_MANAGER)) {
                Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "setProcessGroup "
                        + msg.obj + " to " + group);