45 lines
1.4 KiB
Java
45 lines
1.4 KiB
Java
package com.google.android.gms.vision.clearcut;
|
|
|
|
import android.content.Context;
|
|
import com.google.android.gms.clearcut.ClearcutLogger;
|
|
import com.google.android.gms.internal.vision.zzct;
|
|
import com.google.android.gms.internal.vision.zzdu;
|
|
import com.google.android.gms.internal.vision.zzjt;
|
|
import com.google.android.gms.vision.L;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class VisionClearcutLogger {
|
|
private final ClearcutLogger zzbw;
|
|
private boolean zzbx = true;
|
|
|
|
public VisionClearcutLogger(Context context) {
|
|
this.zzbw = new ClearcutLogger(context, "VISION", null);
|
|
}
|
|
|
|
public final void zzb(int i, zzdu zzduVar) {
|
|
int zzeq = zzduVar.zzeq();
|
|
byte[] bArr = new byte[zzeq];
|
|
zzjt.zza(zzduVar, bArr, 0, zzeq);
|
|
if (i < 0 || i > 3) {
|
|
L.isLoggable(4);
|
|
return;
|
|
}
|
|
try {
|
|
if (this.zzbx) {
|
|
this.zzbw.newEvent(bArr).setEventCode(i).log();
|
|
return;
|
|
}
|
|
zzdu zzduVar2 = new zzdu();
|
|
try {
|
|
zzjt.zza(zzduVar2, bArr);
|
|
L.zzc("Would have logged:\n%s", zzduVar2.toString());
|
|
} catch (Exception e) {
|
|
L.zza(e, "Parsing error", new Object[0]);
|
|
}
|
|
} catch (Exception e2) {
|
|
zzct.zza(e2);
|
|
L.zza(e2, "Failed to log", new Object[0]);
|
|
}
|
|
}
|
|
}
|