Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05fa8856 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "AudioFlinger: Preserve recent RecordThread history for dumpsys"

parents bf9dba96 0264e7d6
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2549,6 +2549,16 @@ status_t AudioFlinger::closeInput_nonvirtual(audio_io_handle_t input)
        if (recordThread != 0) {
            ALOGV("closeInput() %d", input);

            {
                // Dump thread before deleting for history
                audio_utils::FdToString fdToString;
                const int fd = fdToString.fd();
                if (fd >= 0) {
                    recordThread->dump(fd, {} /* args */);
                    mThreadLog.logs(-1 /* time */, fdToString.getStringAndClose());
                }
            }

            // If we still have effect chains, it means that a client still holds a handle
            // on at least one effect. We must either move the chain to an existing thread with the
            // same session ID or put it aside in case a new record thread is opened for a