导航菜单

页面标题

页面副标题

CreditNow v1.0.2 - FillInInfoActivity.java 源代码

正在查看: CreditNow v1.0.2 应用的 FillInInfoActivity.java JAVA 源代码文件

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


package com.cat.fillininfolibrary.view;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.lifecycle.Observer;
import com.aa.commonuilibrary.base.activity.BaseActivity;
import com.appsflyer.attribution.RequestError;
import com.cat.facelibrary.view.FaceGatewayActivity;
import com.cat.fillininfolibrary.R$drawable;
import com.cat.fillininfolibrary.R$id;
import com.cat.fillininfolibrary.databinding.ActivityFillInInfoBinding;
import com.cat.fillininfolibrary.viewmodel.FillInInfoViewModel;
import defpackage.az;
import defpackage.c4;
import defpackage.g10;
import defpackage.h40;
import defpackage.i40;
import defpackage.k71;
import defpackage.p91;
import defpackage.pm3;
import defpackage.qp1;
import defpackage.t71;
import defpackage.u91;
import defpackage.x30;
import defpackage.xj1;
import java.io.Serializable;
import java.util.ArrayList;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;

@Metadata
public final class FillInInfoActivity extends BaseActivity<FillInInfoViewModel, ActivityFillInInfoBinding> {
    public p91<?, ?> D1;

    @Metadata
    public final class a {
        public a() {
        }

        public final void a(int i) {
            ((FillInInfoViewModel) FillInInfoActivity.this.O0()).getMDismissFocus().setValue("");
            if (FillInInfoActivity.this.r1(i)) {
                FillInInfoActivity.this.y1(String.valueOf(i));
            }
        }

        public final void b() {
            ((FillInInfoViewModel) FillInInfoActivity.this.O0()).getMDismissFocus().setValue("");
        }
    }

    @Metadata
    public static final class b extends o02 implements Function1<u91, Unit> {
        public b() {
            super(1);
        }

        public final void b(u91 u91Var) {
            FillInInfoActivity fillInInfoActivity = FillInInfoActivity.this;
            Intrinsics.c(u91Var);
            fillInInfoActivity.B1(u91Var);
        }

        public Object invoke(Object obj) {
            b((u91) obj);
            return Unit.a;
        }
    }

    @Metadata
    public static final class c implements qp1 {
        public c() {
        }

        @Override
        public void a() {
            x30.a().d(FillInInfoActivity.this.Q0(), pm3.a(FillInInfoActivity.this.Q0(), "customerService"));
        }

        @Override
        public void b() {
            FillInInfoActivity.this.onBackPressed();
        }
    }

    @Metadata
    public static final class d implements Observer, xi1 {
        public final Function1 a;

        public d(Function1 function1) {
            Intrinsics.checkNotNullParameter(function1, "function");
            this.a = function1;
        }

        public final boolean equals(Object obj) {
            if ((obj instanceof Observer) && (obj instanceof xi1)) {
                return Intrinsics.a(getFunctionDelegate(), ((xi1) obj).getFunctionDelegate());
            }
            return false;
        }

        @NotNull
        public final th1<?> getFunctionDelegate() {
            return this.a;
        }

        public final int hashCode() {
            return getFunctionDelegate().hashCode();
        }

        @Override
        public final void onChanged(Object obj) {
            this.a.invoke(obj);
        }
    }

    @Metadata
    public static final class e implements ViewTreeObserver.OnGlobalLayoutListener {
        public e() {
        }

        @Override
        public void onGlobalLayout() {
            ((ActivityFillInInfoBinding) FillInInfoActivity.this.n1()).ivTop3AcFillInInfo.getViewTreeObserver().removeOnGlobalLayoutListener(this);
            int measuredWidth = ((ActivityFillInInfoBinding) FillInInfoActivity.this.n1()).ivTop3AcFillInInfo.getMeasuredWidth();
            double measuredHeight = ((ActivityFillInInfoBinding) FillInInfoActivity.this.n1()).ivTop3AcFillInInfo.getMeasuredHeight();
            AppCompatTextView appCompatTextView = ((ActivityFillInInfoBinding) FillInInfoActivity.this.n1()).tvAmountAcFillInInfo;
            Intrinsics.checkNotNullExpressionValue(appCompatTextView, "tvAmountAcFillInInfo");
            dr4.f(appCompatTextView, (int) ((4.0d * measuredHeight) / 93));
            ViewGroup.LayoutParams layoutParams = ((ActivityFillInInfoBinding) FillInInfoActivity.this.n1()).tvAmountAcFillInInfo.getLayoutParams();
            layoutParams.width = (int) ((measuredWidth * 80.0d) / 351);
            layoutParams.height = -2;
            ((ActivityFillInInfoBinding) FillInInfoActivity.this.n1()).tvAmountAcFillInInfo.setLayoutParams(layoutParams);
            ViewGroup.LayoutParams layoutParams2 = ((ActivityFillInInfoBinding) FillInInfoActivity.this.n1()).clNavigationArea.getLayoutParams();
            layoutParams2.width = measuredWidth;
            layoutParams2.height = (int) ((measuredHeight * 1.0d) / 2);
            ((ActivityFillInInfoBinding) FillInInfoActivity.this.n1()).clNavigationArea.setLayoutParams(layoutParams2);
        }
    }

    private final void u1() {
        Bundle extras;
        Bundle extras2;
        Intent intent = getIntent();
        String str = null;
        Serializable serializable = (intent == null || (extras2 = intent.getExtras()) == null) ? null : extras2.getSerializable("enumList");
        ArrayList arrayList = serializable instanceof ArrayList ? (ArrayList) serializable : null;
        ((FillInInfoViewModel) O0()).getMItemEnumList().clear();
        if (arrayList == null) {
            arrayList = null;
        }
        if (arrayList != null) {
            ((FillInInfoViewModel) O0()).getMItemEnumList().addAll(arrayList);
        }
        Intent intent2 = getIntent();
        Serializable serializable2 = (intent2 == null || (extras = intent2.getExtras()) == null) ? null : extras.getSerializable("fillInInfoStatus");
        xj1 xj1Var = serializable2 instanceof xj1 ? (xj1) serializable2 : null;
        ((FillInInfoViewModel) O0()).setMGetFillInInfoStatus(xj1Var);
        if (TextUtils.isEmpty(xj1Var != null ? xj1Var.b() : null)) {
            str = "1";
        } else if (xj1Var != null) {
            str = xj1Var.b();
        }
        ((FillInInfoViewModel) O0()).setMStepSubmitSuccess(str != null ? Integer.parseInt(str) : 1);
    }

    public final void A1() {
        ((ActivityFillInInfoBinding) n1()).ivTop3AcFillInInfo.getViewTreeObserver().addOnGlobalLayoutListener(new e());
    }

    public final void B1(u91 u91Var) {
        int i = R$drawable.cat_title_progress_bar_1;
        if (u91Var instanceof u91.b) {
            ((FillInInfoViewModel) O0()).setMStepNowVisit(1);
        } else if (u91Var instanceof u91.d) {
            i = R$drawable.cat_title_progress_bar_2;
            ((FillInInfoViewModel) O0()).setMStepNowVisit(2);
        } else if (u91Var instanceof u91.e) {
            i = R$drawable.cat_title_progress_bar_3;
            ((FillInInfoViewModel) O0()).setMStepNowVisit(3);
        } else if (u91Var instanceof u91.c) {
            i = R$drawable.cat_title_progress_bar_4;
            ((FillInInfoViewModel) O0()).setMStepNowVisit(4);
        } else if (u91Var instanceof u91.a) {
            i = R$drawable.cat_title_progress_bar_5;
            ((FillInInfoViewModel) O0()).setMStepNowVisit(5);
        }
        ((ActivityFillInInfoBinding) n1()).ivTop3AcFillInInfo.setImageResource(i);
    }

    @Override
    @SuppressLint({"SourceLockedOrientationActivity"})
    public void V0(Bundle bundle) {
        h40.a.d(this);
        u1();
        A1();
        s1();
        x1();
        t1();
        ((FillInInfoViewModel) O0()).getMCurrentStep().observe(this, new d(new b()));
        az.b.a().e("accountManagerToFillInInfo");
        ((ActivityFillInInfoBinding) n1()).setClick(new a());
        ((ActivityFillInInfoBinding) n1()).titleBarAcFillInInfo.setCallback(new c());
    }

    @Override
    public void onActivityResult(int i, int i2, Intent intent) {
        Bundle extras;
        Bundle extras2;
        super.onActivityResult(i, i2, intent);
        if (i == 9527 && i2 == -1) {
            if (intent == null) {
                return;
            }
            try {
                Uri data = intent.getData();
                if (data == null) {
                    return;
                }
                Cursor query = getContentResolver().query(data, new String[]{"data1", "display_name"}, null, null, null);
                if (query != null) {
                    try {
                        if (query.moveToFirst()) {
                            String string = query.getString(query.getColumnIndex("data1"));
                            String string2 = query.getString(query.getColumnIndex("display_name"));
                            int mClickContactSortNo = ((FillInInfoViewModel) O0()).getMClickContactSortNo();
                            if (mClickContactSortNo == 1) {
                                ((FillInInfoViewModel) O0()).getMGetContact1().setValue(new Pair<>(string2, string));
                            } else if (mClickContactSortNo == 2) {
                                ((FillInInfoViewModel) O0()).getMGetContact2().setValue(new Pair<>(string2, string));
                            } else if (mClickContactSortNo == 3) {
                                ((FillInInfoViewModel) O0()).getMGetContact3().setValue(new Pair<>(string2, string));
                            }
                        }
                        Unit unit = Unit.a;
                    } finally {
                    }
                }
                d70.a(query, (Throwable) null);
            } catch (Throwable unused) {
            }
        }
        if (i == 9528 && i2 == -1) {
            Serializable serializable = (intent == null || (extras2 = intent.getExtras()) == null) ? null : extras2.getSerializable("FACE_RESULT");
            ((FillInInfoViewModel) O0()).getMPhotoFaceFilePath().setValue(serializable instanceof k71 ? (k71) serializable : null);
        }
        if (i == 9529 && i2 == -1) {
            Serializable serializable2 = (intent == null || (extras = intent.getExtras()) == null) ? null : extras.getSerializable("FACE_RESULT");
            ((FillInInfoViewModel) O0()).getMPhotoFaceFilePathMerge().setValue(serializable2 instanceof k71 ? (k71) serializable2 : null);
        }
    }

    @Override
    public void onBackPressed() {
        p91<?, ?> p91Var = this.D1;
        if (p91Var == null || !p91Var.l2()) {
            super.onBackPressed();
        }
    }

    @Override
    public void onDestroy() {
        if (g10.a.c()) {
            t71.a();
        }
        super.onDestroy();
    }

    public final boolean r1(int i) {
        String str;
        xj1 mGetFillInInfoStatus = ((FillInInfoViewModel) O0()).getMGetFillInInfoStatus();
        if (mGetFillInInfoStatus == null || (str = mGetFillInInfoStatus.d()) == null) {
            str = "";
        }
        if (Intrinsics.a(str, "0")) {
            return i != ((FillInInfoViewModel) O0()).getMStepNowVisit() && i <= ((FillInInfoViewModel) O0()).getMStepSubmitSuccess();
        }
        return true;
    }

    public final void s1() {
        String str;
        xj1 mGetFillInInfoStatus = ((FillInInfoViewModel) O0()).getMGetFillInInfoStatus();
        if (mGetFillInInfoStatus == null || (str = mGetFillInInfoStatus.a()) == null) {
            str = "";
        }
        if (TextUtils.isEmpty(str)) {
            AppCompatTextView appCompatTextView = ((ActivityFillInInfoBinding) n1()).tvAmountAcFillInInfo;
            Intrinsics.checkNotNullExpressionValue(appCompatTextView, "tvAmountAcFillInInfo");
            dr4.e(appCompatTextView);
            return;
        }
        AppCompatTextView appCompatTextView2 = ((ActivityFillInInfoBinding) n1()).tvAmountAcFillInInfo;
        Intrinsics.checkNotNullExpressionValue(appCompatTextView2, "tvAmountAcFillInInfo");
        dr4.g(appCompatTextView2);
        String a2 = i40.a(str);
        ((ActivityFillInInfoBinding) n1()).tvAmountAcFillInInfo.setText("$ " + a2);
    }

    public final void v1() {
        Intent intent = new Intent();
        intent.setAction("android.intent.action.PICK");
        intent.setType("vnd.android.cursor.dir/phone_v2");
        startActivityForResult(intent, 9527);
    }

    public final void w1(int i) {
        Intent intent = new Intent(this, (Class<?>) FaceGatewayActivity.class);
        intent.putExtra("catRequestCode", String.valueOf(i));
        startActivityForResult(intent, i);
    }

    public final void x1() {
        String str;
        xj1 mGetFillInInfoStatus = ((FillInInfoViewModel) O0()).getMGetFillInInfoStatus();
        if (mGetFillInInfoStatus == null || (str = mGetFillInInfoStatus.b()) == null) {
            str = "";
        }
        y1(str);
    }

    public final void y1(String str) {
        switch (str.hashCode()) {
            case 49:
                if (str.equals("1")) {
                    c4.a(this, R$id.nav_host_fragment_ac_fill_in_info).M(R$id.nav_first);
                    return;
                }
                break;
            case RequestError.RESPONSE_CODE_FAILURE:
                if (str.equals("2")) {
                    c4.a(this, R$id.nav_host_fragment_ac_fill_in_info).M(R$id.nav_second);
                    return;
                }
                break;
            case 51:
                if (str.equals("3")) {
                    c4.a(this, R$id.nav_host_fragment_ac_fill_in_info).M(R$id.nav_third);
                    return;
                }
                break;
            case 52:
                if (str.equals("4")) {
                    c4.a(this, R$id.nav_host_fragment_ac_fill_in_info).M(R$id.nav_fourth);
                    return;
                }
                break;
            case 53:
                if (str.equals("5")) {
                    c4.a(this, R$id.nav_host_fragment_ac_fill_in_info).M(R$id.nav_fifth);
                    return;
                }
                break;
        }
        c4.a(this, R$id.nav_host_fragment_ac_fill_in_info).M(R$id.nav_first);
    }

    public final void z1(p91<?, ?> p91Var) {
        this.D1 = p91Var;
    }

    public final void t1() {
    }
}