From d150662bc44f318baf12c3ced005b81653307baf Mon Sep 17 00:00:00 2001 From: srowen Date: Sun, 25 Apr 2010 10:23:22 +0000 Subject: [PATCH] OK, issue 303, work around different Behold 2 setting git-svn-id: http://zxing.googlecode.com/svn/trunk@1318 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../client/android/camera/CameraConfigurationManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java b/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java index e04c352d..c22a4d78 100644 --- a/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java +++ b/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java @@ -21,6 +21,7 @@ import java.util.regex.Pattern; import android.content.Context; import android.graphics.Point; import android.hardware.Camera; +import android.os.Build; import android.util.Log; import android.view.Display; import android.view.WindowManager; @@ -179,7 +180,12 @@ final class CameraConfigurationManager { private void setFlash(Camera.Parameters parameters) { // FIXME: This is a hack to turn the flash off on the Samsung Galaxy. - parameters.set("flash-value", 2); + // And this is a hack-hack to work around a different value on the Behold II + if (Build.MODEL.contains("Behold II")) { + parameters.set("flash-value", 1); + } else { + parameters.set("flash-value", 2); + } // This is the standard setting to turn the flash off that all devices should honor. parameters.set("flash-mode", "off"); } -- 2.20.1