summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tim Murray <timmurray@google.com> 2016-08-18 20:25:36 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-08-18 20:25:38 +0000
commitbb4e37c602fae938e37d244cdf2d02fc8d869bab (patch)
tree79c1b04446cc79b8001a3cee92833b9906b697b3
parent6642c963d952ccdf04fb6bf24973284da2b4a393 (diff)
parent38ee337f45953cb3ecfc4ab170c639afe01606d1 (diff)
Merge "Prevent FIFO threads from creating more FIFO threads." into nyc-mr1-dev
-rw-r--r--services/core/java/com/android/server/os/SchedulingPolicyService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/os/SchedulingPolicyService.java b/services/core/java/com/android/server/os/SchedulingPolicyService.java
index f98012b39a86..62c9f4c116c2 100644
--- a/services/core/java/com/android/server/os/SchedulingPolicyService.java
+++ b/services/core/java/com/android/server/os/SchedulingPolicyService.java
@@ -55,7 +55,8 @@ public class SchedulingPolicyService extends ISchedulingPolicyService.Stub {
Process.setThreadGroup(tid, Binder.getCallingPid() == pid ?
Process.THREAD_GROUP_AUDIO_SYS : Process.THREAD_GROUP_AUDIO_APP);
// must be in this order or it fails the schedulability constraint
- Process.setThreadScheduler(tid, Process.SCHED_FIFO, prio);
+ Process.setThreadScheduler(tid, Process.SCHED_FIFO | Process.SCHED_RESET_ON_FORK,
+ prio);
} catch (RuntimeException e) {
return PackageManager.PERMISSION_DENIED;
}