Prevent FIFO threads from creating more FIFO threads. am: 38ee337f45

am: 0ceda0c956

Change-Id: I71d40b4e0a8716cf1c1af5339de31d7edf744e43
This commit is contained in:
Tim Murray
2016-08-18 20:35:12 +00:00
committed by android-build-merger

View File

@@ -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;
}