94 lines
3.0 KiB
Java
94 lines
3.0 KiB
Java
package c.i.e;
|
|
|
|
import c.i.e.m.b;
|
|
import c.i.e.q.i;
|
|
import c.i.e.s.a;
|
|
import com.google.zxing.NotFoundException;
|
|
import com.google.zxing.ReaderException;
|
|
import com.google.zxing.Result;
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.Map;
|
|
/* compiled from: MultiFormatReader */
|
|
public final class g implements i {
|
|
public Map<d, ?> a;
|
|
public i[] b;
|
|
|
|
@Override // c.i.e.i
|
|
public Result a(c cVar, Map<d, ?> map) throws NotFoundException {
|
|
c(map);
|
|
return b(cVar);
|
|
}
|
|
|
|
public final Result b(c cVar) throws NotFoundException {
|
|
i[] iVarArr = this.b;
|
|
if (iVarArr != null) {
|
|
for (i iVar : iVarArr) {
|
|
try {
|
|
return iVar.a(cVar, this.a);
|
|
} catch (ReaderException unused) {
|
|
}
|
|
}
|
|
}
|
|
throw NotFoundException.k;
|
|
}
|
|
|
|
public void c(Map<d, ?> map) {
|
|
this.a = map;
|
|
boolean z2 = false;
|
|
boolean z3 = map != null && map.containsKey(d.TRY_HARDER);
|
|
Collection collection = map == null ? null : (Collection) map.get(d.POSSIBLE_FORMATS);
|
|
ArrayList arrayList = new ArrayList();
|
|
if (collection != null) {
|
|
if (collection.contains(a.UPC_A) || collection.contains(a.UPC_E) || collection.contains(a.EAN_13) || collection.contains(a.EAN_8) || collection.contains(a.CODABAR) || collection.contains(a.CODE_39) || collection.contains(a.CODE_93) || collection.contains(a.CODE_128) || collection.contains(a.ITF) || collection.contains(a.RSS_14) || collection.contains(a.RSS_EXPANDED)) {
|
|
z2 = true;
|
|
}
|
|
if (z2 && !z3) {
|
|
arrayList.add(new i(map));
|
|
}
|
|
if (collection.contains(a.QR_CODE)) {
|
|
arrayList.add(new a());
|
|
}
|
|
if (collection.contains(a.DATA_MATRIX)) {
|
|
arrayList.add(new c.i.e.o.a());
|
|
}
|
|
if (collection.contains(a.AZTEC)) {
|
|
arrayList.add(new b());
|
|
}
|
|
if (collection.contains(a.PDF_417)) {
|
|
arrayList.add(new c.i.e.r.b());
|
|
}
|
|
if (collection.contains(a.MAXICODE)) {
|
|
arrayList.add(new c.i.e.p.a());
|
|
}
|
|
if (z2 && z3) {
|
|
arrayList.add(new i(map));
|
|
}
|
|
}
|
|
if (arrayList.isEmpty()) {
|
|
if (!z3) {
|
|
arrayList.add(new i(map));
|
|
}
|
|
arrayList.add(new a());
|
|
arrayList.add(new c.i.e.o.a());
|
|
arrayList.add(new b());
|
|
arrayList.add(new c.i.e.r.b());
|
|
arrayList.add(new c.i.e.p.a());
|
|
if (z3) {
|
|
arrayList.add(new i(map));
|
|
}
|
|
}
|
|
this.b = (i[]) arrayList.toArray(new i[arrayList.size()]);
|
|
}
|
|
|
|
@Override // c.i.e.i
|
|
public void reset() {
|
|
i[] iVarArr = this.b;
|
|
if (iVarArr != null) {
|
|
for (i iVar : iVarArr) {
|
|
iVar.reset();
|
|
}
|
|
}
|
|
}
|
|
}
|