AudioFlinger: Add latency information for RecordThread

Test: audioflinger dumpsys
Bug: 80493498
Change-Id: I52e481432b73f019c4eea06f1e11e41ad8a79b5c
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index ee4283e..27d3919 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -7333,6 +7333,13 @@
         (void)input->stream->dump(fd);
     }
 
+    const double latencyMs = - mTimestamp.getOutputServerLatencyMs(mSampleRate);
+    if (latencyMs != 0.) {
+        dprintf(fd, "  NormalRecord latency ms: %.2lf\n", latencyMs);
+    } else {
+        dprintf(fd, "  NormalRecord latency ms: unavail\n");
+    }
+
     dprintf(fd, "  Fast capture thread: %s\n", hasFastCapture() ? "yes" : "no");
     dprintf(fd, "  Fast track available: %s\n", mFastTrackAvail ? "yes" : "no");