what-the-bank/sources/o/C13084fQQ.java

76 lines
2.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.ml.vision.FirebaseVision;
import com.google.firebase.ml.vision.common.FirebaseVisionImage;
import com.google.firebase.ml.vision.text.FirebaseVisionText;
import com.google.firebase.ml.vision.text.FirebaseVisionTextRecognizer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
/* renamed from: o.fQQ, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C13084fQQ implements OnSuccessListener<FirebaseVisionText>, InterfaceC13090fQd<FirebaseVisionText> {
private static final AtomicBoolean a = new AtomicBoolean(false);
private final FirebaseVisionTextRecognizer b = FirebaseVision.getInstance().getOnDeviceTextRecognizer();
public fQU<FirebaseVisionText> c;
private final Context d;
@Override // com.google.android.gms.tasks.OnSuccessListener
public final /* synthetic */ void onSuccess(FirebaseVisionText firebaseVisionText) {
ArrayList arrayList = new ArrayList();
arrayList.add(firebaseVisionText);
this.c.d(arrayList);
}
@Override // o.InterfaceC13090fQd
public final void a(FirebaseVisionImage firebaseVisionImage, C13120fRb c13120fRb) {
try {
if (a.getAndSet(true)) {
return;
}
this.b.processImage(firebaseVisionImage).addOnCompleteListener(new OnCompleteListener<FirebaseVisionText>(this) { // from class: o.fQQ.2
private C13084fQQ d;
@Override // com.google.android.gms.tasks.OnCompleteListener
public final void onComplete(Task<FirebaseVisionText> task) {
C13084fQQ.a.set(false);
}
{
this.d = this;
}
}).addOnSuccessListener(this);
} catch (Throwable unused) {
a.set(false);
}
}
@Override // o.InterfaceC13090fQd
public final void a() {
try {
this.c.b();
this.b.close();
} catch (IOException unused) {
}
}
/* renamed from: o.fQQ$RVV */
/* loaded from: classes5.dex */
public static class RVV {
public final C13084fQQ a;
public RVV(Context context) {
this.a = new C13084fQQ(context);
}
}
public C13084fQQ(Context context) {
this.d = context;
}
}