diff options
author | Andreas Huber <andih@google.com> | 2010-09-09 16:12:31 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-09-09 16:14:02 -0700 |
commit | 4b3d32bb1b67d92c4297f3513eb2f1d319af5131 (patch) | |
tree | 6ad3f297b2c688d9919bbd8b333310c55ae1748c | |
parent | 47fa8e800ca3ce56733f7b3a54bace86ad37a1f4 (diff) | |
download | frameworks_base-4b3d32bb1b67d92c4297f3513eb2f1d319af5131.zip frameworks_base-4b3d32bb1b67d92c4297f3513eb2f1d319af5131.tar.gz frameworks_base-4b3d32bb1b67d92c4297f3513eb2f1d319af5131.tar.bz2 |
TimedEventQueue now explicitly sets its scheduling policy to foreground as it should.
Change-Id: I630c9fb51686d87a4075f01a6d7f6f9139ddcb4b
related-to-bug: 2944452
-rw-r--r-- | media/libstagefright/TimedEventQueue.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp index 0dacb53..5a453e9 100644 --- a/media/libstagefright/TimedEventQueue.cpp +++ b/media/libstagefright/TimedEventQueue.cpp @@ -26,6 +26,8 @@ #include "include/TimedEventQueue.h" +#include <cutils/sched_policy.h> + #include <sys/prctl.h> #include <sys/time.h> #include <sys/resource.h> @@ -209,6 +211,8 @@ void *TimedEventQueue::ThreadWrapper(void *me) { #endif setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_FOREGROUND); + set_sched_policy(androidGetTid(), SP_FOREGROUND); + static_cast<TimedEventQueue *>(me)->threadEntry(); #ifdef ANDROID_SIMULATOR |