do not even draw the Focus circle if the current camera doesnt support focus

This commit is contained in:
tibbi 2018-06-04 23:12:53 +02:00
parent b0ba502795
commit 5704e58164
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
mDownEventAtX = event.x
mDownEventAtY = event.y
} else if (event.action == MotionEvent.ACTION_UP) {
if (System.currentTimeMillis() - mDownEventAtMS < CLICK_MS &&
if (mIsFocusSupported && System.currentTimeMillis() - mDownEventAtMS < CLICK_MS &&
Math.abs(event.x - mDownEventAtX) < CLICK_DIST &&
Math.abs(event.y - mDownEventAtY) < CLICK_DIST) {
focusArea(event.x, event.y)