catch all exceptions thrown during focus or zoom

This commit is contained in:
tibbi 2018-06-08 14:17:38 +02:00
parent d7c4c76640
commit e33d550ba6
1 changed files with 8 additions and 2 deletions

View File

@ -115,12 +115,18 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
mCaptureSession != null &&
Math.abs(event.x - mDownEventAtX) < CLICK_DIST &&
Math.abs(event.y - mDownEventAtY) < CLICK_DIST) {
focusArea(event.x, event.y)
try {
focusArea(event.x, event.y)
} catch (e: Exception) {
}
}
}
if (mIsZoomSupported && event.pointerCount > 1 && mCaptureSession != null) {
handleZoom(event)
try {
handleZoom(event)
} catch (e: Exception) {
}
}
true
}