what-the-bank/sources/com/google/firebase/ml/vision/barcode/FirebaseVisionBarcode.java

75 lines
2.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.ml.vision.barcode;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.internal.firebase_ml.zzmd;
import com.google.android.gms.vision.barcode.Barcode;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes2.dex */
public class FirebaseVisionBarcode {
private static final Map<Integer, zzmd.zzv.zza> zzavq;
private static final Map<Integer, zzmd.zzv.zzb> zzavr;
private final Barcode zzavs;
public FirebaseVisionBarcode(Barcode barcode) {
this.zzavs = (Barcode) Preconditions.checkNotNull(barcode);
}
public int getFormat() {
int i = this.zzavs.format;
if (i > 4096 || i == 0) {
return -1;
}
return i;
}
public int getValueType() {
return this.zzavs.valueFormat;
}
public final zzmd.zzv.zza zznd() {
zzmd.zzv.zza zzaVar = zzavq.get(Integer.valueOf(getFormat()));
return zzaVar == null ? zzmd.zzv.zza.FORMAT_UNKNOWN : zzaVar;
}
public final zzmd.zzv.zzb zzne() {
zzmd.zzv.zzb zzbVar = zzavr.get(Integer.valueOf(getValueType()));
return zzbVar == null ? zzmd.zzv.zzb.TYPE_UNKNOWN : zzbVar;
}
static {
HashMap hashMap = new HashMap();
zzavq = hashMap;
HashMap hashMap2 = new HashMap();
zzavr = hashMap2;
hashMap.put(-1, zzmd.zzv.zza.FORMAT_UNKNOWN);
hashMap.put(1, zzmd.zzv.zza.FORMAT_CODE_128);
hashMap.put(2, zzmd.zzv.zza.FORMAT_CODE_39);
hashMap.put(4, zzmd.zzv.zza.FORMAT_CODE_93);
hashMap.put(8, zzmd.zzv.zza.FORMAT_CODABAR);
hashMap.put(16, zzmd.zzv.zza.FORMAT_DATA_MATRIX);
hashMap.put(32, zzmd.zzv.zza.FORMAT_EAN_13);
hashMap.put(64, zzmd.zzv.zza.FORMAT_EAN_8);
hashMap.put(128, zzmd.zzv.zza.FORMAT_ITF);
hashMap.put(256, zzmd.zzv.zza.FORMAT_QR_CODE);
hashMap.put(512, zzmd.zzv.zza.FORMAT_UPC_A);
hashMap.put(1024, zzmd.zzv.zza.FORMAT_UPC_E);
hashMap.put(2048, zzmd.zzv.zza.FORMAT_PDF417);
hashMap.put(4096, zzmd.zzv.zza.FORMAT_AZTEC);
hashMap2.put(0, zzmd.zzv.zzb.TYPE_UNKNOWN);
hashMap2.put(1, zzmd.zzv.zzb.TYPE_CONTACT_INFO);
hashMap2.put(2, zzmd.zzv.zzb.TYPE_EMAIL);
hashMap2.put(3, zzmd.zzv.zzb.TYPE_ISBN);
hashMap2.put(4, zzmd.zzv.zzb.TYPE_PHONE);
hashMap2.put(5, zzmd.zzv.zzb.TYPE_PRODUCT);
hashMap2.put(6, zzmd.zzv.zzb.TYPE_SMS);
hashMap2.put(7, zzmd.zzv.zzb.TYPE_TEXT);
hashMap2.put(8, zzmd.zzv.zzb.TYPE_URL);
hashMap2.put(9, zzmd.zzv.zzb.TYPE_WIFI);
hashMap2.put(10, zzmd.zzv.zzb.TYPE_GEO);
hashMap2.put(11, zzmd.zzv.zzb.TYPE_CALENDAR_EVENT);
hashMap2.put(12, zzmd.zzv.zzb.TYPE_DRIVER_LICENSE);
}
}