catch and show exceptions thrown at starting recording
This commit is contained in:
parent
7afa969505
commit
335529ccbb
|
@ -33,6 +33,7 @@ import com.simplemobiletools.camera.helpers.*
|
|||
import com.simplemobiletools.camera.interfaces.MyPreview
|
||||
import com.simplemobiletools.camera.models.FocusArea
|
||||
import com.simplemobiletools.camera.models.MySize
|
||||
import com.simplemobiletools.commons.extensions.showErrorToast
|
||||
import com.simplemobiletools.commons.helpers.isJellyBean1Plus
|
||||
import java.io.File
|
||||
import java.lang.IllegalArgumentException
|
||||
|
@ -851,7 +852,12 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
mCameraDevice!!.createCaptureSession(surfaces, captureCallback, mBackgroundHandler)
|
||||
} catch (e: Exception) {
|
||||
mActivity.showErrorToast(e)
|
||||
mCameraState = STATE_PREVIEW
|
||||
}
|
||||
}
|
||||
|
||||
private fun stopRecording() {
|
||||
|
|
Loading…
Reference in New Issue