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

Commit a6a59c4a authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libutils: do not follow process's group" am: 83347fdb am: 6ef37c82

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1920521

Change-Id: Ic0d205fcf676accdfcba19d208bfce3dff80a664
parents 86bf65e5 6ef37c82
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -317,10 +317,7 @@ int androidSetThreadPriority(pid_t tid, int pri)
    if (pri >= ANDROID_PRIORITY_BACKGROUND) {
        rc = SetTaskProfiles(tid, {"SCHED_SP_SYSTEM"}, true) ? 0 : -1;
    } else if (curr_pri >= ANDROID_PRIORITY_BACKGROUND) {
        SchedPolicy policy = SP_FOREGROUND;
        // Change to the sched policy group of the process.
        get_sched_policy(getpid(), &policy);
        rc = SetTaskProfiles(tid, {get_sched_policy_profile_name(policy)}, true) ? 0 : -1;
        rc = SetTaskProfiles(tid, {"SCHED_SP_FOREGROUND"}, true) ? 0 : -1;
    }

    if (rc) {