summaryrefslogtreecommitdiff
path: root/libutils/Threads.cpp
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2022-04-04 07:12:28 -0700
committerLinux Build Service Account <lnxbuild@localhost>2022-04-04 07:12:28 -0700
commit8fc3f7296741ce589f7294113f8771837fb49bda (patch)
tree0ebec0729083e0de6d9544751372bdc238b8b717 /libutils/Threads.cpp
parent81c361ea22a1c0ab7cc5e62f3fa36751e1240178 (diff)
parent38191dc6b7f795cb9a96e418f47ee0de0b0a8d13 (diff)
Merge 38191dc6b7f795cb9a96e418f47ee0de0b0a8d13 on remote branch
Change-Id: I56506cf11e6e2b38712e1e7dc9e7716f969000d5
Diffstat (limited to 'libutils/Threads.cpp')
-rw-r--r--libutils/Threads.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp
index 6e293c741..3bf577961 100644
--- a/libutils/Threads.cpp
+++ b/libutils/Threads.cpp
@@ -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) {