AudioFlinger: Change timeout for FdToString.

Current implementation waits for 200 msec,
which leads to delay during boot time and other cases
where we close outputs and inputs.
Reduce this time to 2 msecs.

Bug: 171365312
Bug: 172293721
CRs-Fixed: 2776028
Test: See bug for specifics on device and test.
Test: adb shell dumpsys media.audio_flinger
Change-Id: Ia08e8431d36e168bb4a2301cfbd9545f354fa811
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 1935cde..5f0b575 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -3141,7 +3141,8 @@
 // dumpToThreadLog_l() must be called with AudioFlinger::mLock held
 void AudioFlinger::dumpToThreadLog_l(const sp<ThreadBase> &thread)
 {
-    audio_utils::FdToString fdToString;
+    constexpr int THREAD_DUMP_TIMEOUT_MS = 2;
+    audio_utils::FdToString fdToString("- ", THREAD_DUMP_TIMEOUT_MS);
     const int fd = fdToString.fd();
     if (fd >= 0) {
         thread->dump(fd, {} /* args */);