Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb4e37c6 authored by Tim Murray's avatar Tim Murray Committed by Android (Google) Code Review
Browse files

Merge "Prevent FIFO threads from creating more FIFO threads." into nyc-mr1-dev

parents 6642c963 38ee337f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
        }