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

Commit 460e10f5 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
Merged-In: I365ce3a63b2033325b659d60a3557db3c52e6575
Change-Id: I365ce3a63b2033325b659d60a3557db3c52e6575
parent bea10729
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -8649,6 +8649,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