Shorten thread names
prctl(PR_SET_NAME) limits to 15 characters. Before we had names like
"Binder Thread #" and the counter was cut off :-( Also remove redundant
"thread" at end of name; it's always a thread.
Change-Id: I1f99c2730ba0787ed9b59c15914356cddf698e2f
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 462c2fa..b7ddbb5 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1464,7 +1464,7 @@
mMasterVolume(audioFlinger->masterVolumeSW_l()),
mLastWriteTime(0), mNumWrites(0), mNumDelayedWrites(0), mInWrite(false)
{
- snprintf(mName, kNameLength, "AudioOut_%d", id);
+ snprintf(mName, kNameLength, "AudioOut_%X", id);
readOutputParameters();
@@ -4791,7 +4791,7 @@
// mBytesRead is only meaningful while active, and so is cleared in start()
// (but might be better to also clear here for dump?)
{
- snprintf(mName, kNameLength, "AudioIn_%d", id);
+ snprintf(mName, kNameLength, "AudioIn_%X", id);
readInputParameters();
}