From cc4343209f9e743a999dd7998d92f13f9424363c Mon Sep 17 00:00:00 2001 From: PaoloMessina Date: Tue, 23 Dec 2014 15:27:24 +0100 Subject: [PATCH] Bug fix Cynogen camera auto focus bug --- android/ZBarScannerActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/ZBarScannerActivity.java b/android/ZBarScannerActivity.java index 0146510..f9302d7 100644 --- a/android/ZBarScannerActivity.java +++ b/android/ZBarScannerActivity.java @@ -314,7 +314,10 @@ implements SurfaceHolder.Callback { private Runnable doAutoFocus = new Runnable() { public void run() { - if(camera != null) camera.autoFocus(autoFocusCb); + if(camera != null){ + camera.cancelAutoFocus(); + camera.autoFocus(autoFocusCb); + } } };