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

Commit ece6a22f authored by Tim Murray's avatar Tim Murray
Browse files

Add specific category for TOP_APP in ActivityManager.

Differentiate the top app from other foreground apps in
ActivityManager. This lets us place the top app in its own cpuset, where
it can have its own exclusive core.

Change-Id: I90f5c39272724db37f0da226785b03d08e2e04c4
parent fb22b147
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -367,6 +367,12 @@ public class Process {
     **/
    public static final int THREAD_GROUP_AUDIO_SYS = 4;

    /**
     * Thread group for top foreground app.
     * @hide
     **/
    public static final int THREAD_GROUP_TOP_APP = 5;

    public static final int SIGNAL_QUIT = 3;
    public static final int SIGNAL_KILL = 9;
    public static final int SIGNAL_USR1 = 10;
+1 −1
Original line number Diff line number Diff line
@@ -18624,7 +18624,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        if (app == TOP_APP) {
            // The last app on the list is the foreground app.
            adj = ProcessList.FOREGROUND_APP_ADJ;
            schedGroup = Process.THREAD_GROUP_DEFAULT;
            schedGroup = Process.THREAD_GROUP_TOP_APP;
            app.adjType = "top-activity";
            foregroundActivities = true;
            procState = PROCESS_STATE_CUR_TOP;