catch exceptions thrown at focusing an area
This commit is contained in:
parent
a40e1611db
commit
42971cc80d
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue