mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-04-11 14:11:21 +02:00
catch all exceptions thrown during focus or zoom
This commit is contained in:
parent
d7c4c76640
commit
e33d550ba6
@ -115,12 +115,18 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
|||||||
mCaptureSession != null &&
|
mCaptureSession != null &&
|
||||||
Math.abs(event.x - mDownEventAtX) < CLICK_DIST &&
|
Math.abs(event.x - mDownEventAtX) < CLICK_DIST &&
|
||||||
Math.abs(event.y - mDownEventAtY) < CLICK_DIST) {
|
Math.abs(event.y - mDownEventAtY) < CLICK_DIST) {
|
||||||
|
try {
|
||||||
focusArea(event.x, event.y)
|
focusArea(event.x, event.y)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIsZoomSupported && event.pointerCount > 1 && mCaptureSession != null) {
|
if (mIsZoomSupported && event.pointerCount > 1 && mCaptureSession != null) {
|
||||||
|
try {
|
||||||
handleZoom(event)
|
handleZoom(event)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user