From d57eb9ef987b62ec6200b320051cbe17c46f41ac Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 8 Jun 2018 13:59:28 +0200 Subject: [PATCH] add camera state check to video recording toggle too --- .../com/simplemobiletools/camera/views/PreviewCameraTwo.kt | 4 ++++ 1 file changed, 4 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 a61972eb..0aae35d0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt @@ -818,6 +818,10 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie return } + if (mCameraState != STATE_PREVIEW && mCameraState != STATE_RECORDING) { + return + } + if (mIsRecording) { stopRecording() } else {