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