导航菜单

页面标题

页面副标题

Easycash v3.75.13 - ECLiveRecognitionResultActivity.java 源代码

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

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


package com.lingyue.easycash.authentication.activity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.OnClick;
import com.fintopia.livenessdetection.facev5.models.LiveDetectionArgs;
import com.lingyue.easycash.R;
import com.lingyue.easycash.appconfig.EasycashConfigKey;
import com.lingyue.easycash.appconfig.GeneralConfigManager;
import com.lingyue.easycash.authentication.livecheck.AuthRecognitionInfoProcessor;
import com.lingyue.easycash.authentication.livecheck.BankCardRecognitionInfoProcessor;
import com.lingyue.easycash.authentication.livecheck.ChangePhoneNumberRecognitionInfoProcessor;
import com.lingyue.easycash.authentication.livecheck.CheckBillsAndRepaymentsRecognitionInfoProcessor;
import com.lingyue.easycash.authentication.livecheck.DeleteAccountRecognitionInfoProcessor;
import com.lingyue.easycash.authentication.livecheck.GetFacePhotoRecognitionInfoProcessor;
import com.lingyue.easycash.authentication.livecheck.MergeMobileRecognitionInfoProcessor;
import com.lingyue.easycash.authentication.livecheck.SecureCheckRecognitionInfoProcessor;
import com.lingyue.easycash.authentication.livecheck.SupplementProcessRecognitionInfoProcessor;
import com.lingyue.easycash.commom.EasyCashCommonActivity;
import com.lingyue.easycash.utils.AuthBackTipsDialogUtil;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.livecheck.RecognitionInfoProcessor;
import com.lingyue.idnbaselib.model.live.FaceIdCard;
import com.lingyue.supertoolkit.screen.IScreenShotProtectPage;
import com.lingyue.supertoolkit.widgets.BaseUtils;
import com.sensorsdata.analytics.android.autotrack.aop.SensorsDataAutoTrackHelper;
import com.sensorsdata.analytics.android.sdk.SensorsDataInstrumented;
import com.yangqianguan.statistics.AutoTrackHelper;
import io.reactivex.disposables.Disposable;
import java.util.Arrays;

public class ECLiveRecognitionResultActivity extends EasyCashCommonActivity implements IScreenShotProtectPage {
    private static String E = "faceIdCard";
    private FaceIdCard B;
    private LiveDetectionArgs C;
    private RecognitionInfoProcessor D;

    @BindView(R.id.btn_re_upload_identity_info)
    public Button btnReUploadIdentityInfo;

    @BindView(R.id.tv_result)
    public TextView tvResult;

    @BindView(R.id.tv_success_hint)
    public TextView tvSuccessHint;

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

    @SensorsDataInstrumented
    public void S(View view) {
        if (BaseUtils.l()) {
            SensorsDataAutoTrackHelper.trackViewOnClick(view);
            AutoTrackHelper.trackViewOnClick(view);
        } else {
            openCustomerService();
            SensorsDataAutoTrackHelper.trackViewOnClick(view);
            AutoTrackHelper.trackViewOnClick(view);
        }
    }

    private void T() {
        LiveDetectionArgs liveDetectionArgs = this.C;
        int i = liveDetectionArgs.purpose;
        if (i == 0) {
            this.D = new AuthRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
        } else if (i == 7) {
            this.D = new SupplementProcessRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
        } else if (i == 40000101) {
            this.D = new ChangePhoneNumberRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
        } else if (i == 2) {
            this.D = new SecureCheckRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
        } else if (i == 3) {
            this.D = new BankCardRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
        } else if (i != 4) {
            switch (i) {
                case 40000108:
                    this.D = new DeleteAccountRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
                    break;
                default:
                    switch (i) {
                        case 40000111:
                            this.D = new CheckBillsAndRepaymentsRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
                            break;
                    }
                case 40000109:
                    this.D = new MergeMobileRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
                    break;
            }
        } else {
            this.D = new GetFacePhotoRecognitionInfoProcessor(this, this.B, liveDetectionArgs);
        }
        this.D.a(false);
    }

    public static void startRecognitionResultActivityForResult(Activity activity, FaceIdCard faceIdCard, LiveDetectionArgs liveDetectionArgs) {
        Intent intent = new Intent(activity, (Class<?>) ECLiveRecognitionResultActivity.class);
        intent.putExtra(E, faceIdCard);
        intent.putExtra("live_detection_args", (Parcelable) liveDetectionArgs);
        activity.startActivityForResult(intent, ECLiveCheckPreviewSimpleActivity.REQUEST_CODE_FOR_LIVE_RECOGNITION_RESULT);
    }

    @Override
    protected void B(@NonNull Bundle bundle) {
        super.B(bundle);
        this.B = (FaceIdCard) bundle.getSerializable(E);
        this.C = bundle.getParcelable("live_detection_args");
        if (this.B == null) {
            finish();
        }
    }

    @Override
    protected void D() {
        R();
        if (this.C.purpose == 40000112) {
            this.tvResult.setText(R.string.ec_live_face_discern_success_in_merge);
        }
    }

    @Override
    protected void N(@NonNull Bundle bundle) {
        super.N(bundle);
        bundle.putSerializable(E, this.B);
        bundle.putParcelable("live_detection_args", this.C);
    }

    @Override
    @NonNull
    protected String O() {
        return this.C.mobilePhone;
    }

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

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

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

    public void onBackPressed() {
        if (this.C.purpose != 0 || this.userSession.b().canEnterMinimaListProcess) {
            super/*androidx.activity.ComponentActivity*/.onBackPressed();
        } else {
            AuthBackTipsDialogUtil.g(this, "2");
        }
    }

    @OnClick({R.id.btn_re_upload_identity_info})
    public void reUploadIdentityInfo(View view) {
        if (BaseUtils.l()) {
            return;
        }
        if (!this.userSession.f().authLivingFailedTryAllProcessAgain) {
            this.D.a(true);
        } else {
            setResult(10);
            finish();
        }
    }

    public void reportFullDisplayToSentry() {
        L();
    }

    @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();
        new GeneralConfigManager(this).y(Arrays.asList(EasycashConfigKey.AUTH_LIVING_FAILED_TRY_ALL_PROCESS_AGAIN));
        T();
    }
}