mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-14 18:30:36 +01:00
catching an exceptions at focusing some area
This commit is contained in:
parent
b07afb2906
commit
619366807b
@ -628,7 +628,11 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
|
||||
}
|
||||
}
|
||||
|
||||
mCaptureSession!!.stopRepeating()
|
||||
try {
|
||||
mCaptureSession!!.stopRepeating()
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
|
||||
mPreviewRequestBuilder!!.apply {
|
||||
set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_IDLE)
|
||||
mCaptureSession!!.capture(build(), mCaptureCallback, mBackgroundHandler)
|
||||
@ -775,7 +779,7 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
|
||||
val uri = if (context.isPathOnSD(mLastVideoPath)) {
|
||||
val parentDocumentFile = context.getDocumentFile(mLastVideoPath.getParentPath())
|
||||
val documentFile = parentDocumentFile?.createFile("video/mp4", mLastVideoPath.getFilenameFromPath())
|
||||
?: mActivity.getDocumentFile(mLastVideoPath)
|
||||
?: mActivity.getDocumentFile(mLastVideoPath)
|
||||
documentFile!!.uri
|
||||
} else {
|
||||
Uri.fromFile(File(mLastVideoPath))
|
||||
|
Loading…
x
Reference in New Issue
Block a user