From 76630c9c451abe95ea6a70806214882e311d8cf1 Mon Sep 17 00:00:00 2001 From: PaoloMessina Date: Wed, 21 Jan 2015 14:26:33 +0100 Subject: [PATCH] android autofocus fix Adding camera.cancelAutoFocus(); some devices crashes --- android/ZBarScannerActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/ZBarScannerActivity.java b/android/ZBarScannerActivity.java index 6b3bb93..ff8ce5c 100644 --- a/android/ZBarScannerActivity.java +++ b/android/ZBarScannerActivity.java @@ -219,6 +219,7 @@ implements SurfaceHolder.Callback { private AutoFocusCallback autoFocusCb = new AutoFocusCallback() { public void onAutoFocus(boolean success, Camera camera) { + camera.cancelAutoFocus(); autoFocusHandler.postDelayed(doAutoFocus, autoFocusInterval); } };