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

Commit c99dc13d authored by Tim Murray's avatar Tim Murray Committed by android-build-merger
Browse files

Prevent FIFO threads from creating more FIFO threads. am: 38ee337f am: 0ceda0c9

am: fcaf7176

Change-Id: I49b191890098e463af91039b4d0398cdbe37ed43
parents 5ad48994 fcaf7176
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;
        }