Turned on ITF support in the Android client, and fixed a bug in the ITF result points...
[zxing.git] / core / src / com / google / zxing / oned / MultiFormatOneDReader.java
index b74a773..ea0d197 100644 (file)
@@ -27,7 +27,7 @@ import java.util.Vector;
 
 /**
  * @author dswitkin@google.com (Daniel Switkin)
- * @author srowen@google.com (Sean Owen)
+ * @author Sean Owen
  */
 public final class MultiFormatOneDReader extends AbstractOneDReader {
 
@@ -49,11 +49,15 @@ public final class MultiFormatOneDReader extends AbstractOneDReader {
       if (possibleFormats.contains(BarcodeFormat.CODE_128)) {
         readers.addElement(new Code128Reader());
       }
+      if (possibleFormats.contains(BarcodeFormat.ITF)) {
+         readers.addElement(new ITFReader());
+      }
     }
     if (readers.isEmpty()) {
       readers.addElement(new MultiFormatUPCEANReader(hints));
       readers.addElement(new Code39Reader());
       readers.addElement(new Code128Reader());
+      readers.addElement(new ITFReader());
     }
   }
 
@@ -68,7 +72,7 @@ public final class MultiFormatOneDReader extends AbstractOneDReader {
       }
     }
 
-    throw new ReaderException("No barcode was detected in this image.");
+    throw ReaderException.getInstance();
   }
 
 }