Add a name to the previously-unnamed thread created by SoundPoolThread.
SoundPool itself also creates a thread, which was called "SoundPoolThread", unrelated to the SoundPoolThread class. The SoundPoolThread class then created an unnamed thread, which showed up as "android:unnamed_thread". That's confusing, so this change renames the SoundPool thread to "SoundPool" and then names the SoundPoolThread thread as "SoundPoolThread". Say that ten times fast :)
Change-Id: I67b7e644a30c94b6eda44bf970764a52a1c2958b
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp
index 2012b3d..fef880b 100644
--- a/media/jni/soundpool/SoundPool.cpp
+++ b/media/jni/soundpool/SoundPool.cpp
@@ -144,7 +144,7 @@
bool SoundPool::startThreads()
{
- createThreadEtc(beginThread, this, "SoundPoolThread");
+ createThreadEtc(beginThread, this, "SoundPool");
if (mDecodeThread == NULL)
mDecodeThread = new SoundPoolThread(this);
return mDecodeThread != NULL;
@@ -827,4 +827,3 @@
}
} // end namespace android
-
diff --git a/media/jni/soundpool/SoundPoolThread.cpp b/media/jni/soundpool/SoundPoolThread.cpp
index e32c794..275c519 100644
--- a/media/jni/soundpool/SoundPoolThread.cpp
+++ b/media/jni/soundpool/SoundPoolThread.cpp
@@ -62,7 +62,7 @@
mSoundPool(soundPool)
{
mMsgQueue.setCapacity(maxMessages);
- if (createThread(beginThread, this)) {
+ if (createThreadEtc(beginThread, this, "SoundPoolThread")) {
mRunning = true;
}
}