From 58caeb05e5fe7e9ae62b4a88a299e2619758f18b Mon Sep 17 00:00:00 2001 From: Yuriy Budiyev Date: Mon, 8 Oct 2018 14:58:47 +0300 Subject: [PATCH] Dev --- src/main/java/com/budiyev/android/codescanner/CodeScanner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/budiyev/android/codescanner/CodeScanner.java b/src/main/java/com/budiyev/android/codescanner/CodeScanner.java index 65bb45e..100cfa5 100644 --- a/src/main/java/com/budiyev/android/codescanner/CodeScanner.java +++ b/src/main/java/com/budiyev/android/codescanner/CodeScanner.java @@ -648,6 +648,7 @@ private void setAutoFocusEnabledInternal(final boolean autoFocusEnabled) { if (decoderWrapper != null) { final Camera camera = decoderWrapper.getCamera(); camera.cancelAutoFocus(); + mTouchFocusing = false; final Parameters parameters = camera.getParameters(); final AutoFocusMode autoFocusMode = mAutoFocusMode; if (autoFocusEnabled) { @@ -663,7 +664,6 @@ private void setAutoFocusEnabledInternal(final boolean autoFocusEnabled) { } camera.setParameters(parameters); if (autoFocusEnabled) { - mTouchFocusing = false; mSafeAutoFocusAttemptsCount = 0; mSafeAutoFocusing = false; if (autoFocusMode == AutoFocusMode.SAFE) {