489 lines
17 KiB
Java
489 lines
17 KiB
Java
|
package com.scb.phone.view.fragment.hml;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.os.Bundle;
|
||
|
import android.text.Editable;
|
||
|
import android.text.method.DigitsKeyListener;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.Button;
|
||
|
import androidx.fragment.app.FragmentActivity;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.ButterKnife;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.activity.BaseActivity;
|
||
|
import com.scb.phone.view.activity.hml.HmlNTBExternalInstructionActivity;
|
||
|
import com.scb.phone.view.activity.hml.HmlOTAinfoActivity;
|
||
|
import com.scb.phone.view.activity.hml.HmlVerifyPhoneValidateOtpActivity;
|
||
|
import com.scb.phone.view.custom.common.CommonInputViewGroup;
|
||
|
import com.scb.phone.view.custom.common.CustomEditText;
|
||
|
import com.scb.phone.view.fragment.hml.HmlNTBExternalAuthenticationFragment;
|
||
|
import o.C14957gcv;
|
||
|
import o.C15602gz;
|
||
|
import o.C17800zpz;
|
||
|
import o.C5415bsc;
|
||
|
import o.EnumC8951daY;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
import o.InterfaceC9266dgW;
|
||
|
import o.RkP;
|
||
|
import o.ZI;
|
||
|
import o.fJJ;
|
||
|
import o.fLJ;
|
||
|
import o.gdZ;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class HmlNTBExternalAuthenticationFragment extends Hilt_HmlNTBExternalAuthenticationFragment implements InterfaceC9266dgW {
|
||
|
public static final HBt d = new HBt(0);
|
||
|
|
||
|
@BindView
|
||
|
public CommonInputViewGroup etOta;
|
||
|
|
||
|
@BindView
|
||
|
public Button nextButton;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public C5415bsc presenter;
|
||
|
|
||
|
@BindView
|
||
|
public CommonInputViewGroup vwNationalId;
|
||
|
|
||
|
public static /* synthetic */ boolean h() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static final class HBt {
|
||
|
private HBt() {
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ HBt(byte b) {
|
||
|
this();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.Fragment
|
||
|
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||
|
C14957gcv.e(layoutInflater, "");
|
||
|
View inflate = layoutInflater.inflate(R.layout.2131559697, viewGroup, false);
|
||
|
ButterKnife.c(this, inflate);
|
||
|
CommonInputViewGroup commonInputViewGroup = this.vwNationalId;
|
||
|
Button button = null;
|
||
|
if (commonInputViewGroup == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup = null;
|
||
|
}
|
||
|
commonInputViewGroup.mEditText.setKeyListener(DigitsKeyListener.getInstance("1234567890-"));
|
||
|
CommonInputViewGroup commonInputViewGroup2 = this.vwNationalId;
|
||
|
if (commonInputViewGroup2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup2 = null;
|
||
|
}
|
||
|
commonInputViewGroup2.setOnPasteListener(new CustomEditText.IeS() { // from class: o.fcu
|
||
|
@Override // com.scb.phone.view.custom.common.CustomEditText.IeS
|
||
|
public final boolean e(CustomEditText customEditText, String str) {
|
||
|
return HmlNTBExternalAuthenticationFragment.h();
|
||
|
}
|
||
|
});
|
||
|
CommonInputViewGroup commonInputViewGroup3 = this.vwNationalId;
|
||
|
if (commonInputViewGroup3 == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup3 = null;
|
||
|
}
|
||
|
CommonInputViewGroup commonInputViewGroup4 = this.vwNationalId;
|
||
|
if (commonInputViewGroup4 == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup4 = null;
|
||
|
}
|
||
|
fLJ flj = new fLJ(commonInputViewGroup4.mEditText, "X-XXXX-XXXXX-XX-X", new fLJ.Sts(this) { // from class: o.fcw
|
||
|
private HmlNTBExternalAuthenticationFragment e;
|
||
|
|
||
|
@Override // o.fLJ.Sts
|
||
|
public final String c(String str) {
|
||
|
return HmlNTBExternalAuthenticationFragment.b(this.e, str);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.e = this;
|
||
|
}
|
||
|
});
|
||
|
flj.b = new RVV(this);
|
||
|
flj.e = true;
|
||
|
fLJ flj2 = flj;
|
||
|
commonInputViewGroup3.mEditText.addTextChangedListener(flj2);
|
||
|
commonInputViewGroup3.d.add(flj2);
|
||
|
CommonInputViewGroup commonInputViewGroup5 = this.etOta;
|
||
|
if (commonInputViewGroup5 == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup5 = null;
|
||
|
}
|
||
|
commonInputViewGroup5.setIconListener(new CommonInputViewGroup.HBt(this) { // from class: o.fcv
|
||
|
private HmlNTBExternalAuthenticationFragment b;
|
||
|
|
||
|
@Override // com.scb.phone.view.custom.common.CommonInputViewGroup.HBt
|
||
|
public final void a() {
|
||
|
HmlNTBExternalAuthenticationFragment.c(this.b);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
});
|
||
|
CommonInputViewGroup commonInputViewGroup6 = this.etOta;
|
||
|
if (commonInputViewGroup6 == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup6 = null;
|
||
|
}
|
||
|
Sts sts = new Sts(this);
|
||
|
commonInputViewGroup6.mEditText.addTextChangedListener(sts);
|
||
|
commonInputViewGroup6.d.add(sts);
|
||
|
C5415bsc c5415bsc = this.presenter;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
c5415bsc.e((C5415bsc) this);
|
||
|
Button button2 = this.nextButton;
|
||
|
if (button2 != null) {
|
||
|
button = button2;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
button.setOnClickListener(new View.OnClickListener(this) { // from class: o.fcs
|
||
|
private HmlNTBExternalAuthenticationFragment a;
|
||
|
|
||
|
@Override // android.view.View.OnClickListener
|
||
|
public final void onClick(View view) {
|
||
|
HmlNTBExternalAuthenticationFragment.e(this.a);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = this;
|
||
|
}
|
||
|
});
|
||
|
C14957gcv.c(inflate, "");
|
||
|
return inflate;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static final class RVV implements fLJ.IeS {
|
||
|
private HmlNTBExternalAuthenticationFragment d;
|
||
|
|
||
|
RVV(HmlNTBExternalAuthenticationFragment hmlNTBExternalAuthenticationFragment) {
|
||
|
this.d = hmlNTBExternalAuthenticationFragment;
|
||
|
}
|
||
|
|
||
|
@Override // o.fLJ.IeS
|
||
|
public final void b(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
C5415bsc c5415bsc = this.d.presenter;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
c5415bsc.d(str);
|
||
|
}
|
||
|
|
||
|
@Override // o.fLJ.IeS
|
||
|
public final void e(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
C5415bsc c5415bsc = this.d.presenter;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
c5415bsc.d(str);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public static final class Sts extends fJJ {
|
||
|
private HmlNTBExternalAuthenticationFragment a;
|
||
|
|
||
|
Sts(HmlNTBExternalAuthenticationFragment hmlNTBExternalAuthenticationFragment) {
|
||
|
this.a = hmlNTBExternalAuthenticationFragment;
|
||
|
}
|
||
|
|
||
|
@Override // o.fJJ, android.text.TextWatcher
|
||
|
public final void afterTextChanged(Editable editable) {
|
||
|
C5415bsc c5415bsc = this.a.presenter;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
String valueOf = String.valueOf(editable);
|
||
|
C14957gcv.e(valueOf, "");
|
||
|
if (valueOf.length() == 0) {
|
||
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.bsi
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9266dgW) obj).d();
|
||
|
}
|
||
|
};
|
||
|
if (c5415bsc.f != 0) {
|
||
|
ieS.e(c5415bsc.f);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
if (valueOf.length() < 6) {
|
||
|
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bsk
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9266dgW) obj).f();
|
||
|
}
|
||
|
};
|
||
|
if (c5415bsc.f != 0) {
|
||
|
ieS2.e(c5415bsc.f);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
ZI.IeS ieS3 = new ZI.IeS() { // from class: o.bsj
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9266dgW) obj).e();
|
||
|
}
|
||
|
};
|
||
|
if (c5415bsc.f != 0) {
|
||
|
ieS3.e(c5415bsc.f);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9266dgW
|
||
|
public final void e(C5415bsc.LWm lWm) {
|
||
|
C14957gcv.e(lWm, "");
|
||
|
int i = IeS.c[lWm.ordinal()];
|
||
|
if (i == 1) {
|
||
|
HmlOTAinfoActivity.LWm lWm2 = HmlOTAinfoActivity.f7325o;
|
||
|
Context requireContext = requireContext();
|
||
|
C14957gcv.c(requireContext, "");
|
||
|
C14957gcv.e(requireContext, "");
|
||
|
startActivity(new Intent(requireContext, (Class<?>) HmlOTAinfoActivity.class));
|
||
|
return;
|
||
|
}
|
||
|
if (i == 2) {
|
||
|
HmlNTBExternalInstructionActivity.IeS ieS = HmlNTBExternalInstructionActivity.l;
|
||
|
Context requireContext2 = requireContext();
|
||
|
C14957gcv.c(requireContext2, "");
|
||
|
C14957gcv.e(requireContext2, "");
|
||
|
startActivity(new Intent(requireContext2, (Class<?>) HmlNTBExternalInstructionActivity.class));
|
||
|
return;
|
||
|
}
|
||
|
if (i == 3) {
|
||
|
HmlVerifyPhoneValidateOtpActivity.Sts sts = HmlVerifyPhoneValidateOtpActivity.k;
|
||
|
Context requireContext3 = requireContext();
|
||
|
C14957gcv.c(requireContext3, "");
|
||
|
C14957gcv.e(requireContext3, "");
|
||
|
startActivityForResult(new Intent(requireContext3, (Class<?>) HmlVerifyPhoneValidateOtpActivity.class), 1234);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public final void onActivityResult(int i, int i2, Intent intent) {
|
||
|
if (i == 1234 && i2 == -1) {
|
||
|
C5415bsc c5415bsc = this.presenter;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.bsh
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9266dgW) obj).e(C5415bsc.LWm.EXTERNAL_INSTRUCTION);
|
||
|
}
|
||
|
};
|
||
|
if (c5415bsc.f != 0) {
|
||
|
ieS.e(c5415bsc.f);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9266dgW
|
||
|
public final void b() {
|
||
|
CommonInputViewGroup commonInputViewGroup = this.vwNationalId;
|
||
|
CommonInputViewGroup commonInputViewGroup2 = null;
|
||
|
if (commonInputViewGroup == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup = null;
|
||
|
}
|
||
|
commonInputViewGroup.setErrorText(getString(R.string.hml_external_authentication_id_field_error));
|
||
|
CommonInputViewGroup commonInputViewGroup3 = this.vwNationalId;
|
||
|
if (commonInputViewGroup3 != null) {
|
||
|
commonInputViewGroup2 = commonInputViewGroup3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
commonInputViewGroup2.c();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9266dgW
|
||
|
public final void a() {
|
||
|
CommonInputViewGroup commonInputViewGroup = this.vwNationalId;
|
||
|
if (commonInputViewGroup == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup = null;
|
||
|
}
|
||
|
commonInputViewGroup.e();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9266dgW
|
||
|
public final void f() {
|
||
|
d();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9266dgW
|
||
|
public final void d() {
|
||
|
CommonInputViewGroup commonInputViewGroup = this.etOta;
|
||
|
CommonInputViewGroup commonInputViewGroup2 = null;
|
||
|
if (commonInputViewGroup == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup = null;
|
||
|
}
|
||
|
commonInputViewGroup.setErrorText(getString(R.string.hml_external_authentication_ota_field_error));
|
||
|
CommonInputViewGroup commonInputViewGroup3 = this.etOta;
|
||
|
if (commonInputViewGroup3 != null) {
|
||
|
commonInputViewGroup2 = commonInputViewGroup3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
commonInputViewGroup2.c();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9266dgW
|
||
|
public final void e() {
|
||
|
CommonInputViewGroup commonInputViewGroup = this.etOta;
|
||
|
if (commonInputViewGroup == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup = null;
|
||
|
}
|
||
|
commonInputViewGroup.e();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9266dgW
|
||
|
public final void d(String str) {
|
||
|
C14957gcv.e(str, "");
|
||
|
FragmentActivity requireActivity = requireActivity();
|
||
|
EnumC8951daY enumC8951daY = EnumC8951daY.ERROR;
|
||
|
if (getActivity() != null) {
|
||
|
BaseActivity.a(new Object[]{(BaseActivity) getActivity(), requireActivity, Integer.valueOf(R.id.view_group_root), str, enumC8951daY}, 855668825, -855668822, R.id.view_group_root);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public final void onDestroyView() {
|
||
|
C5415bsc c5415bsc = this.presenter;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
c5415bsc.w_();
|
||
|
super.onDestroyView();
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void c(HmlNTBExternalAuthenticationFragment hmlNTBExternalAuthenticationFragment) {
|
||
|
C14957gcv.e(hmlNTBExternalAuthenticationFragment, "");
|
||
|
C5415bsc c5415bsc = hmlNTBExternalAuthenticationFragment.presenter;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
ZI.IeS ieS = new ZI.IeS() { // from class: o.bsl
|
||
|
@Override // o.ZI.IeS
|
||
|
public final void e(Object obj) {
|
||
|
((InterfaceC9266dgW) obj).e(C5415bsc.LWm.OTA_ABOUT);
|
||
|
}
|
||
|
};
|
||
|
if (c5415bsc.f != 0) {
|
||
|
ieS.e(c5415bsc.f);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ void e(HmlNTBExternalAuthenticationFragment hmlNTBExternalAuthenticationFragment) {
|
||
|
C14957gcv.e(hmlNTBExternalAuthenticationFragment, "");
|
||
|
C5415bsc c5415bsc = hmlNTBExternalAuthenticationFragment.presenter;
|
||
|
CommonInputViewGroup commonInputViewGroup = null;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
CommonInputViewGroup commonInputViewGroup2 = hmlNTBExternalAuthenticationFragment.vwNationalId;
|
||
|
if (commonInputViewGroup2 == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup2 = null;
|
||
|
}
|
||
|
String obj = commonInputViewGroup2.mEditText.getText().toString();
|
||
|
C14957gcv.c((Object) obj, "");
|
||
|
CommonInputViewGroup commonInputViewGroup3 = hmlNTBExternalAuthenticationFragment.etOta;
|
||
|
if (commonInputViewGroup3 != null) {
|
||
|
commonInputViewGroup = commonInputViewGroup3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
String obj2 = commonInputViewGroup.mEditText.getText().toString();
|
||
|
C14957gcv.c((Object) obj2, "");
|
||
|
C14957gcv.e(obj, "");
|
||
|
C14957gcv.e(obj2, "");
|
||
|
if (c5415bsc.f != 0) {
|
||
|
c5415bsc.f.y();
|
||
|
}
|
||
|
RkP rkP = c5415bsc.b;
|
||
|
rkP.d(rkP.e(gdZ.a(obj, "-", ""), obj2), new C5415bsc.HBt(c5415bsc));
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ String b(HmlNTBExternalAuthenticationFragment hmlNTBExternalAuthenticationFragment, String str) {
|
||
|
C14957gcv.e(hmlNTBExternalAuthenticationFragment, "");
|
||
|
C5415bsc c5415bsc = hmlNTBExternalAuthenticationFragment.presenter;
|
||
|
if (c5415bsc == null) {
|
||
|
C14957gcv.a("");
|
||
|
c5415bsc = null;
|
||
|
}
|
||
|
C14957gcv.c((Object) str, "");
|
||
|
C14957gcv.e(str, "");
|
||
|
C17800zpz c17800zpz = c5415bsc.d;
|
||
|
return C15602gz.b(str, "[^0-9]", "X-XXXX-XXXXX-XX-X");
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9266dgW
|
||
|
public final void c() {
|
||
|
CommonInputViewGroup commonInputViewGroup = this.vwNationalId;
|
||
|
CommonInputViewGroup commonInputViewGroup2 = null;
|
||
|
if (commonInputViewGroup == null) {
|
||
|
C14957gcv.a("");
|
||
|
commonInputViewGroup = null;
|
||
|
}
|
||
|
commonInputViewGroup.setErrorText(getString(R.string.hml_external_authentication_id_field_error));
|
||
|
CommonInputViewGroup commonInputViewGroup3 = this.vwNationalId;
|
||
|
if (commonInputViewGroup3 != null) {
|
||
|
commonInputViewGroup2 = commonInputViewGroup3;
|
||
|
} else {
|
||
|
C14957gcv.a("");
|
||
|
}
|
||
|
commonInputViewGroup2.c();
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final /* synthetic */ class IeS {
|
||
|
public static final int[] c;
|
||
|
|
||
|
static {
|
||
|
int[] iArr = new int[C5415bsc.LWm.values().length];
|
||
|
try {
|
||
|
iArr[C5415bsc.LWm.OTA_ABOUT.ordinal()] = 1;
|
||
|
} catch (NoSuchFieldError unused) {
|
||
|
}
|
||
|
try {
|
||
|
iArr[C5415bsc.LWm.EXTERNAL_INSTRUCTION.ordinal()] = 2;
|
||
|
} catch (NoSuchFieldError unused2) {
|
||
|
}
|
||
|
try {
|
||
|
iArr[C5415bsc.LWm.NTB_OTP.ordinal()] = 3;
|
||
|
} catch (NoSuchFieldError unused3) {
|
||
|
}
|
||
|
c = iArr;
|
||
|
}
|
||
|
}
|
||
|
}
|