catch exceptions thrown at focusing an area

This commit is contained in:
tibbi 2020-09-19 18:57:17 +02:00
parent a40e1611db
commit 42971cc80d
1 changed files with 18 additions and 18 deletions

View File

@ -630,8 +630,6 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
try {
mCaptureSession!!.stopRepeating()
} catch (ignored: Exception) {
}
mPreviewRequestBuilder!!.apply {
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)
set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_IDLE)
}
} catch (ignored: Exception) {
}
}
private fun convertAreaToMeteringRectangle(sensorRect: Rect, focusArea: FocusArea): MeteringRectangle {