summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tim Murray <timmurray@google.com> 2016-08-18 20:30:58 +0000
committer android-build-merger <android-build-merger@google.com> 2016-08-18 20:30:58 +0000
commit0ceda0c956dbfa8c307716a13e723a95b87ec6f3 (patch)
tree47bfd8e628ba64172df1f86017d30fddf612daa3
parentdecad179f6adcb5a873dacb1c5e3b2becee159ca (diff)
parent38ee337f45953cb3ecfc4ab170c639afe01606d1 (diff)
Prevent FIFO threads from creating more FIFO threads.
am: 38ee337f45 Change-Id: Iecd7619faae5195934335afc0048cc5ddb6b9ab7
-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;
}