From 10cbbd8f1f2899b9dace6436401582bfe36d1cc4 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Thu, 10 May 2012 15:50:19 -0700 Subject: [PATCH] Workaround for add_tid_to_cgroup failed to write Bug: 6467109 Change-Id: I6dff8e608d83c7a7c453c25c94ad100f113769b9 --- libs/utils/Threads.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp index bc1c285f3..a25a81fbe 100644 --- a/libs/utils/Threads.cpp +++ b/libs/utils/Threads.cpp @@ -101,8 +101,10 @@ struct thread_data_t { if (gDoSchedulingGroup) { if (prio >= ANDROID_PRIORITY_BACKGROUND) { set_sched_policy(androidGetTid(), SP_BACKGROUND); - } else { + } else if (prio > ANDROID_PRIORITY_AUDIO) { set_sched_policy(androidGetTid(), SP_FOREGROUND); + } else { + // defaults to that of parent, or as set by requestPriority() } }