Logs use either %#x or 0x%x for flags, channel mask, format, device
Preferred is %#x but 0x%x is also permitted because it is widely used.
The benefit is that it reduces ambiguity and possible confusion,
without needing to read the source code for each log.
Test: builds OK and logs are less ambiguous
Change-Id: Ie2404e071d22278b8bba1e094ad336887844212c
diff --git a/media/libaudioclient/AudioTrack.cpp b/media/libaudioclient/AudioTrack.cpp
index c8fa618..6d829a0 100644
--- a/media/libaudioclient/AudioTrack.cpp
+++ b/media/libaudioclient/AudioTrack.cpp
@@ -2674,13 +2674,13 @@
String8 result;
result.append(" AudioTrack::dump\n");
- result.appendFormat(" status(%d), state(%d), session Id(%d), flags(%x)\n",
+ result.appendFormat(" status(%d), state(%d), session Id(%d), flags(%#x)\n",
mStatus, mState, mSessionId, mFlags);
result.appendFormat(" stream type(%d), left - right volume(%f, %f)\n",
(mStreamType == AUDIO_STREAM_DEFAULT) ?
audio_attributes_to_stream_type(&mAttributes) : mStreamType,
mVolume[AUDIO_INTERLEAVE_LEFT], mVolume[AUDIO_INTERLEAVE_RIGHT]);
- result.appendFormat(" format(%x), channel mask(%x), channel count(%u)\n",
+ result.appendFormat(" format(%#x), channel mask(%#x), channel count(%u)\n",
mFormat, mChannelMask, mChannelCount);
result.appendFormat(" sample rate(%u), original sample rate(%u), speed(%f)\n",
mSampleRate, mOriginalSampleRate, mPlaybackRate.mSpeed);