mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
catch exceptions thrown at focusing an area
This commit is contained in:
@ -630,8 +630,6 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
mCaptureSession!!.stopRepeating()
|
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)
|
||||||
@ -652,6 +650,8 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
|
|||||||
mCaptureSession!!.capture(build(), captureCallbackHandler, mBackgroundHandler)
|
mCaptureSession!!.capture(build(), captureCallbackHandler, mBackgroundHandler)
|
||||||
set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_IDLE)
|
set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_IDLE)
|
||||||
}
|
}
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun convertAreaToMeteringRectangle(sensorRect: Rect, focusArea: FocusArea): MeteringRectangle {
|
private fun convertAreaToMeteringRectangle(sensorRect: Rect, focusArea: FocusArea): MeteringRectangle {
|
||||||
|
Reference in New Issue
Block a user