导航菜单

页面标题

页面副标题

OVO v3.139.0 - HVDocReviewActivity.java 源代码

正在查看: OVO v3.139.0 应用的 HVDocReviewActivity.java JAVA 源代码文件

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


package co.hyperverge.hypersnapsdk.activities;

import android.animation.AnimatorSet;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import androidx.core.widget.ContentLoadingProgressBar;
import co.hyperverge.hypersnapsdk.activities.HVDocReviewActivity;
import com.google.android.material.bottomsheet.b;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.search.c;
import com.google.firebase.firestore.core.FirestoreClient;
import java.io.File;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import o.i.c4c;
import o.i.djj;
import o.i.dri;
import o.i.fvi;
import o.i.krj;
import o.i.n7c;
import o.i.ph6;
import o.i.vg6;
import o.i.x31;
import o.i.yg6;
import o.i.z1d;
import org.json.JSONObject;
import ovo.id.base.utils.StringWrapper;
import ovo.id.billpayment.ui.presentation.contact.screen.ContactPhoneActivity;
import ovo.id.billpayment.ui.presentation.form.telcoprepaid.screen.TelcoPrepaidFormPayBillActivity;
import ovo.id.kyc.liveness.ui.presentation.fragment.SelfieUploadFragment;
import ovo.id.kyc.upgrade.base.domain.entity.model.ErrorRavierDialogModel;
import ovo.id.kyc.upgrade.base.hyperverge.entity.response.LivenessData;
import ovo.id.kyc.upgrade.sdk.ui.presentation.fragment.IdCardProfileConfirmationFragment;
import ovo.id.user.profile.presentation.profile.ProfileFragment;
import ovo.id.wallet.payment.partner.ui.presentation.PaymentPartnerCodeErrorFragment;
import ovo.id.wallet.payment.partner.ui.presentation.utils.PaymentCodeError;

public class HVDocReviewActivity extends c {
    public static final int Z = 0;
    public ImageView I;
    public FloatingActionButton J;
    public FloatingActionButton K;
    public CardView L;
    public ContentLoadingProgressBar M;
    public TextView N;
    public TextView O;
    public TextView P;
    public TextView Q;
    public TextView R;
    public TextView S;
    public float V;
    public double W;
    public yg6 X;
    public final krj G = new krj();
    public final krj H = new krj();
    public String T = "";
    public String U = "";
    public final ExecutorService Y = Executors.newSingleThreadExecutor();

    @Override
    public final vg6 B0() {
        return this.X;
    }

    @Override
    public final void E0() {
        setResult(5);
        finish();
    }

    @Override
    public final boolean F0() {
        return false;
    }

    @Override
    public final void I0() {
    }

    public final void J0(boolean z) {
        this.M.setVisibility(z ? 0 : 8);
        this.R.setVisibility(z ? 4 : 0);
        this.Q.setVisibility(z ? 4 : 0);
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        krj krjVar = this.G;
        krjVar.c();
        setContentView(n7c.hv_activity_doc_review);
        Intent intent = getIntent();
        this.T = intent.getStringExtra("imageUri");
        this.W = intent.getDoubleExtra("extraPadding", 0.0d);
        this.V = intent.getFloatExtra("aspectRatio", 0.0f);
        this.X = (yg6) intent.getSerializableExtra(yg6.KEY);
        final int i = 0;
        intent.getIntExtra("viewWidth", 0);
        intent.getIntExtra("viewHeight", 0);
        if (this.X.isShouldReadQR()) {
            this.U = intent.getStringExtra("qrCodeCroppedImageUri");
        }
        if (intent.hasExtra("retryMessage")) {
            intent.getStringExtra("retryMessage");
        }
        this.I = (ImageView) findViewById(c4c.review_image);
        this.N = (TextView) findViewById(c4c.desc_text);
        this.O = (TextView) findViewById(c4c.title_text);
        this.P = (TextView) findViewById(c4c.tvSubtitle);
        this.Q = (TextView) findViewById(c4c.hv_confirm_button);
        this.R = (TextView) findViewById(c4c.hv_retake_button);
        this.L = (CardView) findViewById(c4c.cvPdfPageSwitcher);
        this.J = findViewById(c4c.fabPrevious);
        this.K = findViewById(c4c.fabNext);
        this.S = (TextView) findViewById(c4c.tvPage);
        this.M = (ContentLoadingProgressBar) findViewById(c4c.clProgressBar);
        this.Q.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                int i2 = i;
                Object obj = this;
                switch (i2) {
                    case 0:
                        HVDocReviewActivity hVDocReviewActivity = (HVDocReviewActivity) obj;
                        int i3 = HVDocReviewActivity.Z;
                        hVDocReviewActivity.getClass();
                        Intent intent2 = new Intent();
                        intent2.putExtra("imageUri", hVDocReviewActivity.T);
                        if (hVDocReviewActivity.X.isShouldReadQR()) {
                            intent2.putExtra("qrCodeCroppedImageUri", hVDocReviewActivity.U);
                        }
                        intent2.putExtra("timeTakenToClickConfirmButton", hVDocReviewActivity.H.b().longValue());
                        hVDocReviewActivity.setResult(7, intent2);
                        hVDocReviewActivity.finish();
                        break;
                    case 1:
                        vn9 vn9Var = (vn9) obj;
                        int i4 = vn9.r;
                        vk7.f(vn9Var, "this$0");
                        vn9Var.p.invoke();
                        vn9Var.dismiss();
                        break;
                    case 2:
                        TelcoPrepaidFormPayBillActivity telcoPrepaidFormPayBillActivity = (TelcoPrepaidFormPayBillActivity) obj;
                        int i5 = TelcoPrepaidFormPayBillActivity.w0;
                        vk7.f(telcoPrepaidFormPayBillActivity, "this$0");
                        telcoPrepaidFormPayBillActivity.k1().R(telcoPrepaidFormPayBillActivity.j1(), (List) null);
                        break;
                    case 3:
                        SelfieUploadFragment selfieUploadFragment = (SelfieUploadFragment) obj;
                        int i6 = SelfieUploadFragment.n;
                        vk7.f(selfieUploadFragment, "this$0");
                        LivenessData livenessData = selfieUploadFragment.k;
                        Uri parse = Uri.parse(livenessData != null ? livenessData.getFullImageUri() : null);
                        pvd Z2 = selfieUploadFragment.Z();
                        vk7.e(parse, "livenessImageUri");
                        Z2.x(parse, selfieUploadFragment.k);
                        break;
                    default:
                        PaymentCodeError.ActionMetadata actionMetadata = (PaymentCodeError.ActionMetadata) obj;
                        int i7 = PaymentPartnerCodeErrorFragment.h;
                        vk7.f(actionMetadata, "$actionMeta");
                        actionMetadata.b.invoke();
                        break;
                }
            }
        });
        this.R.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                int i2 = i;
                Object obj = this;
                switch (i2) {
                    case 0:
                        HVDocReviewActivity hVDocReviewActivity = (HVDocReviewActivity) obj;
                        int i3 = HVDocReviewActivity.Z;
                        hVDocReviewActivity.getClass();
                        if (djj.e().i() && djj.e().h != null) {
                            djj.e().h.s0();
                        }
                        Intent intent2 = new Intent();
                        intent2.putExtra("timeTakenToClickRetakeButton", hVDocReviewActivity.H.b().longValue());
                        hVDocReviewActivity.setResult(6, intent2);
                        hVDocReviewActivity.finish();
                        break;
                    case 1:
                        ugf ugfVar = (ugf) obj;
                        int i4 = ContactPhoneActivity.K;
                        vk7.f(ugfVar, "$this_with");
                        ugfVar.v.setText("");
                        break;
                    case 2:
                        fdd fddVar = (fdd) obj;
                        int i5 = fdd.s;
                        vk7.f(fddVar, "this$0");
                        fddVar.dismiss();
                        break;
                    case 3:
                        TelcoPrepaidFormPayBillActivity telcoPrepaidFormPayBillActivity = (TelcoPrepaidFormPayBillActivity) obj;
                        int i6 = TelcoPrepaidFormPayBillActivity.w0;
                        vk7.f(telcoPrepaidFormPayBillActivity, "this$0");
                        if (lc2.a(telcoPrepaidFormPayBillActivity, "android.permission.READ_CONTACTS") == 0) {
                            telcoPrepaidFormPayBillActivity.Z.a(z8.c(telcoPrepaidFormPayBillActivity, ContactPhoneActivity.class, (fxa[]) null), null);
                            break;
                        } else {
                            telcoPrepaidFormPayBillActivity.Y.a("android.permission.READ_CONTACTS", null);
                            break;
                        }
                    case 4:
                        IdCardProfileConfirmationFragment idCardProfileConfirmationFragment = (IdCardProfileConfirmationFragment) obj;
                        int i7 = IdCardProfileConfirmationFragment.l;
                        vk7.f(idCardProfileConfirmationFragment, "this$0");
                        px6 d0 = idCardProfileConfirmationFragment.d0();
                        d0.getClass();
                        d0.s.setValue(new fxa(new ErrorRavierDialogModel("event/premier_upgrade/click_on_ktp_field", 0, StringWrapper.a.a(h9c.ovo_kyc_id_card_data_uneditable_title), StringWrapper.a.a(h9c.ovo_kyc_id_card_data_uneditable_desc), StringWrapper.a.a(h9c.ovo_kyc_cta_ok)), 0));
                        break;
                    case 5:
                        zu5 zu5Var = (zu5) obj;
                        int i8 = yt8.v;
                        vk7.f(zu5Var, "$onClickListener");
                        zu5Var.invoke();
                        break;
                    case 6:
                        ProfileFragment profileFragment = (ProfileFragment) obj;
                        int i9 = ProfileFragment.G;
                        vk7.f(profileFragment, "this$0");
                        profileFragment.h0().C();
                        profileFragment.h0().E(false);
                        break;
                    case 7:
                        b bVar = (b) obj;
                        vk7.f(bVar, "$dialog");
                        bVar.dismiss();
                        break;
                    default:
                        PaymentCodeError.ActionMetadata actionMetadata = (PaymentCodeError.ActionMetadata) obj;
                        int i10 = PaymentPartnerCodeErrorFragment.h;
                        vk7.f(actionMetadata, "$actionMeta");
                        actionMetadata.b.invoke();
                        break;
                }
            }
        });
        if (bundle != null) {
            if (djj.e().i() && djj.e().h != null) {
                djj.e().h.P(new ph6(2, "savedInstanceState is not null"));
            }
            finish();
        }
        if (djj.e().i() && djj.e().h != null) {
            djj.e().h.A();
        }
        try {
            if (this.X.getReviewScreenTitleTypeface() > 0) {
                this.O.setTypeface(z1d.c(getApplicationContext(), this.X.getReviewScreenTitleTypeface()));
            }
            if (this.X.getReviewScreenDescTypeface() > 0) {
                this.N.setTypeface(z1d.c(getApplicationContext(), this.X.getReviewScreenDescTypeface()));
            }
            if (this.X.getReviewScreenConfirmButtonTypeface() > 0) {
                this.Q.setTypeface(z1d.c(getApplicationContext(), this.X.getReviewScreenConfirmButtonTypeface()));
            }
            if (this.X.getReviewScreenRetakeButtonTypeface() > 0) {
                this.R.setTypeface(z1d.c(getApplicationContext(), this.X.getReviewScreenRetakeButtonTypeface()));
            }
        } catch (Exception e) {
            fvi.d(e);
            if (djj.e().i() && djj.e().h != null) {
                djj.e().h.P(new ph6(2, fvi.d(e)));
            }
            if (djj.e().g != null) {
                djj.e().g.a();
            }
        }
        String str = null;
        C0(this.X, null);
        try {
            JSONObject customUIStrings = this.X.getCustomUIStrings();
            if (customUIStrings != null) {
                if (customUIStrings.has("docReviewRetakeButton") && !customUIStrings.getString("docReviewRetakeButton").trim().isEmpty()) {
                    this.R.setText(customUIStrings.getString("docReviewRetakeButton"));
                }
                if (customUIStrings.has("docReviewContinueButton") && !customUIStrings.getString("docReviewContinueButton").trim().isEmpty()) {
                    this.Q.setText(customUIStrings.getString("docReviewContinueButton"));
                }
            }
            if (djj.e().i() && djj.e().h != null) {
                djj.e().h.E(krjVar.b().longValue());
                djj.e().h.m();
            }
            this.H.c();
        } catch (Exception e2) {
            fvi.d(e2);
            if (djj.e().i() && djj.e().h != null) {
                djj.e().h.P(new ph6(2, fvi.d(e2)));
            }
            if (djj.e().g != null) {
                djj.e().g.a();
            }
        }
        File file = new File(this.T);
        String path = file.getPath();
        int i2 = fvi.a;
        int i3 = 1;
        try {
            str = path.substring(path.lastIndexOf(".") + 1);
        } catch (Exception unused) {
        }
        boolean equals = Objects.equals(str, "pdf");
        ExecutorService executorService = this.Y;
        if (equals) {
            J0(true);
            executorService.submit(new x31(i3, this, file));
        } else {
            this.L.setVisibility(8);
            J0(true);
            executorService.submit(new Runnable() {
                @Override
                public final void run() {
                    int i4 = i;
                    int i5 = 1;
                    Object obj = this;
                    switch (i4) {
                        case 0:
                            HVDocReviewActivity hVDocReviewActivity = (HVDocReviewActivity) obj;
                            int i6 = HVDocReviewActivity.Z;
                            hVDocReviewActivity.getClass();
                            try {
                                Bitmap c = lmi.c(hVDocReviewActivity.T);
                                if (c != null) {
                                    Bitmap b3 = dri.b(hVDocReviewActivity, c, hVDocReviewActivity.W, hVDocReviewActivity.V, dri.a(10.0f, hVDocReviewActivity), hVDocReviewActivity.X.isShouldSetPadding());
                                    c.recycle();
                                    hVDocReviewActivity.runOnUiThread(new y0f(i5, hVDocReviewActivity, b3));
                                    break;
                                }
                            } catch (Exception e3) {
                                fvi.d(e3);
                                if (djj.e().g != null) {
                                    djj.e().g.a();
                                    return;
                                }
                                return;
                            }
                            break;
                        case 1:
                            com.google.android.material.search.e eVar = (com.google.android.material.search.e) obj;
                            eVar.c.setTranslationY(r0.getHeight());
                            AnimatorSet g = eVar.g(true);
                            g.addListener(new c(eVar));
                            g.start();
                            break;
                        default:
                            FirestoreClient.t((FirestoreClient) obj);
                            break;
                    }
                }
            });
        }
    }

    @Override
    public final void onResume() {
        super.onResume();
        try {
            String docReviewTitle = this.X.getDocReviewTitle();
            if (!TextUtils.isEmpty(docReviewTitle)) {
                this.O.setText(docReviewTitle);
            }
            String docReviewDescription = this.X.getDocReviewDescription();
            if (!TextUtils.isEmpty(docReviewDescription)) {
                this.N.setText(docReviewDescription);
            }
            String docReviewSubtitle = this.X.getDocReviewSubtitle();
            this.P.setText(docReviewSubtitle);
            this.P.setVisibility(TextUtils.isEmpty(docReviewSubtitle) ? 8 : 0);
            RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.N.getLayoutParams();
            int a = dri.a(40.0f, this);
            if (this.V < 1.0f) {
                layoutParams.setMargins(a, dri.a(60.0f, this), a, 0);
            } else {
                layoutParams.setMargins(a, dri.a(6.0f, this), a, 0);
            }
            this.N.requestLayout();
        } catch (Exception e) {
            fvi.d(e);
            if (djj.e().g != null) {
                djj.e().g.a();
            }
        }
    }

    @Override
    public final void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
    }
}