mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Forced the Android client to only decode the existing 7 formats, thereby excluding ITF for the time being.
git-svn-id: https://zxing.googlecode.com/svn/trunk@751 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
960a169da7
commit
6d7d507e27
|
@ -124,8 +124,22 @@ final class DecodeThread extends Thread {
|
|||
mMultiFormatReader.setHints(hints);
|
||||
}
|
||||
|
||||
/**
|
||||
* Instead of calling setHints(null), which would allow new formats like ITF to sneak in, we
|
||||
* explicitly set which formats are available.
|
||||
*/
|
||||
private void setDecodeAllMode() {
|
||||
mMultiFormatReader.setHints(null);
|
||||
Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>(3);
|
||||
Vector<BarcodeFormat> vector = new Vector<BarcodeFormat>();
|
||||
vector.addElement(BarcodeFormat.UPC_A);
|
||||
vector.addElement(BarcodeFormat.UPC_E);
|
||||
vector.addElement(BarcodeFormat.EAN_13);
|
||||
vector.addElement(BarcodeFormat.EAN_8);
|
||||
vector.addElement(BarcodeFormat.CODE_39);
|
||||
vector.addElement(BarcodeFormat.CODE_128);
|
||||
vector.addElement(BarcodeFormat.QR_CODE);
|
||||
hints.put(DecodeHintType.POSSIBLE_FORMATS, vector);
|
||||
mMultiFormatReader.setHints(hints);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue