Prevent FIFO threads from creating more FIFO threads. am: 38ee337f45
am: 0ceda0c956
Change-Id: I71d40b4e0a8716cf1c1af5339de31d7edf744e43
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