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

Commit 21f819c7 authored by Andy Hung's avatar Andy Hung
Browse files

AudioRecord: interrupt after requesting exit

Test: atest AudioRecordTest
Bug: 208833342
Change-Id: Ie67d6a539869abf889dc8d88c67abb0ac80c3d04
parent 0384ae1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -205,8 +205,8 @@ void AudioRecord::stopAndJoinCallbacks() {
    // Otherwise the callback thread will never exit.
    stop();
    if (mAudioRecordThread != 0) {
        mProxy->interrupt();
        mAudioRecordThread->requestExit();  // see comment in AudioRecord.h
        mProxy->interrupt();
        mAudioRecordThread->requestExitAndWait();
        mAudioRecordThread.clear();
    }