Prevent FIFO threads from creating more FIFO threads.
am: 38ee337f45
Change-Id: Iecd7619faae5195934335afc0048cc5ddb6b9ab7
This commit is contained in:
@@ -55,7 +55,8 @@ public class SchedulingPolicyService extends ISchedulingPolicyService.Stub {
|
|||||||
Process.setThreadGroup(tid, Binder.getCallingPid() == pid ?
|
Process.setThreadGroup(tid, Binder.getCallingPid() == pid ?
|
||||||
Process.THREAD_GROUP_AUDIO_SYS : Process.THREAD_GROUP_AUDIO_APP);
|
Process.THREAD_GROUP_AUDIO_SYS : Process.THREAD_GROUP_AUDIO_APP);
|
||||||
// must be in this order or it fails the schedulability constraint
|
// 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) {
|
} catch (RuntimeException e) {
|
||||||
return PackageManager.PERMISSION_DENIED;
|
return PackageManager.PERMISSION_DENIED;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user