Keep up with API change

androidSetThreadPriority() is going back to only accepting
two arguments, so we switch to the three argument version of
the method.

Test: TreeHugger
Bug: 165009705
Change-Id: If996fdfa19076f72e63a9ffb160715453965c482
This commit is contained in:
Greg Kaiser
2020-08-24 10:26:46 -07:00
parent 96c7e1a751
commit 715f19d1eb

View File

@@ -613,7 +613,7 @@ void android_os_Process_setThreadPriority(JNIEnv* env, jobject clazz,
}
// Do not change sched policy cgroup after boot complete.
rc = androidSetThreadPriority(pid, pri, !boot_completed);
rc = androidSetThreadPriorityAndPolicy(pid, pri, !boot_completed);
if (rc != 0) {
if (rc == INVALID_OPERATION) {
signalExceptionForPriorityError(env, errno, pid);