diff options
author | Haamed Gheibi <haamed@google.com> | 2022-02-17 16:39:40 -0800 |
---|---|---|
committer | Haamed Gheibi <haamed@google.com> | 2022-02-17 16:39:40 -0800 |
commit | cb706d277b521508bdd037b78379c1c6a635f6e6 (patch) | |
tree | 0ebec0729083e0de6d9544751372bdc238b8b717 /libutils/Threads.cpp | |
parent | 7a5fb7fde5c20fd44eb89f9d8ceba843670eaad4 (diff) | |
parent | dcd1f1aae4eee33c8556018558c82f69e2e0a5f2 (diff) |
Merge SP2A.220305.013
Bug: 220074017
Change-Id: I682501b298008e130a29cab70f947f12c140e314
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) { |