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

85 lines
3.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.util.SparseArray;
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.face.FirebaseVisionFace;
import com.google.firebase.ml.vision.face.FirebaseVisionFaceDetector;
import com.google.firebase.ml.vision.face.FirebaseVisionFaceDetectorOptions;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
/* renamed from: o.fRc, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C13121fRc implements InterfaceC13090fQd<C13099fQm> {
private static FirebaseVisionImage a;
private static final AtomicBoolean c = new AtomicBoolean(false);
private static List<C13099fQm> e = null;
public fQU<C13099fQm> b;
private FirebaseVisionFaceDetector j = FirebaseVision.getInstance().getVisionFaceDetector(new FirebaseVisionFaceDetectorOptions.Builder().setClassificationMode(2).setContourMode(2).setLandmarkMode(2).setPerformanceMode(1).setMinFaceSize(0.15f).enableTracking().build());
private final SparseArray<FirebaseVisionFace> d = new SparseArray<>();
public static FirebaseVisionImage e() {
return a;
}
public static List<C13099fQm> b() {
return e;
}
@Override // o.InterfaceC13090fQd
public final void a(FirebaseVisionImage firebaseVisionImage, C13120fRb c13120fRb) {
try {
if (c.getAndSet(true)) {
return;
}
a = firebaseVisionImage;
this.j.detectInImage(firebaseVisionImage).addOnCompleteListener(new OnCompleteListener<List<FirebaseVisionFace>>(this) { // from class: o.fRc.3
private C13121fRc a;
@Override // com.google.android.gms.tasks.OnCompleteListener
public final void onComplete(Task<List<FirebaseVisionFace>> task) {
C13121fRc.c.set(false);
}
{
this.a = this;
}
}).addOnSuccessListener(new OnSuccessListener<List<FirebaseVisionFace>>(this, c13120fRb) { // from class: o.fRc.2
private C13120fRb a;
private C13121fRc d;
@Override // com.google.android.gms.tasks.OnSuccessListener
public final /* synthetic */ void onSuccess(List<FirebaseVisionFace> list) {
ArrayList arrayList = new ArrayList();
for (FirebaseVisionFace firebaseVisionFace : list) {
boolean z = true;
if (this.a.e != 1) {
z = false;
}
arrayList.add(new C13099fQm(firebaseVisionFace, z));
}
List unused = C13121fRc.e = arrayList;
this.d.b.d(arrayList);
}
{
this.d = this;
this.a = c13120fRb;
}
});
} catch (Throwable unused) {
c.set(false);
}
}
@Override // o.InterfaceC13090fQd
public final void a() {
this.b.b();
}
}