catch exceptions thrown at startPreview

This commit is contained in:
tibbi 2017-09-23 14:34:22 +02:00
parent 0aa6493fdc
commit 4262e0c14b
1 changed files with 4 additions and 1 deletions

View File

@ -336,7 +336,10 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
private fun resumePreview() { private fun resumePreview() {
mIsPreviewShown = false mIsPreviewShown = false
mActivity.toggleBottomButtons(false) mActivity.toggleBottomButtons(false)
mCamera?.startPreview() try {
mCamera?.startPreview()
} catch (e: Exception) {
}
mCanTakePicture = true mCanTakePicture = true
focusArea(false, false) focusArea(false, false)
} }