summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/foundation
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-07-02 10:02:17 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-07-02 10:02:17 -0700
commit2cfd8198cc4e1dcdcae52ae8a0c86b871c87a27e (patch)
treea91178009f7fe7f594facd47a37eac213f84e297 /media/libstagefright/foundation
parent5460d126f024a8d6597ce4eb127b51c101724960 (diff)
parent4f104d99d8657fd3fef675eb2a3e84ba9f5870e4 (diff)
downloadframeworks_base-2cfd8198cc4e1dcdcae52ae8a0c86b871c87a27e.zip
frameworks_base-2cfd8198cc4e1dcdcae52ae8a0c86b871c87a27e.tar.gz
frameworks_base-2cfd8198cc4e1dcdcae52ae8a0c86b871c87a27e.tar.bz2
Merge "Add an option to ALooper::start that allows it to call back into java or not." into gingerbread
Diffstat (limited to 'media/libstagefright/foundation')
-rw-r--r--media/libstagefright/foundation/ALooper.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/media/libstagefright/foundation/ALooper.cpp b/media/libstagefright/foundation/ALooper.cpp
index 831fa2a..cd4f349 100644
--- a/media/libstagefright/foundation/ALooper.cpp
+++ b/media/libstagefright/foundation/ALooper.cpp
@@ -31,8 +31,9 @@ namespace android {
ALooperRoster gLooperRoster;
struct ALooper::LooperThread : public Thread {
- LooperThread(ALooper *looper)
- : mLooper(looper) {
+ LooperThread(ALooper *looper, bool canCallJava)
+ : Thread(canCallJava),
+ mLooper(looper) {
}
virtual bool threadLoop() {
@@ -72,7 +73,7 @@ void ALooper::unregisterHandler(handler_id handlerID) {
gLooperRoster.unregisterHandler(handlerID);
}
-status_t ALooper::start(bool runOnCallingThread) {
+status_t ALooper::start(bool runOnCallingThread, bool canCallJava) {
if (runOnCallingThread) {
{
Mutex::Autolock autoLock(mLock);
@@ -96,7 +97,7 @@ status_t ALooper::start(bool runOnCallingThread) {
return INVALID_OPERATION;
}
- mThread = new LooperThread(this);
+ mThread = new LooperThread(this, canCallJava);
status_t err = mThread->run("ALooper");
if (err != OK) {