summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/foundation
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-08-27 15:21:07 -0700
committerAndreas Huber <andih@google.com>2010-08-27 15:21:07 -0700
commita814c1fdc2acf0ed2ee3b175110f6039be7c4873 (patch)
treebdeb2c9b722b0307041d4906961f235a3cfabcbe /media/libstagefright/foundation
parentf8860bf3592debe89916aa49b7994a7deeee0df1 (diff)
downloadframeworks_av-a814c1fdc2acf0ed2ee3b175110f6039be7c4873.zip
frameworks_av-a814c1fdc2acf0ed2ee3b175110f6039be7c4873.tar.gz
frameworks_av-a814c1fdc2acf0ed2ee3b175110f6039be7c4873.tar.bz2
ALoopers can now be named (useful to distinguish threads).
Change-Id: Ieabaddb2e3a9e3a7a5bc36e55cd0721b60dbd50e
Diffstat (limited to 'media/libstagefright/foundation')
-rw-r--r--media/libstagefright/foundation/ALooper.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/foundation/ALooper.cpp b/media/libstagefright/foundation/ALooper.cpp
index 77afb01..b7087f8 100644
--- a/media/libstagefright/foundation/ALooper.cpp
+++ b/media/libstagefright/foundation/ALooper.cpp
@@ -65,6 +65,10 @@ ALooper::~ALooper() {
stop();
}
+void ALooper::setName(const char *name) {
+ mName = name;
+}
+
ALooper::handler_id ALooper::registerHandler(const sp<AHandler> &handler) {
return gLooperRoster.registerHandler(this, handler);
}
@@ -100,7 +104,8 @@ status_t ALooper::start(
mThread = new LooperThread(this, canCallJava);
- status_t err = mThread->run("ALooper", priority);
+ status_t err = mThread->run(
+ mName.empty() ? "ALooper" : mName.c_str(), priority);
if (err != OK) {
mThread.clear();
}