diff options
author | alk3pInjection <webmaster@raspii.tech> | 2022-05-02 09:56:20 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-05-02 09:56:20 +0800 |
commit | d53ccefe1270307c78ac8f833c82abcaa262cc3a (patch) | |
tree | 6993ccbaec8f775df73b75d38c5b529889479417 /libutils/Threads.cpp | |
parent | adbb1c10dd503804988344c1905df3c23973cf0d (diff) | |
parent | 8fc3f7296741ce589f7294113f8771837fb49bda (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.cpp | 5 |
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) { |