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

Commit 7583ceb3 authored by Matthieu Baglin's avatar Matthieu Baglin Committed by Yorke Lee
Browse files

Set the camera to null when preview surface is destroyed



When the video call is disconnected, the camera would still
be opened without this fix.

Signed-off-by: default avatarMatthieu Baglin <matthieu.baglin@intel.com>
Change-Id: Ie69fb87412c53e4c6072d998d3e3b067c4c8ba0f
parent 8cdac35f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -256,6 +256,8 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
            mVideoCall.setDisplaySurface(null);
        } else if (surface == VideoCallFragment.SURFACE_PREVIEW) {
            mVideoCall.setPreviewSurface(null);
            // Also disable camera as preview is closed
            mVideoCall.setCamera(null);
        }
    }