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

Commit bfe173d4 authored by Santiago Seifert's avatar Santiago Seifert
Browse files

Release audio record when mirroring ends

This change replaces stop() with release (which includes a stop under
the hood). This is necessary to ensure resources are freed.

Bug: b/362507305
Test: atest CtsMediaRouterTestCases:android.media.router.cts.SystemMediaRoutingTest
Flag: com.android.media.flags.enable_mirroring_in_media_router_2
Change-Id: Ia0c60fb69144a368c1c279bc4989c2b2e0f6fe6a
parent ecfe4c12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -589,7 +589,7 @@ public abstract class MediaRoute2ProviderService extends Service {
        if (audioManager == null) {
            return;
        }
        audioRecord.stop();
        audioRecord.release();
        audioManager.unregisterAudioPolicy(audioPolicy);
    }