catch exceptions thrown at startPreview
This commit is contained in:
parent
0aa6493fdc
commit
4262e0c14b
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue