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

Commit e8c6c538 authored by Andy Hung's avatar Andy Hung
Browse files

AudioFlinger: Ensure RecordTrack dtor called outside lock (pt 2)

Update RecordThread activeTrack handling.

Flag: EXEMPT bugfix
Test: atest AudioRecordTest
Bug: 329604636
Change-Id: I365ce3a63b2033325b659d60a3557db3c52e6575
parent 75c03769
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -8670,6 +8670,9 @@ reacquire_wakelock:

        // loop over each active track
        for (size_t i = 0; i < size; i++) {
            if (activeTrack) {  // ensure track release is outside lock.
                oldActiveTracks.emplace_back(std::move(activeTrack));
            }
            activeTrack = activeTracks[i];

            // skip fast tracks, as those are handled directly by FastCapture