导航菜单

页面标题

页面副标题

Credmex v3.12.2 - KYCDocumentActivity.java 源代码

正在查看: Credmex v3.12.2 应用的 KYCDocumentActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.credmex.authentication.activity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.InputFilter;
import android.text.TextUtils;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.OnClick;
import com.credmex.AuthUtils;
import com.credmex.appconfig.GeneralConfigManager;
import com.credmex.authentication.helper.AutoJumpHelper;
import com.credmex.authentication.helper.QuitAuthHelper;
import com.credmex.authentication.kycinformation.IDCardPickComponent;
import com.credmex.commom.CommonActivity;
import com.credmex.models.CashBooleanResponse;
import com.credmex.models.CompleteKycInfoSingleton;
import com.credmex.models.GeneralConfigResponse;
import com.credmex.models.UserGlobal;
import com.credmex.models.response.AuthConfigResponse;
import com.credmex.models.response.GeneralConfigAndAuthConfigResponse;
import com.credmex.models.response.OCRPersonInfo;
import com.credmex.models.response.OCRResponse;
import com.credmex.net.CredMexObserver;
import com.credmex.net.CredMexResponseCode;
import com.credmex.net.IApiRoutes;
import com.credmex.track.ThirdPartEventUtils;
import com.credmex.track.ThirdPartTrackEvents;
import com.credmex.track.ThirdPartTrackLib;
import com.credmex.track.TrackEventParamsConfigurator;
import com.credmex.utils.AppUtil;
import com.credmex.utils.OcrTipsUtil;
import com.credmex.utils.YqdUtils;
import com.credmex.widght.dialog.CommonDialog;
import com.credmex.widght.dialog.DialogButtonListener;
import com.credmex.widght.editTextBridge.separator.IdentitySeparator;
import com.open.mx.ui.base.BaseComponent;
import com.open.mx.ui.base.BaseComponentPresenter;
import com.open.mx.ui.base.IBasePresenter;
import com.open.mx.ui.components.EditTextComponent;
import com.open.mx.ui.components.ItemPickComponent;
import com.open.mx.ui.components.TimePickComponent;
import com.open.mx.ui.event.ComponentEvent;
import com.open.mx.ui.event.ComponentEventCenter;
import com.open.mx.ui.model.LabelBean;
import com.open.mx.ui.presenter.DataFetcher;
import com.open.mx.ui.presenter.pickhold.SinglePickHolder;
import com.open.mx.ui.views.button.PrimaryButton;
import com.open.mxbaselib.sentrybusiness.ISentryBusinessEventAutoFinish;
import com.veda.android.bananalibrary.infrastructure.BaseActivity;
import com.veda.supertoolkit.customtools.CollectionUtils;
import com.veda.supertoolkit.filetools.FilePathUtil;
import com.veda.supertoolkit.lifecycle.LifecycleEvent;
import com.veda.supertoolkit.utils.FormatUtil;
import com.veda.supertoolkit.widgets.BaseUtils;
import com.veda.supertoolkit.widgets.CharFilterForMeiZu;
import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.BiFunction;
import io.reactivex.functions.Consumer;
import io.sentry.SpanStatus;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import retrofit2.Response;

public class KYCDocumentActivity extends AuthHandleAutoJumpActivity implements ISentryBusinessEventAutoFinish {
    private List<TextView> H = new ArrayList();
    private AutoJumpHelper I;
    private AutoJumpHelper J;
    private AutoJumpHelper K;
    private AutoJumpHelper R;
    private AutoJumpHelper S;
    private AutoJumpHelper T;
    private AutoJumpHelper U;
    private boolean V;
    protected boolean W;
    private String X;
    private IBasePresenter<CommonActivity> Y;

    @BindView(2131361915)
    TimePickComponent<CommonActivity> birthdayComponent;

    @BindView(2131361937)
    PrimaryButton btnConfirm;

    @BindView(2131362107)
    EditTextComponent<CommonActivity> curpComponent;

    @BindView(2131362190)
    EditTextComponent<CommonActivity> fatherLastNameComponent;

    @BindView(2131362226)
    ItemPickComponent<CommonActivity> genderPickComponent;

    @BindView(2131362229)
    EditTextComponent<CommonActivity> giveNameComponent;

    @BindView(2131362276)
    IDCardPickComponent idCardPickComponent;

    @BindView(2131362445)
    LinearLayout llAuthTip;

    @BindView(2131362492)
    LinearLayout llContent;

    @BindView(2131362489)
    LinearLayout llInputItems;

    @BindView(2131362522)
    LinearLayout llPrivacy;

    @BindView(2131362586)
    EditTextComponent<CommonActivity> motherLastNameComponent;

    @BindView(2131362627)
    EditTextComponent<CommonActivity> nssTitleComponent;

    @BindView(2131362983)
    TextView tvAuthTip;

    @BindView(2131363159)
    TextView tvPrivacy;

    private void J0() {
        this.H.add(this.giveNameComponent.l0());
        this.H.add(this.genderPickComponent.l0());
        this.H.add(this.birthdayComponent.l0());
        this.H.add(this.curpComponent.l0());
    }

    private boolean K0() {
        if (!this.genderPickComponent.k()) {
            showErrorToast(2131821135);
            this.genderPickComponent.b0();
            return false;
        }
        if (this.birthdayComponent.k()) {
            return true;
        }
        showErrorToast(2131821125);
        this.birthdayComponent.b0();
        return false;
    }

    private boolean L0(boolean z) {
        String trimmedResult = this.curpComponent.getTrimmedResult();
        if (TextUtils.isEmpty(this.curpComponent.getTrimmedResult())) {
            if (z) {
                this.curpComponent.b0();
            }
            return false;
        }
        if (trimmedResult.length() == 18 && FormatUtil.a(trimmedResult)) {
            return true;
        }
        if (z) {
            showErrorToast(2131821119);
            this.curpComponent.b0();
        } else {
            this.curpComponent.q0(getResources().getString(2131821119));
        }
        return false;
    }

    private boolean M0() {
        if (this.giveNameComponent.k()) {
            return true;
        }
        showErrorToast(2131821122);
        this.giveNameComponent.b0();
        return false;
    }

    private boolean N0() {
        if (this.nssTitleComponent.getResult().trim().isEmpty() || this.nssTitleComponent.getResult().trim().length() == 11) {
            return true;
        }
        showErrorToast(2131820848);
        return false;
    }

    private boolean O0() {
        if (TextUtils.isEmpty(this.idCardPickComponent.getFrontUrl())) {
            showErrorToast(2131821138);
            return false;
        }
        if (!this.userSession.f().isShowBackOfIdCard || !TextUtils.isEmpty(this.idCardPickComponent.getBackUrl())) {
            return true;
        }
        showErrorToast(2131821137);
        return false;
    }

    private boolean P0() {
        return this.idCardPickComponent.k();
    }

    public void Q0() {
        jumpToWebPage(Uri.parse(((BaseActivity) this).appGlobal.a.a().toString()).buildUpon().path("webview/prohibit-repetition").build().toString());
    }

    private void S0() {
        InputFilter[] inputFilterArr = {new InputFilter.AllCaps(), CharFilterForMeiZu.a(), new InputFilter.LengthFilter(80)};
        this.giveNameComponent.setFilters(inputFilterArr);
        this.fatherLastNameComponent.setFilters(inputFilterArr);
        this.motherLastNameComponent.setFilters(inputFilterArr);
    }

    private void U0() {
        ThirdPartEventUtils.f(this.giveNameComponent.F0());
        ThirdPartEventUtils.f(this.fatherLastNameComponent.F0());
        ThirdPartEventUtils.f(this.motherLastNameComponent.F0());
    }

    public void V0(ComponentEvent componentEvent) throws Exception {
        if (Objects.equals(componentEvent.componentId, this.curpComponent.f())) {
            L0(false);
        } else if (Objects.equals(componentEvent.componentId, this.idCardPickComponent.f())) {
            r1();
        }
        configureBtnConfirmEnable();
    }

    public void W0(Date date) {
        this.S.d();
    }

    public void X0(List list) {
        if (this.idCardPickComponent.k() && this.userSession.f().ocrAvailable) {
            o1(this.idCardPickComponent.getFrontUrl());
        }
    }

    public void Y0(String str) {
        L0(false);
        this.T.d();
    }

    public void Z0(String str) {
        this.I.d();
    }

    public void a1(String str) {
        this.J.d();
    }

    public void b1(String str) {
        this.K.d();
    }

    public void c1(ItemPickComponent itemPickComponent, DataFetcher.FetchCallBack fetchCallBack) {
        ArrayList arrayList = new ArrayList();
        arrayList.add(new LabelBean(getString(2131820961), String.valueOf(0)));
        arrayList.add(new LabelBean(getString(2131821374), String.valueOf(1)));
        fetchCallBack.onSuccess(arrayList);
    }

    public void d1(List list) {
        this.R.d();
    }

    public void e1(String str) {
        this.U.d();
    }

    public static void f1(Map map) {
        map.put(ThirdPartTrackEvents.UserAuth.Keys.POSITION, "kyc_gson");
        map.put(ThirdPartTrackEvents.UserAuth.Keys.DATA_TYPE, "kyc");
    }

    public void g1(Dialog dialog) {
        this.idCardPickComponent.T0();
        dialog.dismiss();
    }

    public void h1() {
        this.V = false;
        this.W = false;
        this.X = "";
        t1();
        this.idCardPickComponent.setIsAllowSelectPicture(this.V);
    }

    public void i1(AuthConfigResponse.AuthStepAttribute authStepAttribute) {
        if (authStepAttribute != null) {
            this.V = authStepAttribute.allowUploadPicture;
            this.W = authStepAttribute.showAgreement;
            this.X = authStepAttribute.agreementContent;
        }
        t1();
        this.idCardPickComponent.setIsAllowSelectPicture(this.V);
    }

    public void j1() {
        this.userSession.f().isShowNssItemInKyc = false;
        this.userSession.f().isShowBackOfIdCard = true;
        q1(8);
        R0();
    }

    private void m1(List<GeneralConfigResponse.ConfigsBean> list) {
        if (CollectionUtils.a(list)) {
            return;
        }
        for (GeneralConfigResponse.ConfigsBean configsBean : list) {
            if (!TextUtils.isEmpty(configsBean.configName)) {
                String str = configsBean.configName;
                str.hashCode();
                if (str.equals("app_config.nss_show_switch")) {
                    this.userSession.f().isShowNssItemInKyc = Boolean.parseBoolean(configsBean.configValue);
                } else if (str.equals("app_config.kyc_show_id_card_back_side_switch")) {
                    this.userSession.f().isShowBackOfIdCard = Boolean.parseBoolean(configsBean.configValue);
                }
            }
        }
    }

    private void n1() {
        showLoadingDialog();
        Observable.O(((IApiRoutes) this.apiHelper.a()).M(134217728L), ((IApiRoutes) this.apiHelper.a()).T0(GeneralConfigManager.o()), new BiFunction() {
            public final Object apply(Object obj, Object obj2) {
                return new GeneralConfigAndAuthConfigResponse((Response) obj, (Response) obj2);
            }
        }).a(new Observer<GeneralConfigAndAuthConfigResponse>() {
            public void onNext(@NonNull GeneralConfigAndAuthConfigResponse generalConfigAndAuthConfigResponse) {
                if (generalConfigAndAuthConfigResponse == null) {
                    KYCDocumentActivity.this.onZipRequestError();
                    return;
                }
                GeneralConfigResponse generalConfigResponse = generalConfigAndAuthConfigResponse.generalConfigResponse;
                if (generalConfigResponse == null || !generalConfigResponse.isSuccess()) {
                    KYCDocumentActivity.super.errorResponse(generalConfigAndAuthConfigResponse.generalConfigResponse);
                    KYCDocumentActivity.this.j1();
                } else {
                    KYCDocumentActivity.this.k1(generalConfigAndAuthConfigResponse.generalConfigResponse.body.configs);
                }
                AuthConfigResponse authConfigResponse = generalConfigAndAuthConfigResponse.authConfigResponse;
                if (authConfigResponse == null || !authConfigResponse.isSuccess()) {
                    KYCDocumentActivity.super.errorResponse(generalConfigAndAuthConfigResponse.authConfigResponse);
                    KYCDocumentActivity.this.h1();
                } else {
                    KYCDocumentActivity.this.i1(generalConfigAndAuthConfigResponse.authConfigResponse.body.authStepAttribute);
                }
                KYCDocumentActivity.this.dismissLoadingDialog();
                KYCDocumentActivity.this.reportFullyDisplayed();
            }

            public void onError(@NonNull Throwable th) {
                KYCDocumentActivity.this.onZipRequestError();
            }

            public void onSubscribe(@NonNull Disposable disposable) {
                KYCDocumentActivity.super.onSubscribe(disposable);
            }

            public void onComplete() {
            }
        });
    }

    private void o1(String str) {
        if (TextUtils.isEmpty(str)) {
            return;
        }
        showLoadingDialog();
        ((IApiRoutes) this.apiHelper.a()).h1(str).a(new CredMexObserver<OCRResponse>(this) {
            @Override
            public void onError(Throwable th, OCRResponse oCRResponse) {
                super.onError(th, (Throwable) oCRResponse);
                KYCDocumentActivity.this.s1();
            }

            public void onSuccess(OCRResponse oCRResponse) {
                KYCDocumentActivity.this.dismissLoadingDialog();
                if (!oCRResponse.body.success) {
                    KYCDocumentActivity.this.s1();
                    return;
                }
                ThirdPartTrackLib.d(KYCDocumentActivity.this, ThirdPartTrackEvents.UserAuth.MEX_VERIFY_OCR_SUCCESS);
                KYCDocumentActivity.this.u1(oCRResponse.body.data);
                if (OcrTipsUtil.a(KYCDocumentActivity.this)) {
                    KYCDocumentActivity.this.showErrorToast(2131820744);
                }
            }
        });
    }

    public void onZipRequestError() {
        dismissLoadingDialog();
        reportFullyDisplayed();
        j1();
        h1();
        BaseUtils.e(getApplicationContext(), getString(2131821037));
    }

    private void q1(int i2) {
        this.nssTitleComponent.setVisibility(i2);
    }

    private void r1() {
        this.llInputItems.setVisibility(this.idCardPickComponent.k() ? 0 : 8);
    }

    public void s1() {
        if (AppUtil.c(this)) {
            CommonDialog.CommonDialogBuilder.c(this).e().j(getString(2131821331)).n(getString(2131821151), new DialogButtonListener() {
                @Override
                public final void a(Dialog dialog) {
                    KYCDocumentActivity.this.g1(dialog);
                }
            }).l(getString(2131820962), new com.credmex.activity.b()).q("dialog_orc_error").a().show();
        }
    }

    public static void startKYCDocumentActivity(Activity activity) {
        activity.startActivity(new Intent(activity, (Class<?>) KYCDocumentActivity.class));
    }

    public void u1(OCRPersonInfo oCRPersonInfo) {
        if (!TextUtils.isEmpty(oCRPersonInfo.givenName)) {
            this.giveNameComponent.E0(oCRPersonInfo.givenName);
        }
        if (!TextUtils.isEmpty(oCRPersonInfo.fatherLastName)) {
            this.fatherLastNameComponent.E0(oCRPersonInfo.fatherLastName);
        }
        if (!TextUtils.isEmpty(oCRPersonInfo.motherLastName)) {
            this.motherLastNameComponent.E0(oCRPersonInfo.motherLastName);
        }
        Integer num = oCRPersonInfo.sex;
        if (num != null) {
            this.genderPickComponent.u0(new LabelBean[]{num.intValue() == 0 ? new LabelBean(getString(2131820961), String.valueOf(0)) : new LabelBean(getString(2131821374), String.valueOf(1))});
        }
        if (!TextUtils.isEmpty(oCRPersonInfo.birthday)) {
            this.birthdayComponent.setDate(FormatUtil.g(oCRPersonInfo.birthday));
        }
        if (TextUtils.isEmpty(oCRPersonInfo.idNo)) {
            return;
        }
        this.curpComponent.E0(oCRPersonInfo.idNo);
    }

    private void v1() {
        if (O0() && M0() && K0() && L0(true) && N0()) {
            p1();
        }
    }

    @Override
    protected void D() {
        super.D();
        n1();
    }

    @Override
    protected void G(@androidx.annotation.NonNull Bundle bundle) {
        super.G(bundle);
        this.birthdayComponent.j(bundle);
        this.idCardPickComponent.j(bundle);
        this.curpComponent.j(bundle);
        this.giveNameComponent.j(bundle);
        this.fatherLastNameComponent.j(bundle);
        this.motherLastNameComponent.j(bundle);
        this.nssTitleComponent.j(bundle);
        this.genderPickComponent.v(bundle);
        this.V = bundle.getBoolean("IS_ALLOW_SELECT_PICTURE", this.V);
        this.W = bundle.getBoolean("IS_SHOW_PRIVACY", this.W);
        this.X = bundle.getString("PRIVACY_CONTENT", this.X);
    }

    protected String I0(int i2) {
        return i2 == 0 ? "男" : "女";
    }

    @Override
    @SuppressLint({"CheckResult"})
    protected void J() {
        super.J();
        this.Y = new BaseComponentPresenter(this);
        duringActive(ComponentEventCenter.d().c(this)).W(new Consumer() {
            public final void accept(Object obj) {
                KYCDocumentActivity.this.V0((ComponentEvent) obj);
            }
        }, new com.credmex.activity.x2());
        this.birthdayComponent.setPresenter(this.Y);
        this.birthdayComponent.setTimePickTitle(getString(2131820625));
        this.birthdayComponent.setTrackSource("R.id.tv_birthday");
        this.birthdayComponent.c(new BaseComponent.ComponentDoneListener() {
            public final void a(Object obj) {
                KYCDocumentActivity.this.W0((Date) obj);
            }
        });
        this.idCardPickComponent.setPresenter(this.Y);
        this.idCardPickComponent.setTrackSource("R.id.tv_take_photo");
        this.idCardPickComponent.c(new BaseComponent.ComponentDoneListener() {
            public final void a(Object obj) {
                KYCDocumentActivity.this.X0((List) obj);
            }
        });
        this.curpComponent.setPresenter(this.Y);
        this.curpComponent.setTrackSource("R.id.iet_curp");
        this.curpComponent.F0().setFilters(new InputFilter[]{new InputFilter.AllCaps(), new InputFilter.LengthFilter(20)});
        new IdentitySeparator().h(this.curpComponent.F0());
        this.curpComponent.c(new BaseComponent.ComponentDoneListener() {
            public final void a(Object obj) {
                KYCDocumentActivity.this.Y0((String) obj);
            }
        });
        this.giveNameComponent.setPresenter(this.Y);
        this.giveNameComponent.setTrackSource("R.id.et_given_name");
        this.giveNameComponent.F0().setInputType(96);
        this.giveNameComponent.c(new BaseComponent.ComponentDoneListener() {
            public final void a(Object obj) {
                KYCDocumentActivity.this.Z0((String) obj);
            }
        });
        this.fatherLastNameComponent.setPresenter(this.Y);
        this.fatherLastNameComponent.setTrackSource("R.id.et_father_last_name");
        this.fatherLastNameComponent.F0().setInputType(96);
        this.fatherLastNameComponent.c(new BaseComponent.ComponentDoneListener() {
            public final void a(Object obj) {
                KYCDocumentActivity.this.a1((String) obj);
            }
        });
        this.motherLastNameComponent.setPresenter(this.Y);
        this.motherLastNameComponent.setTrackSource("R.id.et_mother_last_name");
        this.motherLastNameComponent.F0().setInputType(96);
        this.motherLastNameComponent.c(new BaseComponent.ComponentDoneListener() {
            public final void a(Object obj) {
                KYCDocumentActivity.this.b1((String) obj);
            }
        });
        this.genderPickComponent.setPresenter(this.Y);
        this.genderPickComponent.setTrackSource("R.id.tv_gender");
        this.genderPickComponent.setDataFetcher(new DataFetcher() {
            public final void a(ItemPickComponent itemPickComponent, DataFetcher.FetchCallBack fetchCallBack) {
                KYCDocumentActivity.this.c1(itemPickComponent, fetchCallBack);
            }
        });
        this.genderPickComponent.c(new BaseComponent.ComponentDoneListener() {
            public final void a(Object obj) {
                KYCDocumentActivity.this.d1((List) obj);
            }
        });
        this.genderPickComponent.setPickHolder(new SinglePickHolder(getString(2131820786), "R.id.tv_gender"));
        this.nssTitleComponent.setPresenter(this.Y);
        this.nssTitleComponent.setTrackSource("R.id.et_nss");
        this.nssTitleComponent.F0().setInputType(2);
        this.nssTitleComponent.c(new BaseComponent.ComponentDoneListener() {
            public final void a(Object obj) {
                KYCDocumentActivity.this.e1((String) obj);
            }
        });
        this.nssTitleComponent.setMaxLength(11);
        this.nssTitleComponent.F0().setHint(2131821048);
        S0();
    }

    @Override
    protected void K() {
        super.K();
        J0();
        U0();
        configureBtnConfirmEnable();
        this.llAuthTip.setVisibility(TextUtils.isEmpty(this.authUtil.y()) ? 8 : 0);
        this.tvAuthTip.setText(this.authUtil.y());
    }

    protected void R0() {
        if (this.userSession.f().isShowBackOfIdCard) {
            this.idCardPickComponent.setPickCardType(IDCardPickComponent.IdCardPickType.ALL);
        } else {
            this.idCardPickComponent.setPickCardType(IDCardPickComponent.IdCardPickType.ID_CARD_FRONT);
        }
    }

    protected void T0() {
        if (this.userSession.f().isShowNssItemInKyc) {
            q1(0);
        } else {
            q1(8);
        }
    }

    @Override
    protected void X(@androidx.annotation.NonNull Bundle bundle) {
        super.X(bundle);
        this.birthdayComponent.v(bundle);
        this.idCardPickComponent.v(bundle);
        this.curpComponent.v(bundle);
        this.giveNameComponent.v(bundle);
        this.fatherLastNameComponent.v(bundle);
        this.motherLastNameComponent.v(bundle);
        this.nssTitleComponent.v(bundle);
        this.genderPickComponent.v(bundle);
        bundle.putBoolean("IS_ALLOW_SELECT_PICTURE", this.V);
        bundle.putBoolean("IS_SHOW_PRIVACY", this.W);
        bundle.putString("PRIVACY_CONTENT", this.X);
    }

    public void configureBtnConfirmEnable() {
        this.btnConfirm.setEnabled(YqdUtils.e(this.H) && P0());
    }

    @Override
    protected void e0() {
        this.T = new AutoJumpHelper(this) {
            @Override
            public boolean a() {
                return KYCDocumentActivity.this.curpComponent.k();
            }

            @Override
            public void g() {
                KYCDocumentActivity.this.curpComponent.b0();
            }
        };
        this.I = new AutoJumpHelper(this) {
            @Override
            public boolean a() {
                return KYCDocumentActivity.this.giveNameComponent.k();
            }

            @Override
            public void g() {
                KYCDocumentActivity.this.giveNameComponent.b0();
            }
        };
        this.J = new AutoJumpHelper(this) {
            @Override
            public boolean a() {
                return KYCDocumentActivity.this.fatherLastNameComponent.k();
            }

            @Override
            public void g() {
                KYCDocumentActivity.this.fatherLastNameComponent.b0();
            }
        };
        this.K = new AutoJumpHelper(this) {
            @Override
            public boolean a() {
                return KYCDocumentActivity.this.motherLastNameComponent.k();
            }

            @Override
            public void g() {
                KYCDocumentActivity.this.motherLastNameComponent.b0();
            }
        };
        this.R = new AutoJumpHelper(this) {
            @Override
            public boolean a() {
                return KYCDocumentActivity.this.genderPickComponent.k();
            }

            @Override
            public void g() {
                KYCDocumentActivity.this.genderPickComponent.b0();
            }
        };
        this.S = new AutoJumpHelper(this) {
            @Override
            public boolean a() {
                return KYCDocumentActivity.this.birthdayComponent.k();
            }

            @Override
            public void g() {
                KYCDocumentActivity.this.birthdayComponent.b0();
            }
        };
        this.U = new AutoJumpHelper(this) {
            @Override
            public boolean a() {
                return KYCDocumentActivity.this.nssTitleComponent.k();
            }

            @Override
            public void g() {
                if (KYCDocumentActivity.this.userSession.f().isShowNssItemInKyc) {
                    KYCDocumentActivity.this.nssTitleComponent.b0();
                }
            }
        };
        this.T.f(this.I);
        this.I.f(this.J);
        this.J.f(this.K);
        this.K.f(this.R);
        this.R.f(this.S);
        this.S.f(this.U);
    }

    @Override
    public View getContentView() {
        return this.llContent;
    }

    @Override
    public int getLayoutID() {
        return 2131558661;
    }

    @Override
    protected boolean i0() {
        return this.birthdayComponent.l() && this.idCardPickComponent.l() && this.curpComponent.l() && this.giveNameComponent.l() && this.fatherLastNameComponent.l() && this.motherLastNameComponent.l() && this.genderPickComponent.l() && this.nssTitleComponent.l();
    }

    protected void k1(List<GeneralConfigResponse.ConfigsBean> list) {
        m1(list);
        T0();
        R0();
        this.idCardPickComponent.setIsAllowSelectPicture(this.V);
    }

    @Override
    protected void l0() {
        this.D.f();
    }

    protected void l1() {
        String str;
        UserGlobal d = this.userSession.d();
        Object[] objArr = new Object[3];
        objArr[0] = this.giveNameComponent.getResult().trim();
        String str2 = "";
        if (TextUtils.isEmpty(this.fatherLastNameComponent.getResult().trim())) {
            str = "";
        } else {
            str = " " + this.fatherLastNameComponent.getResult().trim();
        }
        objArr[1] = str;
        if (!TextUtils.isEmpty(this.motherLastNameComponent.getResult().trim())) {
            str2 = " " + this.motherLastNameComponent.getResult().trim();
        }
        objArr[2] = str2;
        d.userName = FormatUtil.h("{0}{1}{2}", objArr);
        this.authUtil.t(this, new AuthUtils.DefaultAuthCallBack(this));
    }

    @Override
    public void onBackPressed() {
        this.G = true;
        QuitAuthHelper.n(this.authUtil, this.userSession.f().quitAuthDialogInfo, this);
    }

    @Override
    protected void onCreate(Bundle bundle) {
        businessTransaction("UserAuthOrder");
        super.onCreate(bundle);
    }

    @Override
    protected void onDestroy() {
        FilePathUtil.d(this);
        super.onDestroy();
    }

    @Override
    protected void onResume() {
        super.onResume();
        r1();
        t1();
    }

    protected void p1() {
        showLoadingDialog();
        HashMap hashMap = new HashMap();
        hashMap.put(CompleteKycInfoSingleton.ID_FRONT_IMAGE_KEY, this.idCardPickComponent.getFrontUrl());
        if (!TextUtils.isEmpty(this.idCardPickComponent.getBackUrl())) {
            hashMap.put("idBackImage", this.idCardPickComponent.getBackUrl());
        }
        hashMap.put(CompleteKycInfoSingleton.GIVEN_NAME_KEY, this.giveNameComponent.getResult().trim());
        hashMap.put(CompleteKycInfoSingleton.FATHER_LAST_NAME_KEY, this.fatherLastNameComponent.getResult().trim());
        hashMap.put(CompleteKycInfoSingleton.MOTHER_LAST_NAME_KEY, this.motherLastNameComponent.getResult().trim());
        hashMap.put(CompleteKycInfoSingleton.SEX_KEY, I0(Integer.parseInt(this.genderPickComponent.v0().value)));
        hashMap.put(CompleteKycInfoSingleton.BIRTHDAY_KEY, FormatUtil.q((Date) this.birthdayComponent.getResult()));
        hashMap.put("idNo", this.curpComponent.getTrimmedResult());
        hashMap.put("nss", this.nssTitleComponent.getResult().trim());
        String t2 = ((BaseActivity) this).gson.t(hashMap);
        if (TextUtils.isEmpty(t2)) {
            ThirdPartTrackLib.e(this, ThirdPartTrackEvents.UserAuth.REQUEST_NULL, new TrackEventParamsConfigurator() {
                @Override
                public final void a(Map map) {
                    KYCDocumentActivity.f1(map);
                }
            });
        }
        ((IApiRoutes) this.apiHelper.a()).A(t2).a(new CredMexObserver<CashBooleanResponse>(this) {
            public void onSuccess(CashBooleanResponse cashBooleanResponse) {
                KYCDocumentActivity.this.dismissLoadingDialog();
                KYCDocumentActivity.this.businessTransaction("UserAuthOrder").n(SpanStatus.OK);
                KYCDocumentActivity.this.l1();
            }

            @Override
            public void onError(Throwable th, CashBooleanResponse cashBooleanResponse) {
                super.onError(th, (Throwable) cashBooleanResponse);
                KYCDocumentActivity.this.businessTransaction("UserAuthOrder").b(SpanStatus.INTERNAL_ERROR);
                if (cashBooleanResponse.status.code == CredMexResponseCode.DUPLICATE_CURP.code) {
                    KYCDocumentActivity.this.Q0();
                }
            }
        });
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnCreated(@androidx.annotation.NonNull Runnable runnable) {
        return com.veda.supertoolkit.lifecycle.i.a(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnDestroy(@androidx.annotation.NonNull Runnable runnable) {
        return com.veda.supertoolkit.lifecycle.i.b(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnEvent(@androidx.annotation.NonNull LifecycleEvent lifecycleEvent, @Nullable Runnable runnable) {
        return com.veda.supertoolkit.lifecycle.i.c(this, lifecycleEvent, runnable);
    }

    @OnClick({2131361937})
    public void submitDocuments() {
        if (BaseUtils.b()) {
            return;
        }
        v1();
    }

    protected void t1() {
        this.llPrivacy.setVisibility(8);
    }

    @Override
    protected void j0() {
    }
}