[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809

srowen srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:31:10 UTC 2010


The following commit has been merged in the upstream branch:
commit d150662bc44f318baf12c3ced005b81653307baf
Author: srowen <srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date:   Sun Apr 25 10:23:22 2010 +0000

    OK, issue 303, work around different Behold 2 setting
    
    git-svn-id: http://zxing.googlecode.com/svn/trunk@1318 59b500cc-1b3d-0410-9834-0bbf25fbcc57

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 e04c352..c22a4d7 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");
   }

-- 
Multi-format 1D/2D barcode image processing library



More information about the Pkg-google-commits mailing list