what-the-bank/sources/com/scb/phone/view/fragment/etb/ETBCheckIdentityFragment.java

598 lines
22 KiB
Java

package com.scb.phone.view.fragment.etb;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.Editable;
import android.text.InputFilter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import com.huawei.hms.support.api.entity.common.CommonConstant;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.HomeActivity;
import com.scb.phone.view.activity.ntb.ekyc.NationalIdHelpActivity;
import com.scb.phone.view.delegate.FacialValidationViewDelegate;
import com.scb.phone.view.fragment.etb.ETBCheckIdentityFragment;
import com.scb.phone.view.fragment.ntb.fatca.FatcaLandingQuestionFragment;
import o.AbstractC14961gcz;
import o.C0698Mn;
import o.C0714Mx;
import o.C10448eEi;
import o.C10454eEo;
import o.C11560ehe;
import o.C14866gag;
import o.C14954gcs;
import o.C14957gcv;
import o.C4715bfR;
import o.C4716bfS;
import o.InterfaceC0834Plv;
import o.InterfaceC13391fZD;
import o.InterfaceC13393fZL;
import o.InterfaceC14890gbN;
import o.InterfaceC14894gbR;
import o.InterfaceC9164deZ;
import o.InterfaceC9225dfh;
import o.InterfaceC9273dgd;
import o.InterfaceC9713dpA;
import o.MC;
import o.OIe;
import o.QKH;
import o.ZI;
import o.fLS;
import o.fZZ;
import o.gUV;
import o.huo;
import o.qeC;
import o.rxl;
/* loaded from: classes5.dex */
public final class ETBCheckIdentityFragment extends Hilt_ETBCheckIdentityFragment implements InterfaceC9273dgd.Sts, InterfaceC9225dfh {
public static final HBt d = new HBt(0);
@InterfaceC13391fZD
public C4716bfS etbCheckIdentityPresenter;
private final InterfaceC13393fZL g;
private final FacialValidationViewDelegate h = new FacialValidationViewDelegate();
private huo<Intent> i;
private gUV j;
@Override // o.InterfaceC9713dpA.HBt
public final boolean p() {
return true;
}
@Override // o.InterfaceC9713dpA.HBt
public final int t() {
return 1;
}
public ETBCheckIdentityFragment() {
ZnX znX = ZnX.c;
C14957gcv.e(znX, "");
this.g = new fZZ(znX);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v23, types: [android.os.Parcelable] */
@Override // androidx.fragment.app.Fragment
public final void onViewCreated(View view, Bundle bundle) {
C0698Mn c0698Mn;
Window window;
C14957gcv.e(view, "");
super.onViewCreated(view, bundle);
FragmentActivity activity = getActivity();
if (activity != null && (window = activity.getWindow()) != null) {
window.setSoftInputMode(32);
}
C10448eEi c10448eEi = new C10448eEi(this, new RVV(this));
C14957gcv.e(c10448eEi, "");
FacialValidationViewDelegate facialValidationViewDelegate = this.h;
C14957gcv.e(c10448eEi, "");
facialValidationViewDelegate.c = c10448eEi;
C4716bfS c4716bfS = this.etbCheckIdentityPresenter;
if (c4716bfS == null) {
C14957gcv.a("");
c4716bfS = null;
}
c4716bfS.e((C4716bfS) this);
Bundle arguments = getArguments();
if (arguments != null) {
C14957gcv.c(arguments, "");
if (Build.VERSION.SDK_INT >= 33) {
c0698Mn = (Parcelable) arguments.getParcelable("com.scb.phone.view.fragment.etb.ARG_ACCOUNT", C0698Mn.class);
} else {
?? parcelable = arguments.getParcelable("com.scb.phone.view.fragment.etb.ARG_ACCOUNT");
c0698Mn = parcelable instanceof C0698Mn ? parcelable : null;
}
r8 = (C0698Mn) c0698Mn;
}
c4716bfS.c = r8;
rxl rxlVar = c4716bfS.a;
OIe oIe = OIe.ETB_CASA;
C14957gcv.e(oIe, "");
rxlVar.e.b(oIe);
c4716bfS.a.e.e();
C4715bfR c4715bfR = new C4715bfR(c4716bfS);
if (c4716bfS.f != null) {
c4715bfR.e(c4716bfS.f);
}
gUV guv = this.j;
C14957gcv.e(guv);
ImageView imageView = guv.d;
C14957gcv.c(imageView, "");
C10454eEo.d(imageView, new IeS(this));
gUV guv2 = this.j;
C14957gcv.e(guv2);
Button button = guv2.a;
C14957gcv.c(button, "");
C10454eEo.d(button, new LWm(this));
InputFilter.AllCaps allCaps = new InputFilter.AllCaps();
gUV guv3 = this.j;
C14957gcv.e(guv3);
EditText editText = guv3.e;
InputFilter.AllCaps allCaps2 = allCaps;
editText.setFilters(new InputFilter[]{allCaps2, new InputFilter.LengthFilter(3)});
gUV guv4 = this.j;
C14957gcv.e(guv4);
EditText editText2 = guv4.c;
C14957gcv.c(editText2, "");
editText.addTextChangedListener(new fLS(3, editText2, new Sts(this), new tOB(this)));
gUV guv5 = this.j;
C14957gcv.e(guv5);
EditText editText3 = guv5.c;
editText3.setFilters(new InputFilter[]{allCaps2, new InputFilter.LengthFilter(7)});
gUV guv6 = this.j;
C14957gcv.e(guv6);
EditText editText4 = guv6.b;
C14957gcv.c(editText4, "");
editText3.addTextChangedListener(new fLS(7, editText4, new saX(this), new jbe(this)));
gUV guv7 = this.j;
C14957gcv.e(guv7);
EditText editText5 = guv7.b;
editText5.setFilters(new InputFilter[]{allCaps2, new InputFilter.LengthFilter(2)});
gUV guv8 = this.j;
C14957gcv.e(guv8);
Button button2 = guv8.a;
C14957gcv.c(button2, "");
editText5.addTextChangedListener(new fLS(2, button2, new ZqN(this), new ojQ(this)));
huo<Intent> registerForActivityResult = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.eYk
private ETBCheckIdentityFragment e;
@Override // o.InterfaceC0834Plv
public final void d(Object obj) {
ETBCheckIdentityFragment.b(this.e);
}
{
this.e = this;
}
});
C14957gcv.c(registerForActivityResult, "");
this.i = registerForActivityResult;
}
/* loaded from: classes5.dex */
static final class RVV extends AbstractC14961gcz implements InterfaceC14894gbR<Boolean, C14866gag> {
private ETBCheckIdentityFragment e;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Boolean bool) {
boolean booleanValue = bool.booleanValue();
C4716bfS c4716bfS = this.e.etbCheckIdentityPresenter;
if (c4716bfS == null) {
C14957gcv.a("");
c4716bfS = null;
}
c4716bfS.e(booleanValue);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
RVV(ETBCheckIdentityFragment eTBCheckIdentityFragment) {
super(1);
this.e = eTBCheckIdentityFragment;
}
}
/* loaded from: classes5.dex */
static final class IeS extends AbstractC14961gcz implements InterfaceC14890gbN<C14866gag> {
private ETBCheckIdentityFragment a;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
C4716bfS c4716bfS = this.a.etbCheckIdentityPresenter;
if (c4716bfS == null) {
C14957gcv.a("");
c4716bfS = null;
}
if (c4716bfS.e) {
c4716bfS.e = false;
ZI.IeS ieS = new ZI.IeS() { // from class: o.bfX
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9273dgd.Sts) obj).b();
}
};
if (c4716bfS.f != 0) {
ieS.e(c4716bfS.f);
}
}
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
IeS(ETBCheckIdentityFragment eTBCheckIdentityFragment) {
super(0);
this.a = eTBCheckIdentityFragment;
}
}
/* loaded from: classes5.dex */
static final class LWm extends AbstractC14961gcz implements InterfaceC14890gbN<C14866gag> {
private ETBCheckIdentityFragment e;
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
C4716bfS c4716bfS = this.e.etbCheckIdentityPresenter;
if (c4716bfS == null) {
C14957gcv.a("");
c4716bfS = null;
}
c4716bfS.e(false);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
LWm(ETBCheckIdentityFragment eTBCheckIdentityFragment) {
super(0);
this.e = eTBCheckIdentityFragment;
}
}
@Override // o.InterfaceC9273dgd.Sts
public final void d(boolean z) {
gUV guv = this.j;
C14957gcv.e(guv);
guv.a.setEnabled(z);
}
@Override // androidx.fragment.app.Fragment
public final void onResume() {
super.onResume();
C4716bfS c4716bfS = this.etbCheckIdentityPresenter;
if (c4716bfS == null) {
C14957gcv.a("");
c4716bfS = null;
}
c4716bfS.e = true;
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public final void onDestroyView() {
huo<Intent> huoVar = this.i;
if (huoVar == null) {
C14957gcv.a("");
huoVar = null;
}
huoVar.e();
super.onDestroyView();
}
@Override // o.InterfaceC9273dgd.Sts
public final void b() {
NationalIdHelpActivity.b(getActivity(), getString(R.string.laser_id_help_title));
}
@Override // o.InterfaceC9273dgd.Sts
public final void e() {
Bundle bundle = new Bundle();
bundle.putInt("BUNDLE_FATCA_TYPE", 2);
FatcaLandingQuestionFragment fatcaLandingQuestionFragment = new FatcaLandingQuestionFragment();
fatcaLandingQuestionFragment.setArguments(bundle);
this.k.d(fatcaLandingQuestionFragment);
}
@Override // o.InterfaceC9273dgd.Sts
public final void a(String str) {
C14957gcv.e(str, "");
Uri parse = Uri.parse(str);
huo<Intent> huoVar = this.i;
if (huoVar == null) {
C14957gcv.a("");
huoVar = null;
}
huoVar.d(new Intent(CommonConstant.ACTION.HWID_SCHEME_URL, parse), null);
}
@Override // o.InterfaceC9273dgd.Sts
public final void c() {
Intent intent;
FragmentActivity activity = getActivity();
if (activity == null || (intent = (Intent) HomeActivity.e(new Object[]{activity}, -1290522472, 1290522474, (int) System.currentTimeMillis())) == null) {
return;
}
startActivity(intent);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v3, types: [android.os.Parcelable] */
@Override // o.InterfaceC9273dgd.Sts
public final void a() {
C0698Mn c0698Mn;
C0714Mx c0714Mx;
Parcelable parcelable;
Bundle arguments = getArguments();
InterfaceC9713dpA interfaceC9713dpA = this.k;
if (arguments != null) {
if (Build.VERSION.SDK_INT >= 33) {
parcelable = (Parcelable) arguments.getParcelable("com.scb.phone.view.fragment.etb.ARG_ACCOUNT", C0698Mn.class);
} else {
Parcelable parcelable2 = arguments.getParcelable("com.scb.phone.view.fragment.etb.ARG_ACCOUNT");
if (!(parcelable2 instanceof C0698Mn)) {
parcelable2 = null;
}
parcelable = (C0698Mn) parcelable2;
}
c0698Mn = (C0698Mn) parcelable;
} else {
c0698Mn = null;
}
if (arguments != null) {
if (Build.VERSION.SDK_INT >= 33) {
c0714Mx = (Parcelable) arguments.getParcelable("com.scb.phone.view.fragment.etb.ARG_PRODUCT", C0714Mx.class);
} else {
?? parcelable3 = arguments.getParcelable("com.scb.phone.view.fragment.etb.ARG_PRODUCT");
c0714Mx = parcelable3 instanceof C0714Mx ? parcelable3 : null;
}
r3 = (C0714Mx) c0714Mx;
}
interfaceC9713dpA.d(EtbPersonalInformationFragment.a(c0698Mn, r3));
}
@Override // o.InterfaceC9713dpA.HBt
public final String q() {
String string = getString(R.string.etb_check_identity);
C14957gcv.c((Object) string, "");
return string;
}
/* loaded from: classes5.dex */
public static final class HBt {
private HBt() {
}
public static ETBCheckIdentityFragment e(C0698Mn c0698Mn, C0714Mx c0714Mx) {
Bundle bundle = new Bundle();
bundle.putParcelable("com.scb.phone.view.fragment.etb.ARG_ACCOUNT", c0698Mn);
bundle.putParcelable("com.scb.phone.view.fragment.etb.ARG_PRODUCT", c0714Mx);
ETBCheckIdentityFragment eTBCheckIdentityFragment = new ETBCheckIdentityFragment();
eTBCheckIdentityFragment.setArguments(bundle);
return eTBCheckIdentityFragment;
}
public /* synthetic */ HBt(byte b) {
this();
}
}
/* loaded from: classes5.dex */
static final class ZnX extends AbstractC14961gcz implements InterfaceC14890gbN<QKH> {
public static final ZnX c = new ZnX();
@Override // o.InterfaceC14890gbN
public final /* synthetic */ QKH invoke() {
return new QKH();
}
ZnX() {
super(0);
}
}
/* loaded from: classes5.dex */
final /* synthetic */ class Sts extends C14954gcs implements InterfaceC14890gbN<C14866gag> {
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
ETBCheckIdentityFragment.e((ETBCheckIdentityFragment) this.f);
return C14866gag.c;
}
Sts(Object obj) {
super(0, obj, ETBCheckIdentityFragment.class, "checkNationalId", "checkNationalId()V");
}
}
/* loaded from: classes5.dex */
final /* synthetic */ class tOB extends C14954gcs implements InterfaceC14890gbN<C14866gag> {
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
((ETBCheckIdentityFragment) this.f).aN_();
return C14866gag.c;
}
tOB(Object obj) {
super(0, obj, ETBCheckIdentityFragment.class, "hideKeyboard", "hideKeyboard()V");
}
}
/* loaded from: classes5.dex */
final /* synthetic */ class saX extends C14954gcs implements InterfaceC14890gbN<C14866gag> {
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
ETBCheckIdentityFragment.e((ETBCheckIdentityFragment) this.f);
return C14866gag.c;
}
saX(Object obj) {
super(0, obj, ETBCheckIdentityFragment.class, "checkNationalId", "checkNationalId()V");
}
}
/* loaded from: classes5.dex */
final /* synthetic */ class jbe extends C14954gcs implements InterfaceC14890gbN<C14866gag> {
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
((ETBCheckIdentityFragment) this.f).aN_();
return C14866gag.c;
}
jbe(Object obj) {
super(0, obj, ETBCheckIdentityFragment.class, "hideKeyboard", "hideKeyboard()V");
}
}
/* loaded from: classes5.dex */
final /* synthetic */ class ZqN extends C14954gcs implements InterfaceC14890gbN<C14866gag> {
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
ETBCheckIdentityFragment.e((ETBCheckIdentityFragment) this.f);
return C14866gag.c;
}
ZqN(Object obj) {
super(0, obj, ETBCheckIdentityFragment.class, "checkNationalId", "checkNationalId()V");
}
}
/* loaded from: classes5.dex */
final /* synthetic */ class ojQ extends C14954gcs implements InterfaceC14890gbN<C14866gag> {
@Override // o.InterfaceC14890gbN
public final /* synthetic */ C14866gag invoke() {
((ETBCheckIdentityFragment) this.f).aN_();
return C14866gag.c;
}
ojQ(Object obj) {
super(0, obj, ETBCheckIdentityFragment.class, "hideKeyboard", "hideKeyboard()V");
}
}
public static /* synthetic */ void b(ETBCheckIdentityFragment eTBCheckIdentityFragment) {
C14957gcv.e(eTBCheckIdentityFragment, "");
C4716bfS c4716bfS = eTBCheckIdentityFragment.etbCheckIdentityPresenter;
C4716bfS c4716bfS2 = null;
if (c4716bfS == null) {
C14957gcv.a("");
c4716bfS = null;
}
if (c4716bfS.a.e.a()) {
eTBCheckIdentityFragment.a();
}
C4716bfS c4716bfS3 = eTBCheckIdentityFragment.etbCheckIdentityPresenter;
if (c4716bfS3 != null) {
c4716bfS2 = c4716bfS3;
} else {
C14957gcv.a("");
}
c4716bfS2.a.e.e();
}
public static final /* synthetic */ void e(ETBCheckIdentityFragment eTBCheckIdentityFragment) {
gUV guv = eTBCheckIdentityFragment.j;
C14957gcv.e(guv);
Editable text = guv.e.getText();
gUV guv2 = eTBCheckIdentityFragment.j;
C14957gcv.e(guv2);
Editable text2 = guv2.c.getText();
gUV guv3 = eTBCheckIdentityFragment.j;
C14957gcv.e(guv3);
Editable text3 = guv3.b.getText();
StringBuilder sb = new StringBuilder();
sb.append((Object) text);
sb.append((Object) text2);
sb.append((Object) text3);
String obj = sb.toString();
C4716bfS c4716bfS = eTBCheckIdentityFragment.etbCheckIdentityPresenter;
if (c4716bfS == null) {
C14957gcv.a("");
c4716bfS = null;
}
c4716bfS.d.c(C4716bfS.b[0], obj);
}
@Override // o.InterfaceC9225dfh
public final void b(String str, String str2) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
FacialValidationViewDelegate facialValidationViewDelegate = this.h;
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
InterfaceC9164deZ interfaceC9164deZ = facialValidationViewDelegate.c;
if (interfaceC9164deZ != null) {
interfaceC9164deZ.a(str, str2);
}
}
@Override // o.InterfaceC9225dfh
public final void b(MC mc) {
C14957gcv.e(mc, "");
FacialValidationViewDelegate facialValidationViewDelegate = this.h;
C14957gcv.e(mc, "");
InterfaceC9164deZ interfaceC9164deZ = facialValidationViewDelegate.c;
if (interfaceC9164deZ != null) {
interfaceC9164deZ.e(mc);
}
}
@Override // androidx.fragment.app.Fragment
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
C14957gcv.e(layoutInflater, "");
View inflate = layoutInflater.inflate(R.layout.2131559638, viewGroup, false);
int i = R.id.button_next;
Button button = (Button) qeC.e(inflate, R.id.button_next);
if (button != null) {
i = R.id.fields_container;
LinearLayout linearLayout = (LinearLayout) qeC.e(inflate, R.id.fields_container);
if (linearLayout != null) {
i = R.id.help_button;
ImageView imageView = (ImageView) qeC.e(inflate, R.id.help_button);
if (imageView != null) {
i = R.id.label_personal_information;
TextView textView = (TextView) qeC.e(inflate, R.id.label_personal_information);
if (textView != null) {
i = R.id.laser_id_first;
EditText editText = (EditText) qeC.e(inflate, R.id.laser_id_first);
if (editText != null) {
i = R.id.laser_id_second;
EditText editText2 = (EditText) qeC.e(inflate, R.id.laser_id_second);
if (editText2 != null) {
i = R.id.laser_id_third;
EditText editText3 = (EditText) qeC.e(inflate, R.id.laser_id_third);
if (editText3 != null) {
i = R.id.laser_id_title;
TextView textView2 = (TextView) qeC.e(inflate, R.id.laser_id_title);
if (textView2 != null) {
this.j = new gUV((LinearLayout) inflate, button, linearLayout, imageView, textView, editText, editText2, editText3, textView2);
((QKH) this.g.e()).e("etb");
QKH qkh = (QKH) this.g.e();
if (getActivity() != null) {
qkh.c(((BaseActivity) getActivity()).scbAnalytics, "ekyc_nationalid");
}
gUV guv = this.j;
C14957gcv.e(guv);
LinearLayout linearLayout2 = guv.f;
C14957gcv.c(linearLayout2, "");
return linearLayout2;
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
}
}