导航菜单

页面标题

页面副标题

Easycash v3.75.13 - EcIdCardConfirmNewActivity.java 源代码

正在查看: Easycash v3.75.13 应用的 EcIdCardConfirmNewActivity.java JAVA 源代码文件

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


package com.lingyue.easycash.authentication.activity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.InputFilter;
import android.text.TextUtils;
import android.text.method.DigitsKeyListener;
import android.view.MotionEvent;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.widget.NestedScrollView;
import butterknife.BindView;
import butterknife.OnClick;
import com.bigkoo.pickerview.TimePickerView;
import com.fintopia.lender.module.utils.LocationHelper;
import com.fintopia.lender.widget.PickViewHelper;
import com.fintopia.livenessdetection.facev5.models.LiveDetectionArgs;
import com.google.android.material.imageview.ShapeableImageView;
import com.lingyue.easycash.AuthUtils;
import com.lingyue.easycash.R;
import com.lingyue.easycash.activity.launch.PermissionSwitchConfigHelper;
import com.lingyue.easycash.appconfig.GeneralConfigDataRepository;
import com.lingyue.easycash.authentication.AuthBusinessProcessor;
import com.lingyue.easycash.commom.EasyCashCommonActivity;
import com.lingyue.easycash.models.AwardStepType;
import com.lingyue.easycash.models.enums.EventErrorCode;
import com.lingyue.easycash.models.enums.EventStep;
import com.lingyue.easycash.models.enums.IdCardDisplayType;
import com.lingyue.easycash.models.ktp.MergeAccountCheckResponse;
import com.lingyue.easycash.models.ktp.MergeAccountCheckResult;
import com.lingyue.easycash.models.response.UploadIdentityInfoResponse;
import com.lingyue.easycash.models.reupload.ReUploadDocumentsInfo;
import com.lingyue.easycash.models.survey.UserSatisfactionSurveyScene;
import com.lingyue.easycash.utils.AuthBackTipsDialogUtil;
import com.lingyue.easycash.utils.EasycashUmengEvent;
import com.lingyue.easycash.utils.GiftAwardOperationUtil;
import com.lingyue.easycash.utils.SensorTrackEvent;
import com.lingyue.easycash.viewholder.ConfirmKTPInformationDialogViewHolder;
import com.lingyue.easycash.widght.AuthGeneralView;
import com.lingyue.easycash.widght.AuthGeneralViewV2;
import com.lingyue.easycash.widght.BaseAuthGeneralView;
import com.lingyue.easycash.widght.EasycashSingleButtonDialog;
import com.lingyue.easycash.widght.FullScreenDialog;
import com.lingyue.easycash.widght.PickViewHelper;
import com.lingyue.easycash.widght.survey.ECSurveyUtils;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.model.IdnBaseResult;
import com.lingyue.idnbaselib.model.IdnObserver;
import com.lingyue.idnbaselib.model.MediaRegisterAwardResponse;
import com.lingyue.idnbaselib.model.live.LiveDetectionEvent;
import com.lingyue.idnbaselib.utils.DevUtil;
import com.lingyue.idnbaselib.utils.EcFormatUtil;
import com.lingyue.idnbaselib.utils.FieldRuleUtils;
import com.lingyue.idnbaselib.utils.JsonParamsBuilder;
import com.lingyue.idnbaselib.utils.SmoothScrollUtils;
import com.lingyue.idnbaselib.utils.TextViewUtil;
import com.lingyue.idnbaselib.utils.ThirdPartEventUtils;
import com.lingyue.supertoolkit.formattools.DateFormatUtil;
import com.lingyue.supertoolkit.permissiontools.permission.PermissionGranted;
import com.lingyue.supertoolkit.screen.IScreenShotProtectPage;
import com.lingyue.supertoolkit.widgets.BaseUtils;
import com.lingyue.supertoolkit.widgets.CharFilterForMeiZu;
import com.sensorsdata.analytics.android.autotrack.aop.SensorsDataAutoTrackHelper;
import com.sensorsdata.analytics.android.sdk.SensorsDataInstrumented;
import com.veda.android.imageloaderlib.IImageLoader;
import com.veda.android.imageloaderlib.Imager;
import com.yangqianguan.statistics.AutoTrackHelper;
import com.yangqianguan.statistics.annotation.NonDataTrack;
import io.reactivex.Flowable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Predicate;
import io.reactivex.schedulers.Schedulers;
import io.sentry.ITransaction;
import io.sentry.Sentry;
import io.sentry.SpanStatus;
import java.net.ConnectException;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;

public class EcIdCardConfirmNewActivity extends EasyCashCommonActivity implements IScreenShotProtectPage {
    public static String ID_CARD = "idCard";
    public static String ITEM_NAME = "item_name";
    public static String MOTHER_NAME = "motherName";
    public static String NAME = "name";
    private String B;
    private String C;
    private String D;
    private boolean E = true;
    private boolean F;
    private Date G;
    private ECSurveyUtils H;
    private FullScreenDialog I;
    private PermissionSwitchConfigHelper J;
    private Long K;
    private ITransaction L;

    @BindView(R.id.agv_birthday)
    AuthGeneralView agvBirthday;

    @BindView(R.id.agv_id_card)
    AuthGeneralViewV2 agvIdCard;

    @BindView(R.id.agv_mother_name)
    AuthGeneralView agvMotherName;

    @BindView(R.id.agv_name)
    AuthGeneralView agvName;

    @BindView(R.id.rl_award_content)
    RelativeLayout rlAwardContent;

    @BindView(2131363222)
    NestedScrollView scrollView;

    @BindView(R.id.siv_award_content)
    ShapeableImageView sivAwardContent;

    @BindView(R.id.tv_award_content)
    TextView tvAwardContent;

    static class AnonymousClass7 {
        static final int[] a;

        static {
            int[] iArr = new int[MergeAccountCheckResult.values().length];
            a = iArr;
            try {
                iArr[MergeAccountCheckResult.NO_NEED_MERGE.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                a[MergeAccountCheckResult.NEED_MERGE.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
        }
    }

    private void A0(final AuthGeneralView authGeneralView) {
        if (authGeneralView == null) {
            return;
        }
        authGeneralView.setOnFocusListener(new BaseAuthGeneralView.OnFocusListener() {
            @Override
            public final void a() {
                EcIdCardConfirmNewActivity.this.G0(authGeneralView);
            }
        });
    }

    private void B0(final AuthGeneralViewV2 authGeneralViewV2) {
        if (authGeneralViewV2 == null) {
            return;
        }
        authGeneralViewV2.setOnFocusListener(new BaseAuthGeneralView.OnFocusListener() {
            @Override
            public final void a() {
                EcIdCardConfirmNewActivity.this.I0(authGeneralViewV2);
            }
        });
    }

    public String C0(Date date) {
        return date == null ? "" : DateFormatUtil.b(this.G);
    }

    private void D0() {
        A0(this.agvName);
        B0(this.agvIdCard);
        A0(this.agvMotherName);
    }

    private void E0() {
        this.a.setVisibility(this.userSession.f().showCustomerService ? 0 : 8);
        this.a.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                EcIdCardConfirmNewActivity.this.K0(view);
            }
        });
    }

    public void F0(AuthGeneralView authGeneralView) {
        SmoothScrollUtils.c(this.scrollView, authGeneralView);
    }

    public void G0(final AuthGeneralView authGeneralView) {
        this.scrollView.postDelayed(new Runnable() {
            @Override
            public final void run() {
                EcIdCardConfirmNewActivity.this.F0(authGeneralView);
            }
        }, 300L);
    }

    public void H0(AuthGeneralViewV2 authGeneralViewV2) {
        SmoothScrollUtils.c(this.scrollView, authGeneralViewV2);
    }

    public void I0(final AuthGeneralViewV2 authGeneralViewV2) {
        this.scrollView.postDelayed(new Runnable() {
            @Override
            public final void run() {
                EcIdCardConfirmNewActivity.this.H0(authGeneralViewV2);
            }
        }, 300L);
    }

    public void J0() {
        this.J.b();
    }

    @SensorsDataInstrumented
    public void K0(View view) {
        if (BaseUtils.l()) {
            SensorsDataAutoTrackHelper.trackViewOnClick(view);
            AutoTrackHelper.trackViewOnClick(view);
            return;
        }
        openCustomerService();
        ThirdPartEventUtils.t("auth_ktp_comfirm_csc_click");
        logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_CSC_CLICK);
        SensorsDataAutoTrackHelper.trackViewOnClick(view);
        AutoTrackHelper.trackViewOnClick(view);
    }

    public void L0() {
        SmoothScrollUtils.c(this.scrollView, this.agvMotherName);
    }

    public void M0() {
        this.scrollView.postDelayed(new Runnable() {
            @Override
            public final void run() {
                EcIdCardConfirmNewActivity.this.L0();
            }
        }, 300L);
    }

    public boolean N0(View view, MotionEvent motionEvent) {
        if (motionEvent.getAction() != 1) {
            return false;
        }
        if (!view.hasFocus()) {
            view.requestFocus();
        }
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put(ITEM_NAME, ID_CARD);
        logSensorEventWithParams(SensorTrackEvent.EC_KTP_CONFIRM_INPUT, hashMap);
        return false;
    }

    @SensorsDataInstrumented
    public void O0(View view) {
        this.agvIdCard.getEtContent().requestFocus();
        SensorsDataAutoTrackHelper.trackViewOnClick(view);
        AutoTrackHelper.trackViewOnClick(view);
    }

    public boolean P0(View view, MotionEvent motionEvent) {
        if (motionEvent.getAction() != 1) {
            return false;
        }
        if (!view.hasFocus()) {
            view.requestFocus();
        }
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put(ITEM_NAME, MOTHER_NAME);
        logSensorEventWithParams(SensorTrackEvent.EC_KTP_CONFIRM_INPUT, hashMap);
        return false;
    }

    @SensorsDataInstrumented
    public void Q0(View view) {
        this.agvMotherName.getEtContent().requestFocus();
        SensorsDataAutoTrackHelper.trackViewOnClick(view);
        AutoTrackHelper.trackViewOnClick(view);
    }

    public String R0(String str) {
        return (TextUtils.isEmpty(str) || str.length() >= 3) ? "" : getString(R.string.easycash_enter_correct_mom_name);
    }

    public boolean S0(View view, MotionEvent motionEvent) {
        if (motionEvent.getAction() != 1) {
            return false;
        }
        if (!view.hasFocus()) {
            view.requestFocus();
        }
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put(ITEM_NAME, NAME);
        logSensorEventWithParams(SensorTrackEvent.EC_KTP_CONFIRM_INPUT, hashMap);
        return false;
    }

    @SensorsDataInstrumented
    public static void T0(AuthGeneralView authGeneralView, View view) {
        authGeneralView.getEtContent().requestFocus();
        SensorsDataAutoTrackHelper.trackViewOnClick(view);
        AutoTrackHelper.trackViewOnClick(view);
    }

    public void U0(final String str, Activity activity, final FullScreenDialog fullScreenDialog, View view, Object obj) {
        ConfirmKTPInformationDialogViewHolder confirmKTPInformationDialogViewHolder = new ConfirmKTPInformationDialogViewHolder(view);
        if (this.F) {
            confirmKTPInformationDialogViewHolder.tvBirthdayTitle.setVisibility(0);
            confirmKTPInformationDialogViewHolder.tvBirthday.setVisibility(0);
            confirmKTPInformationDialogViewHolder.vBirthday.setVisibility(0);
            confirmKTPInformationDialogViewHolder.tvBirthday.setText(DateFormatUtil.d(this.G));
        } else {
            confirmKTPInformationDialogViewHolder.tvBirthdayTitle.setVisibility(8);
            confirmKTPInformationDialogViewHolder.tvBirthday.setVisibility(8);
            confirmKTPInformationDialogViewHolder.vBirthday.setVisibility(8);
        }
        confirmKTPInformationDialogViewHolder.tvKtpName.setText(this.C);
        confirmKTPInformationDialogViewHolder.tvNik.setText(EcFormatUtil.h(this.B));
        confirmKTPInformationDialogViewHolder.tvCancel.setOnClickListener(new View.OnClickListener() {
            @Override
            @NonDataTrack
            @SensorsDataInstrumented
            public void onClick(View view2) {
                fullScreenDialog.dismiss();
                EcIdCardConfirmNewActivity.this.E = false;
                AutoTrackHelper.trackViewOnClick(view2, "dialog_ktp_show_conform");
                EcIdCardConfirmNewActivity.this.logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_INFORMATION_UPDATE);
                SensorsDataAutoTrackHelper.trackViewOnClick(view2);
            }
        });
        confirmKTPInformationDialogViewHolder.tvConfirm.setOnClickListener(new View.OnClickListener() {
            @Override
            @NonDataTrack
            @SensorsDataInstrumented
            public void onClick(View view2) {
                fullScreenDialog.dismiss();
                EcIdCardConfirmNewActivity.this.E = false;
                AutoTrackHelper.trackViewOnClick(view2, "dialog_ktp_show_conform");
                EcIdCardConfirmNewActivity ecIdCardConfirmNewActivity = EcIdCardConfirmNewActivity.this;
                String str2 = ecIdCardConfirmNewActivity.C;
                String str3 = EcIdCardConfirmNewActivity.this.B;
                EcIdCardConfirmNewActivity ecIdCardConfirmNewActivity2 = EcIdCardConfirmNewActivity.this;
                ecIdCardConfirmNewActivity.f1(str2, str3, ecIdCardConfirmNewActivity2.C0(ecIdCardConfirmNewActivity2.G), str);
                EcIdCardConfirmNewActivity.this.logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_INFORMATION_OK);
                SensorsDataAutoTrackHelper.trackViewOnClick(view2);
            }
        });
    }

    public void V0(DialogInterface dialogInterface) {
        logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_INFORMATION_SHOW);
    }

    public void W0(View view, Date date) {
        this.agvBirthday.setContentText(DateFormatUtil.d(date));
        this.G = date;
    }

    public static void X0(Activity activity, FullScreenDialog fullScreenDialog, View view, TimePickerView timePickerView) {
        timePickerView.r(false);
        Calendar calendar = Calendar.getInstance();
        Calendar calendar2 = Calendar.getInstance();
        Calendar calendar3 = Calendar.getInstance();
        calendar.add(1, 100);
        calendar2.add(1, -100);
        int i = calendar.get(1);
        Date time = calendar3.getTime();
        timePickerView.t(calendar2.get(1), i);
        timePickerView.w(time);
    }

    public void Y0(String str, DialogInterface dialogInterface, int i) {
        c1(str);
        dialogInterface.dismiss();
        logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_MERGE_DLG_CLICK);
    }

    public static boolean Z0(Integer num) throws Exception {
        return num.intValue() == 1;
    }

    public void a1(Integer num) throws Exception {
        renderMomNameView(this.userSession.f().authKtpMomNameCheck);
    }

    public void c1(String str) {
        Bundle bundle = new Bundle();
        bundle.putString("verifyUserId", str);
        bundle.putString("idNo", this.B);
        bundle.putString("userName", this.C);
        ECLiveCheckPreviewActivity.startECLiveCheckPreviewActivityForResult(this, new LiveDetectionArgs(40000112, this.userSession.b().mobileNumber, bundle));
    }

    private void d1() {
        String trim = this.agvName.getEtContent().getText().toString().trim();
        this.C = trim;
        if (TextUtils.isEmpty(trim)) {
            j1(R.string.please_input_name);
            showSoftInput(this.agvName.getEtContent());
            l1(EventStep.KTP_NAME_CHECK_B, EventErrorCode.EMPTY, getString(R.string.please_input_name));
            return;
        }
        if (this.C.matches(".*\\d.*")) {
            j1(2131886780);
            showSoftInput(this.agvName.getEtContent());
            l1(EventStep.KTP_NAME_CHECK_B, EventErrorCode.CONTAINS_NUMBER, getString(2131886780));
            return;
        }
        String trimmedText = this.agvIdCard.getTrimmedText();
        this.B = trimmedText;
        if (TextUtils.isEmpty(trimmedText)) {
            j1(R.string.please_input_id_card_number);
            showSoftInput(this.agvIdCard.getEtContent());
            l1(EventStep.KTP_ID_CHECK_B, EventErrorCode.EMPTY, getString(R.string.please_input_id_card_number));
            return;
        }
        if (!FieldRuleUtils.c(this.B)) {
            j1(R.string.error_format_id_card);
            showSoftInput(this.agvIdCard.getEtContent());
            l1(EventStep.KTP_ID_CHECK_B, EventErrorCode.FORMAT_ERROR, getString(R.string.error_format_id_card));
            return;
        }
        if (this.F && this.G == null) {
            j1(R.string.easycash_please_input_birth_date);
            SmoothScrollUtils.c(this.scrollView, this.agvBirthday);
            this.agvBirthday.postDelayed(new Runnable() {
                @Override
                public final void run() {
                    EcIdCardConfirmNewActivity.this.i1();
                }
            }, 500L);
            l1(EventStep.KTP_BIRTHDATE_CHECK_B, EventErrorCode.EMPTY, getString(R.string.easycash_please_input_birth_date));
            return;
        }
        String trim2 = this.agvMotherName.getEtContent().getText().toString().trim();
        if (TextUtils.isEmpty(trim2)) {
            j1(R.string.please_input_mother_name);
            showSoftInput(this.agvMotherName.getEtContent());
            l1(EventStep.KTP_MOTHER_NAME_CHECK_B, EventErrorCode.EMPTY, getString(R.string.please_input_mother_name));
        } else if (this.userSession.f().authKtpMomNameCheck && trim2.length() < 3) {
            j1(R.string.easycash_enter_correct_mom_name);
            showSoftInput(this.agvMotherName.getEtContent());
            l1(EventStep.KTP_MOTHER_NAME_CHECK_B, EventErrorCode.FORMAT_ERROR, getString(R.string.easycash_enter_correct_mom_name));
        } else if (this.E) {
            h1(trim2);
        } else {
            f1(this.C, this.B, C0(this.G), trim2);
        }
    }

    public void e1(UploadIdentityInfoResponse.UploadIdentityInfo uploadIdentityInfo, String str) {
        if (uploadIdentityInfo.success) {
            this.userSession.b().userName = str;
            if (!uploadIdentityInfo.canMergeAccount) {
                this.authUtil.T(this, new AuthUtils.DefaultAuthCallBack(this));
                return;
            }
            dismissLoadingDialog();
            jumpToWebPage(Uri.parse(this.appGlobal.a.a().toString()).buildUpon().path("webview/merge-mobile").appendQueryParameter("reqSpeBar", "1").appendQueryParameter("isAppBarHid", "1").appendQueryParameter("mobileNumber", this.userSession.b().mobileNumber).appendQueryParameter("mustEnterMergeAccount", String.valueOf(uploadIdentityInfo.mustEnterMergeAccount)).build().toString());
            finish();
        }
    }

    public void f1(final String str, final String str2, final String str3, final String str4) {
        showLoadingDialog();
        this.apiHelper.a().G1(str2, str).K(AndroidSchedulers.a()).a(new IdnObserver<MergeAccountCheckResponse>(this) {
            @Override
            public void onError(Throwable th, MergeAccountCheckResponse mergeAccountCheckResponse) {
                super.onError(th, (Throwable) mergeAccountCheckResponse);
                if (th instanceof ConnectException) {
                    return;
                }
                IdnBaseResult.Status status = mergeAccountCheckResponse.status;
                DevUtil.b(th, status != null ? status.formatErrorMessageString() : "");
            }

            @Override
            public void onSuccess(MergeAccountCheckResponse mergeAccountCheckResponse) {
                int i = AnonymousClass7.a[MergeAccountCheckResult.fromName(mergeAccountCheckResponse.body.result).ordinal()];
                if (i == 1) {
                    EcIdCardConfirmNewActivity.this.g1(str, str2, str3, str4);
                    return;
                }
                if (i != 2) {
                    return;
                }
                EcIdCardConfirmNewActivity.this.dismissLoadingDialog();
                MergeAccountCheckResponse.MergeAccountCheckBody mergeAccountCheckBody = mergeAccountCheckResponse.body;
                if (!mergeAccountCheckBody.showConfirmDialog) {
                    EcIdCardConfirmNewActivity.this.c1(mergeAccountCheckBody.targetOldUserId);
                } else {
                    ?? r0 = EcIdCardConfirmNewActivity.this;
                    r0.k1(r0, mergeAccountCheckBody.rawText, mergeAccountCheckBody.targetOldUserId);
                }
            }
        });
    }

    public void g1(final String str, String str2, String str3, String str4) {
        showLoadingDialog();
        HashMap hashMap = new HashMap();
        hashMap.put("idNo", str2);
        hashMap.put("name", str);
        hashMap.put(ReUploadDocumentsInfo.FRONT_IMAGE, this.D);
        hashMap.put("motherLastName", str4);
        if (!TextUtils.isEmpty(str3)) {
            hashMap.put("birthdayByUser", str3);
        }
        this.apiHelper.a().n2(this.gson.t(hashMap)).K(AndroidSchedulers.a()).a(new IdnObserver<UploadIdentityInfoResponse>(this) {
            @Override
            public void onError(Throwable th, UploadIdentityInfoResponse uploadIdentityInfoResponse) {
                super.onError(th, (Throwable) uploadIdentityInfoResponse);
                ThirdPartEventUtils.z(EcIdCardConfirmNewActivity.this, EasycashUmengEvent.U1, new JsonParamsBuilder().d("code").a(String.valueOf(uploadIdentityInfoResponse.status.code)).d("detail").a(String.valueOf(uploadIdentityInfoResponse.status.detail)).c());
                EcIdCardConfirmNewActivity.this.dismissLoadingDialog();
                EcIdCardConfirmNewActivity.this.L.a("errorCode", "2000");
                EcIdCardConfirmNewActivity.this.L.a("errorMessage", uploadIdentityInfoResponse.status.formatErrorMessageString());
                EcIdCardConfirmNewActivity.this.L.o(SpanStatus.INTERNAL_ERROR);
                EcIdCardConfirmNewActivity ecIdCardConfirmNewActivity = EcIdCardConfirmNewActivity.this;
                ecIdCardConfirmNewActivity.logNextStepResult(ecIdCardConfirmNewActivity.L.getName(), "2000", uploadIdentityInfoResponse.status.formatErrorMessageString());
            }

            @Override
            public void onSuccess(UploadIdentityInfoResponse uploadIdentityInfoResponse) {
                EcIdCardConfirmNewActivity.this.e1(uploadIdentityInfoResponse.body, str);
                EcIdCardConfirmNewActivity.this.L.o(SpanStatus.OK);
                EcIdCardConfirmNewActivity ecIdCardConfirmNewActivity = EcIdCardConfirmNewActivity.this;
                ecIdCardConfirmNewActivity.logNextStepResult(ecIdCardConfirmNewActivity.L.getName(), null, null);
            }
        });
    }

    private void h1(final String str) {
        FullScreenDialog a = new FullScreenDialog.Builder(this).d(R.layout.easycash_dialog_confirm_ktp_card_info).b(new FullScreenDialog.IFullScreenDialogInitCallBack() {
            @Override
            public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
                EcIdCardConfirmNewActivity.this.U0(str, activity, fullScreenDialog, view, obj);
            }
        }).a();
        a.setOnShowListener(new DialogInterface.OnShowListener() {
            @Override
            public final void onShow(DialogInterface dialogInterface) {
                EcIdCardConfirmNewActivity.this.V0(dialogInterface);
            }
        });
        a.show();
    }

    public void i1() {
        if (this.I == null) {
            this.I = PickViewHelper.b(this, String.valueOf(this.agvBirthday.getId()), new PickViewHelper.TimeSelectionCallBack() {
                public final void b(View view, Date date) {
                    EcIdCardConfirmNewActivity.this.W0(view, date);
                }
            }, new FullScreenDialog.IFullScreenDialogInitCallBack() {
                @Override
                public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
                    EcIdCardConfirmNewActivity.X0(activity, fullScreenDialog, view, (TimePickerView) obj);
                }
            });
        }
        this.I.show();
    }

    private void j1(int i) {
        try {
            BaseUtils.p(this, getResources().getString(i));
        } catch (Resources.NotFoundException unused) {
        }
    }

    public void k1(Activity activity, String str, final String str2) {
        EasycashSingleButtonDialog.d(activity).h(str).n(R.string.easycash_warm_reminder).l(new EasycashSingleButtonDialog.OnDialogButtonClickListener() {
            @Override
            public final void onClick(DialogInterface dialogInterface, int i) {
                EcIdCardConfirmNewActivity.this.Y0(str2, dialogInterface, i);
            }
        }).f(2131886194).show();
        logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_MERGE_DLG_SHOW);
    }

    private void l1(EventStep eventStep, EventErrorCode eventErrorCode, String str) {
        ThirdPartEventUtils.D(this, EasycashUmengEvent.w3, new JsonParamsBuilder().d("step").a(eventStep.name().toLowerCase()).d("errorCode").a(eventErrorCode.name().toLowerCase()).d("errorMessage").a(str).c());
        this.L.a("errorCode", "2004");
        this.L.a("errorMessage", str);
        this.L.o(SpanStatus.INTERNAL_ERROR);
        logNextStepResult(this.L.getName(), "2004", str);
    }

    private void m1() {
        if (this.userSession.f().isSubsequentGainAuthSwitch) {
            duringActive((Flowable) GeneralConfigDataRepository.d().c(), false).C(new Predicate() {
                public final boolean test(Object obj) {
                    boolean Z0;
                    Z0 = EcIdCardConfirmNewActivity.Z0((Integer) obj);
                    return Z0;
                }
            }).o0(1L).l0(Schedulers.c()).Q(AndroidSchedulers.a()).g0(new Consumer() {
                public final void accept(Object obj) {
                    EcIdCardConfirmNewActivity.this.a1((Integer) obj);
                }
            }, new Consumer() {
                public final void accept(Object obj) {
                    DevUtil.a((Throwable) obj);
                }
            });
        }
    }

    private boolean n1(Runnable runnable) {
        ECSurveyUtils eCSurveyUtils = this.H;
        if (eCSurveyUtils != null) {
            return eCSurveyUtils.y(runnable);
        }
        return false;
    }

    public void processAwardContentResponse(MediaRegisterAwardResponse.Body body) {
        if (TextUtils.isEmpty(body.pageShowDes)) {
            this.rlAwardContent.setVisibility(8);
            return;
        }
        this.tvAwardContent.setText(TextViewUtil.a(body.pageShowDes, body.pageSpecialDes, getResources().getColor(2131099780), 1));
        Imager.a().c(this, body.pageImageUrl, this.sivAwardContent, new IImageLoader.IImageLoaderListener<String>() {
            @Override
            public boolean b(Exception exc, String str) {
                EcIdCardConfirmNewActivity.this.sivAwardContent.setImageResource(R.drawable.easycash_banner_media_register_auth_award);
                ThirdPartEventUtils.z(EcIdCardConfirmNewActivity.this, EasycashUmengEvent.i2, new JsonParamsBuilder().d("step").a(AwardStepType.KTP.name()).c());
                return true;
            }

            @Override
            public boolean a(String str) {
                return false;
            }
        });
        this.sivAwardContent.setVisibility(0);
        this.rlAwardContent.setVisibility(0);
        ThirdPartEventUtils.z(this, EasycashUmengEvent.h2, new JsonParamsBuilder().d("step").a(AwardStepType.KTP.name()).d("operational_activity").a("big_gift_package_event").c());
    }

    public static void startIdCardConfirmNewActivity(Activity activity, String str, String str2, String str3, boolean z2, Long l) {
        Intent intent = new Intent(activity, (Class<?>) EcIdCardConfirmNewActivity.class);
        intent.putExtra("frontKey", str);
        intent.putExtra("identity_name", str2);
        intent.putExtra("identity_id_card_number", str3);
        intent.putExtra("show_birth_date", z2);
        intent.putExtra("birthday", l == null ? null : String.valueOf(l));
        activity.startActivity(intent);
    }

    @Override
    protected void B(@NonNull Bundle bundle) {
        super.B(bundle);
        this.D = bundle.getString("frontKey");
        this.C = bundle.getString("identity_name");
        this.B = bundle.getString("identity_id_card_number");
        this.F = bundle.getBoolean("show_birth_date");
        String string = bundle.getString("birthday");
        if (TextUtils.isEmpty(string)) {
            return;
        }
        this.K = Long.valueOf(string);
    }

    @Override
    protected void D() {
        super.D();
        ThirdPartEventUtils.A(this, this.agvName.getEtContent(), EasycashUmengEvent.h);
        ThirdPartEventUtils.A(this, this.agvIdCard.getEtContent(), EasycashUmengEvent.i);
        E0();
        renderNameView(this.agvName);
        renderMomNameView(this.userSession.f().authKtpMomNameCheck);
        this.agvName.getEtContent().setImeOptions(5);
        this.agvMotherName.getEtContent().setImeOptions(6);
        this.agvMotherName.setOnFocusListener(new BaseAuthGeneralView.OnFocusListener() {
            @Override
            public final void a() {
                EcIdCardConfirmNewActivity.this.M0();
            }
        });
        this.agvBirthday.setVisibility(this.F ? 0 : 8);
        if (this.F && this.K != null) {
            Date date = new Date(this.K.longValue());
            this.G = date;
            this.agvBirthday.setContentText(DateFormatUtil.d(date));
        }
        renderIdCardView();
        D0();
        AuthBusinessProcessor.a().e(this);
    }

    @Override
    protected void N(@NonNull Bundle bundle) {
        super.N(bundle);
        bundle.putString("frontKey", this.D);
        bundle.putString("identity_name", this.C);
        bundle.putString("identity_id_card_number", this.B);
        bundle.putBoolean("show_birth_date", this.F);
        Long l = this.K;
        bundle.putString("birthday", l == null ? null : String.valueOf(l));
    }

    @OnClick({R.id.agv_birthday})
    public void chooseDatePickView() {
        if (BaseUtils.l()) {
            return;
        }
        i1();
    }

    @Override
    public int getLayoutID() {
        return R.layout.easycash_activity_confirm_personal_info_new;
    }

    @Override
    public String getTrackUrl() {
        return j0.b.a(this);
    }

    @Override
    public boolean isNeedProcessScreenShot() {
        return j0.a.a(this);
    }

    public void logNextStepResult(String str, String str2, @Nullable String str3) {
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put("entry_page", str);
        if (str2 != null) {
            hashMap.put("reason", str2);
        }
        if (!TextUtils.isEmpty(str3)) {
            hashMap.put("error_cause", str3);
        }
        logSensorEventWithParams(SensorTrackEvent.EC_AUTH_NEXT_STEP_RESULT, hashMap);
    }

    @PermissionGranted({"android.permission.ACCESS_COARSE_LOCATION"})
    protected void onAccessCoarseLocation() {
        LocationHelper.d().j();
    }

    @Override
    protected void onActivityResult(int i, int i2, Intent intent) {
        if (i != 1003) {
            super.onActivityResult(i, i2, intent);
            return;
        }
        if (i2 != -1) {
            super.onActivityResult(i, i2, intent);
            return;
        }
        LiveDetectionEvent liveDetectionEvent = (LiveDetectionEvent) intent.getSerializableExtra(ECLiveCheckPreviewActivity.KEY_LIVE_DETECTION_RESULT);
        if (liveDetectionEvent == null) {
            finish();
            return;
        }
        if (liveDetectionEvent.result) {
            finish();
            return;
        }
        IdnBaseResult.Status status = liveDetectionEvent.idnBaseResult.status;
        if (status == null || TextUtils.isEmpty(status.detail)) {
            return;
        }
        BaseUtils.p(this, liveDetectionEvent.idnBaseResult.status.detail);
        EcIdCardPreviewActivity.startEcIdCardPreviewActivity(this, IdCardDisplayType.fromName(this.userSession.f().ktpDisplayType));
        finish();
    }

    public void onBackPressed() {
        ThirdPartEventUtils.t("auth_ktp_comfirm_back_click");
        logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_BACK);
        if (n1(new Runnable() {
            @Override
            public final void run() {
                EcIdCardConfirmNewActivity.this.finish();
            }
        })) {
            return;
        }
        AuthBackTipsDialogUtil.g(this, "1");
    }

    @Override
    protected void onResume() {
        super.onResume();
        ThirdPartEventUtils.t("auth_ktp_comfirm_expose");
        logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_SHOW);
    }

    @OnClick({2131361988})
    public void onViewClicked(View view) {
        if (BaseUtils.l()) {
            return;
        }
        ThirdPartEventUtils.y(this, EasycashUmengEvent.c);
        ThirdPartEventUtils.t("auth_ktp_comfirm_next_click");
        this.L = Sentry.C("auth_ktp_comfirm_next_click_result", "monitor");
        d1();
        logSensorEvent(SensorTrackEvent.EC_KTP_CONFIRM_OK);
    }

    public void renderIdCardView() {
        this.agvIdCard.getEtContent().setKeyListener(DigitsKeyListener.getInstance("0123456789"));
        this.agvIdCard.setFormatter(new BaseAuthGeneralView.Formatter() {
            @Override
            public final String a(String str) {
                return EcFormatUtil.h(str);
            }
        });
        this.agvIdCard.getEtContent().setFilters(new InputFilter[]{new InputFilter.LengthFilter(18)});
        this.agvIdCard.getEtContent().setOnTouchListener(new View.OnTouchListener() {
            @Override
            public final boolean onTouch(View view, MotionEvent motionEvent) {
                boolean N0;
                N0 = EcIdCardConfirmNewActivity.this.N0(view, motionEvent);
                return N0;
            }
        });
        this.agvIdCard.getIvRight().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                EcIdCardConfirmNewActivity.this.O0(view);
            }
        });
        this.agvIdCard.getEtContent().setImeOptions(5);
    }

    public void renderMomNameView(boolean z2) {
        this.agvMotherName.getEtContent().setFilters(new InputFilter[]{z2 ? CharFilterForMeiZu.c() : CharFilterForMeiZu.b()});
        this.agvMotherName.getEtContent().setInputType(524433);
        this.agvMotherName.getEtContent().setTypeface(Typeface.defaultFromStyle(1));
        this.agvMotherName.getEtContent().setOnTouchListener(new View.OnTouchListener() {
            @Override
            public final boolean onTouch(View view, MotionEvent motionEvent) {
                boolean P0;
                P0 = EcIdCardConfirmNewActivity.this.P0(view, motionEvent);
                return P0;
            }
        });
        this.agvMotherName.getIvRight().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                EcIdCardConfirmNewActivity.this.Q0(view);
            }
        });
        if (z2) {
            this.agvMotherName.setCallBack(new BaseAuthGeneralView.CallBack() {
                @Override
                public final String a(String str) {
                    String R0;
                    R0 = EcIdCardConfirmNewActivity.this.R0(str);
                    return R0;
                }
            });
        }
    }

    public void renderNameView(final AuthGeneralView authGeneralView) {
        authGeneralView.getEtContent().setFilters(new InputFilter[]{CharFilterForMeiZu.b()});
        authGeneralView.getEtContent().setInputType(524433);
        authGeneralView.getEtContent().setTypeface(Typeface.defaultFromStyle(1));
        authGeneralView.getEtContent().setOnTouchListener(new View.OnTouchListener() {
            @Override
            public final boolean onTouch(View view, MotionEvent motionEvent) {
                boolean S0;
                S0 = EcIdCardConfirmNewActivity.this.S0(view, motionEvent);
                return S0;
            }
        });
        authGeneralView.getIvRight().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                EcIdCardConfirmNewActivity.T0(AuthGeneralView.this, view);
            }
        });
    }

    @Override
    public Disposable runOnActiveEvent(Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.a(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnCreated(@NonNull Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.b(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnDestroy(@NonNull Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.c(this, runnable);
    }

    @Override
    @SuppressLint({"CheckResult"})
    public Disposable runOnEvent(@NonNull LifecycleEvent lifecycleEvent, @Nullable Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.d(this, lifecycleEvent, runnable);
    }

    @Override
    public Disposable runOnEvents(@NonNull LifecycleEvent[] lifecycleEventArr, @Nullable Runnable runnable) {
        return com.lingyue.idnbaselib.framework.lifecycle.m.e(this, lifecycleEventArr, runnable);
    }

    @Override
    protected void z() {
        super.z();
        m1();
        PermissionSwitchConfigHelper permissionSwitchConfigHelper = new PermissionSwitchConfigHelper(this);
        this.J = permissionSwitchConfigHelper;
        permissionSwitchConfigHelper.a(null);
        new Handler().postDelayed(new Runnable() {
            @Override
            public final void run() {
                EcIdCardConfirmNewActivity.this.J0();
            }
        }, 1000L);
        this.agvName.getEtContent().setText(this.C);
        if (!TextUtils.isEmpty(this.C)) {
            this.agvName.getTvHintTop().setVisibility(0);
        }
        this.agvIdCard.getEtContent().setText(this.B);
        if (!TextUtils.isEmpty(this.B)) {
            this.agvIdCard.getTvHintTop().setVisibility(0);
        }
        GiftAwardOperationUtil.a(AwardStepType.KTP.name(), this, true, new GiftAwardOperationUtil.GiftAwardCallback() {
            @Override
            public void b(MediaRegisterAwardResponse mediaRegisterAwardResponse) {
                EcIdCardConfirmNewActivity.this.processAwardContentResponse(mediaRegisterAwardResponse.body);
            }

            @Override
            public void a() {
            }
        });
        ECSurveyUtils eCSurveyUtils = new ECSurveyUtils(this, UserSatisfactionSurveyScene.SCENE_ID_VERIFICATION);
        this.H = eCSurveyUtils;
        eCSurveyUtils.A();
        L();
    }
}