diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-23 10:12:14 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-23 10:12:14 +0000 |
commit | 38191dc6b7f795cb9a96e418f47ee0de0b0a8d13 (patch) | |
tree | 0ebec0729083e0de6d9544751372bdc238b8b717 /libutils/Threads.cpp | |
parent | dfab2cef81678d45d673d5e2e8c7ac4af8064a83 (diff) | |
parent | cb706d277b521508bdd037b78379c1c6a635f6e6 (diff) |
Snap for 8343869 from cb706d277b521508bdd037b78379c1c6a635f6e6 to s-keystone-qcom-release
Change-Id: I08154d17257bd4f2a43fb55017a7f6b06d2cb2aa
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) { |