mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-01-27 21:49:19 +01:00
wrap startpreview in a try/catch block
This commit is contained in:
parent
0d5fd22921
commit
e77f211f07
@ -445,7 +445,10 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
||||
|
||||
mParameters!!.setPreviewSize(mPreviewSize!!.width, mPreviewSize!!.height)
|
||||
mCamera!!.parameters = mParameters
|
||||
mCamera!!.startPreview()
|
||||
try {
|
||||
mCamera!!.startPreview()
|
||||
} catch (ignored: RuntimeException) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user