From 39c92278441ae3361134c33dd4f1f375fbb8b140 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 10 Jun 2018 22:14:16 +0200 Subject: [PATCH] stop recording at changing the resolution if needed --- .../com/simplemobiletools/camera/views/PreviewCameraTwo.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt b/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt index 4c21dab3..bcdf3075 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt @@ -827,6 +827,9 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie val videoResolutions = configMap.getOutputSizes(MediaRecorder::class.java).map { MySize(it.width, it.height) } as ArrayList ChangeResolutionDialog(mActivity, mUseFrontCamera, photoResolutions, videoResolutions) { if (oldResolution != getCurrentResolution()) { + if (mIsRecording) { + stopRecording() + } closeCamera() openCamera(mTextureView.width, mTextureView.height) }