add camera state check to video recording toggle too

This commit is contained in:
tibbi 2018-06-08 13:59:28 +02:00
parent ac3a09dd85
commit d57eb9ef98
1 changed files with 4 additions and 0 deletions

View File

@ -818,6 +818,10 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
return return
} }
if (mCameraState != STATE_PREVIEW && mCameraState != STATE_RECORDING) {
return
}
if (mIsRecording) { if (mIsRecording) {
stopRecording() stopRecording()
} else { } else {