mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-16 19:30:40 +01:00
catch exceptions thrown by takePicture
This commit is contained in:
parent
bc2eb5e80d
commit
78949bb0a8
@ -283,6 +283,7 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
||||
mCamera!!.parameters = mParameters
|
||||
isWaitingForTakePictureCallback = true
|
||||
mIsPreviewShown = true
|
||||
try {
|
||||
mCamera!!.takePicture(null, null, takePictureCallback)
|
||||
|
||||
if (config.isSoundEnabled) {
|
||||
@ -293,6 +294,8 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
||||
mp?.start()
|
||||
}
|
||||
}
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
mCanTakePicture = false
|
||||
mIsFocusingBeforeCapture = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user