[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:30:58 UTC 2010


The following commit has been merged in the upstream branch:
commit 98456a9c7f01dfdc5628fda8e9132ddbf037338a
Author: srowen <srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date:   Sun Apr 11 09:54:15 2010 +0000

    Oops, bug from last patch. Need to make the Handler in run()
    
    git-svn-id: http://zxing.googlecode.com/svn/trunk@1298 59b500cc-1b3d-0410-9834-0bbf25fbcc57

diff --git a/android/src/com/google/zxing/client/android/DecodeThread.java b/android/src/com/google/zxing/client/android/DecodeThread.java
index c3d77de..f297361 100755
--- a/android/src/com/google/zxing/client/android/DecodeThread.java
+++ b/android/src/com/google/zxing/client/android/DecodeThread.java
@@ -37,13 +37,18 @@ final class DecodeThread extends Thread {
 
   public static final String BARCODE_BITMAP = "barcode_bitmap";
 
-  private final Handler handler;
+  private final CaptureActivity activity;
+  private final Hashtable<DecodeHintType, Object> hints;
+  private Handler handler;
 
   DecodeThread(CaptureActivity activity,
                Vector<BarcodeFormat> decodeFormats,
                String characterSet,
                ResultPointCallback resultPointCallback) {
-    Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>(3);
+
+    this.activity = activity;
+
+    hints = new Hashtable<DecodeHintType, Object>(3);
 
     // The prefs can't change while the thread is running, so pick them up once here.
     if (decodeFormats == null || decodeFormats.isEmpty()) {
@@ -66,8 +71,6 @@ final class DecodeThread extends Thread {
     }
 
     hints.put(DecodeHintType.NEED_RESULT_POINT_CALLBACK, resultPointCallback);
-
-    this.handler = new DecodeHandler(activity, hints);
   }
 
   Handler getHandler() {
@@ -77,6 +80,7 @@ final class DecodeThread extends Thread {
   @Override
   public void run() {
     Looper.prepare();
+    handler = new DecodeHandler(activity, hints);    
     Looper.loop();
   }
 

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



More information about the Pkg-google-commits mailing list