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

Commit 1ca48732 authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Release virtual display before stopping projection

As described in b/140399127, if the media projection is stopped first,
the virtual display will not get released. So we need to release the
display first and stop projection after that.

Bug: 174800535
Bug: 179931688
Test: 'Recording Display' no longer appears in dumpsys after ending a screen recording
Change-Id: I8775068677b3ea5d0836a64579b0539e2e1aafae
parent 2d29d2d8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -187,12 +187,12 @@ public class ScreenMediaRecorder {
     */
    void end() {
        mMediaRecorder.stop();
        mMediaProjection.stop();
        mMediaRecorder.release();
        mMediaRecorder = null;
        mMediaProjection = null;
        mInputSurface.release();
        mVirtualDisplay.release();
        mMediaProjection.stop();
        mMediaRecorder = null;
        mMediaProjection = null;
        stopInternalAudioRecording();

        Log.d(TAG, "end recording");