lets handle an exception better

This commit is contained in:
tibbi 2019-04-07 23:35:47 +02:00
parent 2f9da53c5b
commit ec9c121333
1 changed files with 2 additions and 0 deletions

View File

@ -822,6 +822,8 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
mPreviewRequestBuilder!!.addTarget(recorderSurface)
} catch (e: Exception) {
mActivity.showErrorToast(e)
mCameraState = STATE_PREVIEW
return
}
val captureCallback = object : CameraCaptureSession.StateCallback() {