send setRecordingState false to CameraOne only if the recording is really stoping

This commit is contained in:
tibbi 2018-06-11 11:06:32 +02:00
parent a39e7ad233
commit ff85805636

View File

@ -849,8 +849,10 @@ class PreviewCameraOne : ViewGroup, SurfaceHolder.Callback, MyPreview {
} }
mRecorder = null mRecorder = null
mIsRecording = false if (mIsRecording) {
mActivity!!.setRecordingState(false) mActivity!!.setRecordingState(false)
}
mIsRecording = false
val file = File(mCurrVideoPath) val file = File(mCurrVideoPath)
if (file.exists() && file.length() == 0L) { if (file.exists() && file.length() == 0L) {