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

Commit 01d07f4d authored by Ram Mohan's avatar Ram Mohan
Browse files

Remove multiple calls to removeAudioDeviceCallback()

A call to stop() is already calling removeAudioDeviceCallback().
Further calls to the same is not needed

Bug: 267788926
Test: atest audiosystem_tests audiorouting_tests

Change-Id: Ib9fa1a786ad31008f44a80e3ae61e13eb01d854c
parent 72d6d8ec
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ TEST(AudioTrackTest, TestPerformanceMode) {
            }
        }
        ap->stop();
        ap->getAudioTrackHandle()->removeAudioDeviceCallback(cb);
    }
}

+0 −6
Original line number Diff line number Diff line
@@ -49,17 +49,11 @@ class AudioSystemTest : public ::testing::Test {
    void TearDown() override {
        if (mPlayback) {
            mPlayback->stop();
            if (auto handle = mPlayback->getAudioTrackHandle(); handle) {
                handle->removeAudioDeviceCallback(mCbPlayback);
            }
            mCbPlayback.clear();
            mPlayback.clear();
        }
        if (mCapture) {
            mCapture->stop();
            if (auto handle = mCapture->getAudioRecordHandle(); handle) {
                handle->removeAudioDeviceCallback(mCbRecord);
            }
            mCbRecord.clear();
            mCapture.clear();
        }