what-the-bank/sources/com/scb/phone/view/fragment/ndid/NdidIdpVerificationFragment...

290 lines
11 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.ndid;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnCheckedChanged;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.activity.csent.CrossMatchConsentActivity;
import com.scb.phone.view.activity.csent.SensitiveCSentActivity;
import com.scb.phone.view.activity.facialrecognition.FacialVerificationLockedActivity;
import com.scb.phone.view.activity.ndid.IdpLivenessCheckActivity;
import com.scb.phone.view.activity.ndid.IdpShareInformationActivity;
import com.scb.phone.view.activity.ndid.IdpSharingStatementVerifyIdentityActivity;
import com.scb.phone.view.activity.ndid.NdidIdpSharingStatementSelectAccountActivity;
import com.scb.phone.view.activity.ndid.NdidIdpVerificationTermsAndConditionsActivity;
import com.scb.phone.view.activity.ntb.ReviewInfoResultActivity;
import com.scb.phone.view.custom.common.CustomDialog;
import com.scb.phone.view.fragment.ndid.NdidIdpVerificationFragment;
import java.util.ArrayList;
import java.util.List;
import o.C11560ehe;
import o.C14866gag;
import o.Heg;
import o.IF;
import o.IFW;
import o.IK;
import o.InterfaceC0834Plv;
import o.InterfaceC13391fZD;
import o.InterfaceC14890gbN;
import o.InterfaceC9484dkc;
import o.bYE;
import o.fKB;
import o.gjJ;
import o.huo;
/* loaded from: classes5.dex */
public class NdidIdpVerificationFragment extends Hilt_NdidIdpVerificationFragment implements InterfaceC9484dkc {
@BindView
Button btNext;
private huo<Intent> c;
@BindView
TextView cancelNote;
@BindView
CheckBox consentCheckbox;
private huo<Intent> d;
private IFW f = new IFW();
@InterfaceC13391fZD
public bYE presenter;
@BindView
TextView tvNoteTwo;
public static NdidIdpVerificationFragment b(String str, String str2, String str3, String str4, String str5, List<String> list) {
Bundle bundle = new Bundle();
bundle.putString("com.scb.phone.EXTRA_REQUEST_MESSAGE", str);
bundle.putString("com.scb.phone.EXTRA_REQUEST_ID", str2);
bundle.putString("com.scb.phone.EXTRA_REQUEST_TIMEOUT", str3);
bundle.putString("com.scb.phone.EXTRA_SKIP_FACIAL", str4);
bundle.putString("com.scb.phone.EXTRA_REQUEST_TYPE", str5);
bundle.putStringArrayList("com.scb.phone.EXTRA_SERVICE_ID_LIST", new ArrayList<>(list));
NdidIdpVerificationFragment ndidIdpVerificationFragment = new NdidIdpVerificationFragment();
ndidIdpVerificationFragment.setArguments(bundle);
return ndidIdpVerificationFragment;
}
@Override // androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
super.onViewCreated(view, bundle);
IFW ifw = this.f;
if (getActivity() != null) {
ifw.c(((BaseActivity) getActivity()).scbAnalytics, "ndid_idp_verification_instructions");
}
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559786, viewGroup, false);
ButterKnife.c(this, inflate);
this.presenter.e((bYE) this);
if (getArguments() != null) {
this.presenter.e(getArguments().getString("com.scb.phone.EXTRA_REQUEST_MESSAGE"), getArguments().getString("com.scb.phone.EXTRA_REQUEST_ID"), getArguments().getString("com.scb.phone.EXTRA_SKIP_FACIAL"), getArguments().getString("com.scb.phone.EXTRA_REQUEST_TYPE"), getArguments().getStringArrayList("com.scb.phone.EXTRA_SERVICE_ID_LIST"));
this.tvNoteTwo.setText(getString(R.string.ndid_idp_verify_identity_note_two, getArguments().getString("com.scb.phone.EXTRA_REQUEST_TIMEOUT")));
}
this.cancelNote.setText(fKB.azU_(getResources(), getString(R.string.ndid_idp_verify_identity_note_three_clickable), getString(R.string.ndid_idp_verify_identity_note_three_not_clickable_start), getString(R.string.ndid_idp_verify_identity_note_three_not_clickable_end), new InterfaceC14890gbN(this) { // from class: o.foT
private NdidIdpVerificationFragment c;
@Override // o.InterfaceC14890gbN
public final Object invoke() {
return NdidIdpVerificationFragment.e(this.c);
}
{
this.c = this;
}
}));
this.cancelNote.setMovementMethod(LinkMovementMethod.getInstance());
this.cancelNote.setHighlightColor(0);
this.c = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.foM
private NdidIdpVerificationFragment b;
@Override // o.InterfaceC0834Plv
public final void d(Object obj) {
NdidIdpVerificationFragment.c(this.b, (Heg) obj);
}
{
this.b = this;
}
});
this.d = registerForActivityResult(new C11560ehe.Sts(), new InterfaceC0834Plv(this) { // from class: o.foK
private NdidIdpVerificationFragment b;
@Override // o.InterfaceC0834Plv
public final void d(Object obj) {
NdidIdpVerificationFragment.d(this.b, (Heg) obj);
}
{
this.b = this;
}
});
return inflate;
}
@Override // o.InterfaceC9484dkc
public final void e() {
this.btNext.setText(R.string.next_button);
}
@Override // o.InterfaceC9484dkc
public final void b() {
if (getContext() != null) {
startActivity(FacialVerificationLockedActivity.afr_(getContext(), "NDID_IDP"));
}
}
@Override // o.InterfaceC9484dkc
public final void a(String str, ArrayList<String> arrayList) {
if (getContext() != null) {
startActivity(NdidIdpSharingStatementSelectAccountActivity.aiU_(getContext(), str, arrayList));
}
}
@Override // o.InterfaceC9484dkc
public final void d(String str) {
FragmentActivity activity = getActivity();
if (activity != null) {
startActivity(IdpSharingStatementVerifyIdentityActivity.aiP_(activity, str));
getActivity().finish();
}
}
@Override // o.InterfaceC9484dkc
public final void c() {
if (getContext() == null || getArguments() == null) {
return;
}
startActivity(NdidIdpVerificationTermsAndConditionsActivity.ajg_(getContext(), getArguments().getString("com.scb.phone.EXTRA_REQUEST_ID"), getArguments().getString("com.scb.phone.EXTRA_SKIP_FACIAL"), getArguments().getString("com.scb.phone.EXTRA_REQUEST_TYPE"), getArguments().getStringArrayList("com.scb.phone.EXTRA_SERVICE_ID_LIST")));
}
@Override // o.InterfaceC9484dkc
public final void c(String str) {
this.consentCheckbox.setText(str);
}
@Override // o.InterfaceC9484dkc
public final void h() {
((CustomDialog) CustomDialog.a(new Object[]{CustomDialog.b(getContext()).c(R.string.ndid_idp_verify_identity_cancel_dialog_title).d(R.string.ndid_idp_verify_identity_cancel_dialog_text), Integer.valueOf(R.string.cancel), new DialogInterface.OnClickListener() { // from class: o.foL
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
}}, -95769672, 95769672, R.string.cancel)).aoT_(R.string.ok, new DialogInterface.OnClickListener(this) { // from class: o.foN
private NdidIdpVerificationFragment e;
@Override // android.content.DialogInterface.OnClickListener
public final void onClick(DialogInterface dialogInterface, int i) {
NdidIdpVerificationFragment.avR_(this.e, dialogInterface);
}
{
this.e = this;
}
}).show();
}
@Override // o.InterfaceC9484dkc
public final void d() {
if (getActivity() != null) {
getActivity().finish();
}
}
@Override // o.InterfaceC9484dkc
public final void a() {
FragmentActivity activity = getActivity();
if (activity != null) {
startActivity(ReviewInfoResultActivity.ajy_(getContext(), getString(R.string.ntb_fillinformation_review_info_result_title_page), getString(R.string.ntb_phone_not_supported_title), getString(R.string.mf_onboarding_eligibility_enquiry)));
activity.finish();
}
}
@OnClick
public void onNextClick() {
this.presenter.j();
}
@Override // o.InterfaceC9484dkc
public final void a(IK ik) {
if (getContext() != null) {
this.c.d(SensitiveCSentActivity.aaN_(getContext(), ik), null);
}
}
@Override // o.InterfaceC9484dkc
public final void b(String str) {
FragmentActivity activity = getActivity();
if (activity != null) {
this.d.d((Intent) IdpLivenessCheckActivity.e(new Object[]{activity, str}, 984263874, -984263874, (int) System.currentTimeMillis()), null);
}
}
@Override // o.InterfaceC9484dkc
public final void a(String str, String str2, ArrayList<String> arrayList) {
FragmentActivity activity = getActivity();
if (activity == null || gjJ.b((CharSequence) str)) {
return;
}
activity.startActivity(IdpShareInformationActivity.aiO_(activity, str, str2, arrayList));
}
@Override // o.InterfaceC9484dkc
public final void d(IF r3) {
if (getContext() != null) {
this.c.d(CrossMatchConsentActivity.aaH_(getContext(), r3), null);
}
}
@OnCheckedChanged
public void onConsentChecked(boolean z) {
this.btNext.setEnabled(z);
}
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
this.presenter.w_();
this.c.e();
this.d.e();
super.onDestroy();
}
public static /* synthetic */ C14866gag e(NdidIdpVerificationFragment ndidIdpVerificationFragment) {
ndidIdpVerificationFragment.presenter.a();
return C14866gag.c;
}
public static /* synthetic */ void avR_(NdidIdpVerificationFragment ndidIdpVerificationFragment, DialogInterface dialogInterface) {
dialogInterface.dismiss();
ndidIdpVerificationFragment.presenter.c();
}
public static /* synthetic */ void d(NdidIdpVerificationFragment ndidIdpVerificationFragment, Heg heg) {
if (-1 == heg.e) {
ndidIdpVerificationFragment.presenter.g();
}
}
public static /* synthetic */ void c(NdidIdpVerificationFragment ndidIdpVerificationFragment, Heg heg) {
if (-1 == heg.e) {
ndidIdpVerificationFragment.presenter.d();
}
}
}