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

Commit 485f971e authored by San Mehat's avatar San Mehat Committed by The Android Open Source Project
Browse files

am 7d619f18: framework: process: Set the control group of a thread to the...

am 7d619f18: framework: process: Set the control group of a thread to the background group if the priority is logically-lower than ANDROID_PRIORITY_BACKGROUND

Merge commit '7d619f18'

* commit '7d619f18':
  framework: process: Set the control group of a thread to the background group
parents a84b6faf 7d619f18
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -269,9 +269,9 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin
void android_os_Process_setThreadPriority(JNIEnv* env, jobject clazz,
                                              jint pid, jint pri)
{
    if (pri == ANDROID_PRIORITY_BACKGROUND) {
    if (pri >= ANDROID_PRIORITY_BACKGROUND) {
        add_pid_to_cgroup(pid, ANDROID_TGROUP_BG_NONINTERACT);
    } else if (getpriority(PRIO_PROCESS, pid) == ANDROID_PRIORITY_BACKGROUND) {
    } else if (getpriority(PRIO_PROCESS, pid) >= ANDROID_PRIORITY_BACKGROUND) {
        add_pid_to_cgroup(pid, ANDROID_TGROUP_DEFAULT);
    }