summaryrefslogtreecommitdiff
path: root/libutils/Threads.cpp
diff options
context:
space:
mode:
authoralk3pInjection <webmaster@raspii.tech>2022-05-02 09:56:20 +0800
committeralk3pInjection <webmaster@raspii.tech>2022-05-02 09:56:20 +0800
commitd53ccefe1270307c78ac8f833c82abcaa262cc3a (patch)
tree6993ccbaec8f775df73b75d38c5b529889479417 /libutils/Threads.cpp
parentadbb1c10dd503804988344c1905df3c23973cf0d (diff)
parent8fc3f7296741ce589f7294113f8771837fb49bda (diff)
Merge tag 'LA.QSSI.12.0.r1-06800-qssi.0' into sugisawa-mr1
"LA.QSSI.12.0.r1-06800-qssi.0" Change-Id: I979d0f844cf44539ca87aade5929a4c84b4d31ff
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) {