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

341 lines
12 KiB
Java

package o;
import android.content.res.Resources;
import com.facetec.sdk.FaceTecSessionResult;
import com.scb.phone.domain.errors.RetrofitException;
import java.io.File;
import o.ZI;
import o.kPx;
import o.wRi;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
/* renamed from: o.bXP, reason: case insensitive filesystem */
/* loaded from: classes4.dex */
public class C4338bXP extends AbstractC4304bWR<InterfaceC9491dkj> {
private static final Integer e = 0;
private final C17520xU b;
private final C15849jC d;
private final C17351vyN k;
private String m;
/* renamed from: o, reason: collision with root package name */
private String f8552o;
@InterfaceC13391fZD
public C4338bXP(C16903sI c16903sI, C17520xU c17520xU, C17351vyN c17351vyN, C15849jC c15849jC, mvt mvtVar, C15740iG c15740iG, Resources resources) {
super(c16903sI, mvtVar, c15740iG, resources);
this.k = c17351vyN;
this.b = c17520xU;
this.d = c15849jC;
}
public final void d(String str) {
super.c();
this.f8552o = gjJ.b((CharSequence) str) ? "RP" : "IDP";
this.m = str;
}
@Override // o.AbstractC4304bWR
public final void b(File file) {
RequestBody requestBody;
String valueOf = String.valueOf(System.currentTimeMillis());
String e2 = e(file, valueOf);
C17351vyN c17351vyN = this.k;
String str = this.f8552o;
String str2 = this.m;
C12144esf c12144esf = this.a;
String absolutePath = file.getAbsolutePath();
C14957gcv.e(str, "");
C14957gcv.e(c12144esf, "");
C14957gcv.e(absolutePath, "");
C14957gcv.e(e2, "");
C14957gcv.e(valueOf, "");
C14957gcv.e(str, "");
RequestBody create = RequestBody.Companion.create(str, MediaType.Companion.parse("text/plain"));
if (str2 != null) {
C14957gcv.e(str2, "");
requestBody = RequestBody.Companion.create(str2, MediaType.Companion.parse("text/plain"));
} else {
requestBody = null;
}
RequestBody requestBody2 = requestBody;
C14957gcv.e("jpg", "");
RequestBody create2 = RequestBody.Companion.create("jpg", MediaType.Companion.parse("text/plain"));
MultipartBody.Part a = C15600gy.a("imageData", absolutePath);
String valueOf2 = String.valueOf(c12144esf.b);
C14957gcv.e(valueOf2, "");
RequestBody create3 = RequestBody.Companion.create(valueOf2, MediaType.Companion.parse("text/plain"));
String valueOf3 = String.valueOf(c12144esf.a);
C14957gcv.e(valueOf3, "");
RequestBody create4 = RequestBody.Companion.create(valueOf3, MediaType.Companion.parse("text/plain"));
String valueOf4 = String.valueOf(c12144esf.h);
C14957gcv.e(valueOf4, "");
RequestBody create5 = RequestBody.Companion.create(valueOf4, MediaType.Companion.parse("text/plain"));
String valueOf5 = String.valueOf(c12144esf.i);
C14957gcv.e(valueOf5, "");
RequestBody create6 = RequestBody.Companion.create(valueOf5, MediaType.Companion.parse("text/plain"));
String valueOf6 = String.valueOf(c12144esf.d);
C14957gcv.e(valueOf6, "");
RequestBody create7 = RequestBody.Companion.create(valueOf6, MediaType.Companion.parse("text/plain"));
String valueOf7 = String.valueOf(c12144esf.c);
C14957gcv.e(valueOf7, "");
c17351vyN.b(new C4035bO(create, requestBody2, create2, a, create3, create4, create5, create6, create7, RequestBody.Companion.create(valueOf7, MediaType.Companion.parse("text/plain")), e2, valueOf));
C17351vyN c17351vyN2 = this.k;
c17351vyN2.d(c17351vyN2.i, new RVV(this, (byte) 0));
}
/* JADX INFO: Access modifiers changed from: private */
public void o(final Throwable th) {
String str;
if (th instanceof RetrofitException) {
RetrofitException retrofitException = (RetrofitException) th;
if (retrofitException.e == null || retrofitException.e.c == null) {
str = "";
} else {
str = retrofitException.e.c.e;
}
if ("3052".equals(str) && "IDP".equals(this.f8552o)) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.bXW
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9491dkj) obj).c("NDID_IDP");
}
};
if (this.f != 0) {
ieS.e(this.f);
return;
}
return;
}
if ("3052".equals(str) && "RP".equals(this.f8552o)) {
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bXX
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9491dkj) obj).c("NDID_RP");
}
};
if (this.f != 0) {
ieS2.e(this.f);
return;
}
return;
}
ZI.IeS ieS3 = new ZI.IeS(this, th) { // from class: o.bXT
private Throwable c;
private C4338bXP e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C4338bXP.a(this.e, this.c, (InterfaceC9491dkj) obj);
}
{
this.e = this;
this.c = th;
}
};
if (this.f != 0) {
ieS3.e(this.f);
return;
}
return;
}
ZI.IeS ieS4 = new ZI.IeS(this, th) { // from class: o.bXY
private C4338bXP a;
private Throwable d;
@Override // o.ZI.IeS
public final void e(Object obj) {
C4338bXP.d(this.a, this.d, (InterfaceC9491dkj) obj);
}
{
this.a = this;
this.d = th;
}
};
if (this.f != 0) {
ieS4.e(this.f);
}
}
@Override // o.AbstractC4304bWR
public final void a(FaceTecSessionResult faceTecSessionResult, String str, String str2) {
String valueOf = String.valueOf(System.currentTimeMillis());
String[] auditTrailCompressedBase64 = faceTecSessionResult.getAuditTrailCompressedBase64();
Integer num = e;
String e2 = e(auditTrailCompressedBase64[num.intValue()], faceTecSessionResult.getLowQualityAuditTrailCompressedBase64()[num.intValue()], valueOf);
C15849jC c15849jC = this.d;
InterfaceC14890gbN<C14866gag> interfaceC14890gbN = new InterfaceC14890gbN(this) { // from class: o.bYb
private C4338bXP e;
@Override // o.InterfaceC14890gbN
public final Object invoke() {
return C4338bXP.b(this.e);
}
{
this.e = this;
}
};
InterfaceC14894gbR<? super Throwable, C14866gag> interfaceC14894gbR = new InterfaceC14894gbR(this) { // from class: o.bYd
private C4338bXP c;
@Override // o.InterfaceC14894gbR
public final Object invoke(Object obj) {
return C4338bXP.d(this.c, (Throwable) obj);
}
{
this.c = this;
}
};
String str3 = this.f8552o;
String str4 = this.m;
String faceScanBase64 = faceTecSessionResult.getFaceScanBase64();
String str5 = faceTecSessionResult.getAuditTrailCompressedBase64()[num.intValue()];
String str6 = faceTecSessionResult.getLowQualityAuditTrailCompressedBase64()[num.intValue()];
C14957gcv.e(str3, "");
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
C14957gcv.e(faceScanBase64, "");
C14957gcv.e(str5, "");
C14957gcv.e(str6, "");
C3999bN c3999bN = new C3999bN(str3, str4, str, str2, faceScanBase64, str5, str6);
C14957gcv.e(interfaceC14890gbN, "");
C14957gcv.e(interfaceC14894gbR, "");
C14957gcv.e(c3999bN, "");
C14957gcv.e(e2, "");
C14957gcv.e(valueOf, "");
c15849jC.f.d(interfaceC14890gbN, interfaceC14894gbR, new kPx.HBt(c3999bN, e2, valueOf), new fSC());
}
@Override // o.AbstractC4304bWR
public final void a() {
C4346bXe c4346bXe = new C4346bXe();
if (this.f != 0) {
c4346bXe.e(this.f);
}
}
/* renamed from: o.bXP$RVV */
/* loaded from: classes4.dex */
class RVV extends wRi.LWm<Boolean> {
private C4338bXP b;
private RVV(C4338bXP c4338bXP) {
this.b = c4338bXP;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
super.onNext((Boolean) obj);
C4338bXP.e(this.b);
C4338bXP c4338bXP = this.b;
bXQ bxq = new bXQ();
if (c4338bXP.f != 0) {
bxq.e(c4338bXP.f);
}
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
super.onError(th);
C4338bXP.c(this.b);
this.b.o(th);
}
/* synthetic */ RVV(C4338bXP c4338bXP, byte b) {
this(c4338bXP);
}
}
public static /* synthetic */ C14866gag b(C4338bXP c4338bXP) {
bXU bxu = new bXU();
if (c4338bXP.f != 0) {
bxu.e(c4338bXP.f);
}
if (c4338bXP.f != 0) {
c4338bXP.f.ar_();
}
c4338bXP.i = false;
bXQ bxq = new bXQ();
if (c4338bXP.f != 0) {
bxq.e(c4338bXP.f);
}
return C14866gag.c;
}
public static /* synthetic */ void a(C4338bXP c4338bXP, Throwable th, InterfaceC9491dkj interfaceC9491dkj) {
C0693Mj e2;
if (c4338bXP.g) {
e2 = c4338bXP.h(th);
} else {
e2 = c4338bXP.j.e(th);
}
interfaceC9491dkj.e(e2);
}
public static /* synthetic */ C14866gag d(C4338bXP c4338bXP, Throwable th) {
bXU bxu = new bXU();
if (c4338bXP.f != 0) {
bxu.e(c4338bXP.f);
}
if (c4338bXP.f != 0) {
c4338bXP.f.ar_();
}
c4338bXP.i = false;
c4338bXP.o(th);
return C14866gag.c;
}
public static /* synthetic */ void d(C4338bXP c4338bXP, Throwable th, InterfaceC9491dkj interfaceC9491dkj) {
C0693Mj e2;
if (c4338bXP.g) {
e2 = c4338bXP.h(th);
} else {
e2 = c4338bXP.j.e(th);
}
interfaceC9491dkj.e(e2);
}
static /* synthetic */ void c(C4338bXP c4338bXP) {
if (c4338bXP.f != 0) {
c4338bXP.f.ar_();
}
}
static /* synthetic */ void e(C4338bXP c4338bXP) {
if (c4338bXP.f != 0) {
c4338bXP.f.ar_();
}
}
@Override // o.AbstractC4304bWR
public final void g(final Throwable th) {
if (this.f != 0) {
this.f.ar_();
}
ZI.IeS ieS = new ZI.IeS(this, th) { // from class: o.bXZ
private Throwable b;
private C4338bXP d;
@Override // o.ZI.IeS
public final void e(Object obj) {
InterfaceC9491dkj interfaceC9491dkj = (InterfaceC9491dkj) obj;
interfaceC9491dkj.e(this.d.j.e(this.b));
}
{
this.d = this;
this.b = th;
}
};
if (this.f != 0) {
ieS.e(this.f);
}
}
}