导航菜单

页面标题

页面副标题

Súper Préstamo v1.9.1 - BindBankCardActivity.java 源代码

正在查看: Súper Préstamo v1.9.1 应用的 BindBankCardActivity.java JAVA 源代码文件

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


package com.pf.prestafast.view.activity.apply;

import android.content.Context;
import android.content.Intent;
import android.location.Location;
import android.os.Bundle;
import android.provider.Settings;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.CollectionUtils;
import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.analytics.ktx.AnalyticsKt;
import com.google.firebase.analytics.ktx.ParametersBuilder;
import com.google.firebase.ktx.Firebase;
import com.pf.prestafast.R$id;
import com.pf.prestafast.R$layout;
import com.pf.prestafast.R$string;
import com.pf.prestafast.base.BaseActivity;
import com.pf.prestafast.base.BaseApplication;
import com.pf.prestafast.model.Api;
import com.pf.prestafast.model.resp.Glide;
import com.pf.prestafast.model.resp.JumpPathResp;
import com.pf.prestafast.model.resp.Lievg;
import com.pf.prestafast.model.resp.NextStepResp;
import com.pf.prestafast.model.resp.PersonalMaterialResp;
import com.pf.prestafast.model.resp.TimeData;
import com.pf.prestafast.mrytNetwork.RxObservable;
import com.pf.prestafast.mrytNetwork.mrytBase.MrytBaseObserver;
import com.pf.prestafast.mrytNetwork.mrytBase.MrytBaseResponse;
import com.pf.prestafast.view.activity.ApplyProcessListActivity;
import com.pf.prestafast.view.activity.MainActivity;
import com.pf.prestafast.view.activity.apply.BindBankCardActivity;
import com.pf.prestafast.view.weight.BankCardTextWatcher;
import com.pf.prestafast.view.weight.CountdownCertificationView;
import com.pf.prestafast.view.weight.TextWatcherAdapter;
import com.xiaweizi.marquee.MarqueeTextView;
import defpackage.ap0;
import defpackage.ay;
import defpackage.f30;
import defpackage.ic0;
import defpackage.kz0;
import defpackage.s51;
import defpackage.us0;
import defpackage.w51;
import defpackage.w9;
import defpackage.y5;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.functions.Consumer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

public final class BindBankCardActivity extends BaseActivity {
    public String h;
    public String j;
    public boolean o;
    public List p;
    public Double r;
    public Double s;
    public Map u = new LinkedHashMap();
    public FirebaseAnalytics f = AnalyticsKt.getAnalytics(Firebase.INSTANCE);
    public int m = 1;
    public int n = 5;
    public long q = System.currentTimeMillis();
    public long t = System.currentTimeMillis();

    public static final class a extends MrytBaseObserver {
        public a() {
        }

        @Override
        public void hideLoading() {
            BindBankCardActivity.this.r();
        }

        @Override
        public void showLoading() {
            BindBankCardActivity.this.A();
        }

        @Override
        public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
            PersonalMaterialResp personalMaterialResp;
            if (mrytBaseResponse != null && (personalMaterialResp = (PersonalMaterialResp) mrytBaseResponse.getWise()) != null) {
                BindBankCardActivity bindBankCardActivity = BindBankCardActivity.this;
                bindBankCardActivity.p = personalMaterialResp.getGlides();
                Iterator<T> it = personalMaterialResp.getGlides().iterator();
                while (true) {
                    boolean z = false;
                    if (!it.hasNext()) {
                        break;
                    }
                    if (((Glide) it.next()).getStrides() == 1) {
                        z = true;
                    }
                    bindBankCardActivity.o = z;
                }
                for (Glide glide : personalMaterialResp.getGlides()) {
                    if (TextUtils.equals(glide.getOver(), "D")) {
                        ((TextView) bindBankCardActivity.K(R$id.mTvTips)).setText(glide.getGosl());
                    }
                    if (TextUtils.equals(glide.getLeave(), "bankType")) {
                        ((TextView) bindBankCardActivity.K(R$id.mTvBankTypeMsg)).setText(glide.getBedgh());
                        ((TextView) bindBankCardActivity.K(R$id.mTvBancoType)).setHint(glide.getBedgh());
                        for (Lievg lievg : glide.getLievg()) {
                            if (!TextUtils.isEmpty(glide.getFlowing())) {
                                String flowing = glide.getFlowing();
                                if (f30.b(flowing != null ? Float.valueOf(Float.parseFloat(flowing)) : null, lievg.getThough())) {
                                    int i = R$id.mTvBancoType;
                                    ((TextView) bindBankCardActivity.K(i)).setText(lievg.getEvening());
                                    if (TextUtils.equals(((TextView) bindBankCardActivity.K(i)).getText(), "CLABE")) {
                                        ((ImageView) bindBankCardActivity.K(R$id.mIvQuestion)).setVisibility(0);
                                        int i2 = R$id.mEtBankCardNum;
                                        ((EditText) bindBankCardActivity.K(i2)).setText("");
                                        ((EditText) bindBankCardActivity.K(i2)).setFilters(new InputFilter.LengthFilter[]{new InputFilter.LengthFilter(22)});
                                        EditText editText = (EditText) bindBankCardActivity.K(i2);
                                        StringBuilder sb = new StringBuilder();
                                        Object tag = ((EditText) bindBankCardActivity.K(i2)).getTag();
                                        sb.append(tag != null ? tag.toString() : null);
                                        sb.append(bindBankCardActivity.c0());
                                        editText.setHint(sb.toString());
                                    } else {
                                        ((ImageView) bindBankCardActivity.K(R$id.mIvQuestion)).setVisibility(8);
                                        int i3 = R$id.mEtBankCardNum;
                                        ((EditText) bindBankCardActivity.K(i3)).setText("");
                                        ((EditText) bindBankCardActivity.K(i3)).setFilters(new InputFilter.LengthFilter[]{new InputFilter.LengthFilter(19)});
                                        BankCardTextWatcher.bind((EditText) bindBankCardActivity.K(i3), 19);
                                    }
                                    TextView textView = (TextView) bindBankCardActivity.K(R$id.mTvBankNumMsg);
                                    CharSequence hint = ((EditText) bindBankCardActivity.K(R$id.mEtBankCardNum)).getHint();
                                    textView.setText(hint != null ? hint.toString() : null);
                                }
                            }
                        }
                    }
                    if (TextUtils.equals(glide.getLeave(), "hotBank") || TextUtils.equals(glide.getLeave(), "bankCode")) {
                        int i4 = R$id.mTvBanco;
                        ((TextView) bindBankCardActivity.K(i4)).setText(bindBankCardActivity.k0(glide, glide.getFlowing()));
                        ((TextView) bindBankCardActivity.K(i4)).setHint(glide.getBedgh());
                        ((TextView) bindBankCardActivity.K(i4)).setTag(glide.getFlowing());
                    }
                    if (TextUtils.equals(glide.getLeave(), "cardNo")) {
                        ((TextView) bindBankCardActivity.K(R$id.mTvBankNumMsg)).setText(glide.getBedgh());
                        int i5 = R$id.mEtBankCardNum;
                        ((EditText) bindBankCardActivity.K(i5)).setHint(glide.getBedgh());
                        ((EditText) bindBankCardActivity.K(i5)).setText(glide.getFlowing());
                    }
                    bindBankCardActivity.l0(personalMaterialResp.getTime_data(), personalMaterialResp.getBUramigLnre());
                }
            }
            BindBankCardActivity.this.o0(7);
        }
    }

    public static final class b extends MrytBaseObserver {
        public final String b;
        public final String c;

        public b(String str, String str2) {
            this.b = str;
            this.c = str2;
        }

        @Override
        public void hideLoading() {
            BindBankCardActivity.this.r();
        }

        @Override
        public void showLoading() {
        }

        @Override
        public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
            JumpPathResp jumpPathResp;
            if (mrytBaseResponse == null || (jumpPathResp = (JumpPathResp) mrytBaseResponse.getWise()) == null) {
                return;
            }
            ?? r0 = BindBankCardActivity.this;
            String str = this.b;
            String str2 = this.c;
            ap0.a().b(r0, jumpPathResp.getNakedness());
            y5.y().z(r0.t, str, "", "11", "" + str2);
            r0.finish();
        }
    }

    public static final class c extends MrytBaseObserver {
        public c() {
        }

        @Override
        public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
            List list;
            if (mrytBaseResponse == null || (list = (List) mrytBaseResponse.getWise()) == null) {
                return;
            }
            BindBankCardActivity bindBankCardActivity = BindBankCardActivity.this;
            if (CollectionUtils.isEmpty(list)) {
                return;
            }
            ((LinearLayout) bindBankCardActivity.K(R$id.mLlMarqueeViewContainer)).setVisibility(0);
            StringBuilder sb = new StringBuilder();
            Iterator it = list.iterator();
            while (it.hasNext()) {
                sb.append((String) it.next());
                sb.append("            ");
            }
            int i = R$id.mMtvMarquee;
            ((MarqueeTextView) bindBankCardActivity.K(i)).setText(sb.toString());
            ((MarqueeTextView) bindBankCardActivity.K(i)).g();
        }
    }

    public static final class d extends MrytBaseObserver {
        public d() {
        }

        @Override
        public void hideLoading() {
            BindBankCardActivity.this.r();
        }

        @Override
        public void showLoading() {
            BindBankCardActivity.this.A();
        }

        @Override
        public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
            NextStepResp nextStepResp;
            NextStepResp.NextStep postcNext;
            if (w51.a().d() != 1) {
                BindBankCardActivity bindBankCardActivity = BindBankCardActivity.this;
                bindBankCardActivity.n0("", bindBankCardActivity.j, String.valueOf(BindBankCardActivity.this.h));
                return;
            }
            ApplyProcessListActivity.p.a(BindBankCardActivity.this, (mrytBaseResponse == null || (nextStepResp = (NextStepResp) mrytBaseResponse.getWise()) == null || (postcNext = nextStepResp.getPostcNext()) == null) ? null : postcNext.getWhich(), BindBankCardActivity.this.h, BindBankCardActivity.this.j, BindBankCardActivity.this.m + 1, BindBankCardActivity.this.n, BindBankCardActivity.this.o);
            if (mrytBaseResponse != null) {
                ?? r11 = BindBankCardActivity.this;
                r11.b0("bank_submit_success_one");
                r11.setResult(-1, new Intent());
                r11.finish();
            }
        }
    }

    public static final class e implements s51.b {
        public e() {
        }

        @Override
        public void a() {
        }

        @Override
        public void onCancel() {
            BindBankCardActivity.this.setResult(-1);
            BindBankCardActivity.this.finish();
        }
    }

    public static final class f extends TextWatcherAdapter {
        public f() {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
            String obj;
            Integer valueOf = (charSequence == null || (obj = charSequence.toString()) == null) ? null : Integer.valueOf(obj.length());
            if (valueOf != null && valueOf.intValue() == 1) {
                BindBankCardActivity.this.b0("bank_card_number_one");
            }
        }
    }

    public static final class g implements w9.b {
        public g() {
        }

        @Override
        public void a() {
            BindBankCardActivity.this.b0("bank_submit_dialog_confirm_one");
            BindBankCardActivity.this.p0();
        }

        @Override
        public void b() {
            BindBankCardActivity.this.b0("bank_submit_dialog_cancle_one");
        }
    }

    public static final class h implements us0.b {
        public final Glide a;
        public final BindBankCardActivity b;

        public h(Glide glide, BindBankCardActivity bindBankCardActivity) {
            this.a = glide;
            this.b = bindBankCardActivity;
        }

        @Override
        public void a(int i, Lievg lievg) {
            List<Lievg> lievg2;
            this.a.setFlowing(String.valueOf(lievg != null ? Integer.valueOf(lievg.getThough()) : null));
            if (TextUtils.equals(this.a.getLeave(), "bankType")) {
                ((TextView) this.b.K(R$id.mTvBancoType)).setText(String.valueOf(lievg != null ? lievg.getEvening() : null));
                Glide d0 = this.b.d0("bankType");
                if (d0 != null) {
                    d0.setFlowing(String.valueOf(lievg != null ? Integer.valueOf(lievg.getThough()) : null));
                }
                Glide d02 = this.b.d0("bankType");
                if (d02 != null && (lievg2 = d02.getLievg()) != null) {
                    BindBankCardActivity bindBankCardActivity = this.b;
                    for (Lievg lievg3 : lievg2) {
                        if (lievg3.getThough() == Integer.parseInt(String.valueOf(lievg != null ? Integer.valueOf(lievg.getThough()) : null))) {
                            int i2 = R$id.mEtBankCardNum;
                            ((EditText) bindBankCardActivity.K(i2)).setHint(lievg3.getGosl());
                            ((EditText) bindBankCardActivity.K(i2)).setTag(lievg3.getGosl());
                        }
                    }
                }
                if (TextUtils.equals(((TextView) this.b.K(R$id.mTvBancoType)).getText(), "CLABE")) {
                    ((ImageView) this.b.K(R$id.mIvQuestion)).setVisibility(0);
                    BindBankCardActivity bindBankCardActivity2 = this.b;
                    int i3 = R$id.mEtBankCardNum;
                    ((EditText) bindBankCardActivity2.K(i3)).setText("");
                    ((EditText) this.b.K(i3)).setFilters(new InputFilter.LengthFilter[]{new InputFilter.LengthFilter(22)});
                    EditText editText = (EditText) this.b.K(i3);
                    StringBuilder sb = new StringBuilder();
                    Object tag = ((EditText) this.b.K(i3)).getTag();
                    sb.append(tag != null ? tag.toString() : null);
                    sb.append(this.b.c0());
                    editText.setHint(sb.toString());
                } else {
                    ((ImageView) this.b.K(R$id.mIvQuestion)).setVisibility(8);
                    BindBankCardActivity bindBankCardActivity3 = this.b;
                    int i4 = R$id.mEtBankCardNum;
                    ((EditText) bindBankCardActivity3.K(i4)).setText("");
                    ((EditText) this.b.K(i4)).setFilters(new InputFilter.LengthFilter[]{new InputFilter.LengthFilter(19)});
                    BankCardTextWatcher.bind((EditText) this.b.K(i4), 19);
                }
                TextView textView = (TextView) this.b.K(R$id.mTvBankNumMsg);
                CharSequence hint = ((EditText) this.b.K(R$id.mEtBankCardNum)).getHint();
                textView.setText(hint != null ? hint.toString() : null);
            }
            if (TextUtils.equals(this.a.getLeave(), "bankCode")) {
                BindBankCardActivity bindBankCardActivity4 = this.b;
                int i5 = R$id.mTvBanco;
                ((TextView) bindBankCardActivity4.K(i5)).setText(lievg != null ? lievg.getEvening() : null);
                ((TextView) this.b.K(i5)).setTag(lievg != null ? Integer.valueOf(lievg.getThough()).toString() : null);
                if (TextUtils.equals(((TextView) this.b.K(R$id.mTvBancoType)).getText(), "CLABE")) {
                    TextView textView2 = (TextView) this.b.K(R$id.mTvBankNumMsg);
                    StringBuilder sb2 = new StringBuilder();
                    BindBankCardActivity bindBankCardActivity5 = this.b;
                    int i6 = R$id.mEtBankCardNum;
                    Object tag2 = ((EditText) bindBankCardActivity5.K(i6)).getTag();
                    sb2.append(tag2 != null ? tag2.toString() : null);
                    sb2.append(this.b.c0());
                    textView2.setText(sb2.toString());
                    EditText editText2 = (EditText) this.b.K(i6);
                    StringBuilder sb3 = new StringBuilder();
                    Object tag3 = ((EditText) this.b.K(i6)).getTag();
                    sb3.append(tag3 != null ? tag3.toString() : null);
                    sb3.append(this.b.c0());
                    editText2.setHint(sb3.toString());
                }
            }
        }
    }

    public static final void g0(final ObservableEmitter observableEmitter) {
        f30.h(observableEmitter, "emitter");
        ay.f().i(BaseApplication.a(), new ay.d() {
            @Override
            public final void a(Location location) {
                BindBankCardActivity.h0(ObservableEmitter.this, location);
            }
        });
    }

    public static final void h0(ObservableEmitter observableEmitter, Location location) {
        f30.h(observableEmitter, "$emitter");
        f30.e(location);
        observableEmitter.onNext(location);
        observableEmitter.onComplete();
    }

    public static final void i0(BindBankCardActivity bindBankCardActivity, Location location) {
        f30.h(bindBankCardActivity, "this$0");
        Double valueOf = Double.valueOf(0.0d);
        if (location == null) {
            try {
                bindBankCardActivity.r = valueOf;
                bindBankCardActivity.s = valueOf;
                return;
            } catch (Exception e2) {
                e2.printStackTrace();
                return;
            }
        }
        try {
            bindBankCardActivity.r = Double.valueOf(location.getLatitude());
            bindBankCardActivity.s = Double.valueOf(location.getLongitude());
        } catch (Exception e3) {
            try {
                bindBankCardActivity.r = valueOf;
                bindBankCardActivity.s = valueOf;
            } catch (Exception unused) {
                e3.printStackTrace();
            }
        }
    }

    public static final void j0(BindBankCardActivity bindBankCardActivity, Throwable th) {
        f30.h(bindBankCardActivity, "this$0");
        Location g2 = ay.f().g();
        if (g2 == null) {
            bindBankCardActivity.r = Double.valueOf(0.0d);
            bindBankCardActivity.s = Double.valueOf(0.0d);
        } else {
            bindBankCardActivity.r = Double.valueOf(g2.getLatitude());
            bindBankCardActivity.s = Double.valueOf(g2.getLongitude());
        }
    }

    public static final void r0(BindBankCardActivity bindBankCardActivity, View view) {
        f30.h(bindBankCardActivity, "this$0");
        int i = R$id.mTvBanco;
        Object tag = ((TextView) bindBankCardActivity.K(i)).getTag();
        if (TextUtils.isEmpty(tag != null ? tag.toString() : null)) {
            StringBuilder sb = new StringBuilder();
            sb.append("");
            TextView textView = (TextView) bindBankCardActivity.K(i);
            sb.append((Object) (textView != null ? textView.getHint() : null));
            ToastUtils.showShort(sb.toString(), new Object[0]);
            return;
        }
        int i2 = R$id.mEtBankCardNum;
        if (!TextUtils.isEmpty(((EditText) bindBankCardActivity.K(i2)).getText())) {
            bindBankCardActivity.b0("bank_submit_one");
            String obj = ((EditText) bindBankCardActivity.K(i2)).getText().toString();
            bindBankCardActivity.x0(obj != null ? kz0.s(obj, " ", "", false, 4, null) : null);
        } else {
            StringBuilder sb2 = new StringBuilder();
            sb2.append("");
            EditText editText = (EditText) bindBankCardActivity.K(i2);
            sb2.append((Object) (editText != null ? editText.getHint() : null));
            ToastUtils.showShort(sb2.toString(), new Object[0]);
        }
    }

    public static final void s0(BindBankCardActivity bindBankCardActivity, View view) {
        f30.h(bindBankCardActivity, "this$0");
        bindBankCardActivity.b0("bank_back_click_one");
        if (bindBankCardActivity.o) {
            bindBankCardActivity.setResult(-1);
            bindBankCardActivity.finish();
        } else {
            s51 a2 = s51.f.a(bindBankCardActivity.m, bindBankCardActivity.n);
            a2.g(bindBankCardActivity.new e());
            a2.showNow(bindBankCardActivity.getSupportFragmentManager(), "UrgeToStayDialogFragment");
        }
    }

    public static final void t0(BindBankCardActivity bindBankCardActivity, View view) {
        f30.h(bindBankCardActivity, "this$0");
        ic0.a aVar = ic0.e;
        String string = StringUtils.getString(R$string.bankcard_page_question_notice_msg);
        f30.g(string, "getString(R.string.bankc…page_question_notice_msg)");
        aVar.a(string, "ok").showNow(bindBankCardActivity.getSupportFragmentManager(), "MsgNoticeDialogFragment");
    }

    public static final void u0(BindBankCardActivity bindBankCardActivity, View view) {
        f30.h(bindBankCardActivity, "this$0");
        Glide d0 = bindBankCardActivity.d0("bankType");
        if (d0 != null) {
            bindBankCardActivity.y0(d0);
        }
    }

    public static final void v0(BindBankCardActivity bindBankCardActivity, View view) {
        f30.h(bindBankCardActivity, "this$0");
        Intent intent = new Intent((Context) bindBankCardActivity, (Class<?>) SearchBankCardActivity.class);
        intent.putExtra("hotBank", bindBankCardActivity.d0("hotBank"));
        intent.putExtra("bankCode", bindBankCardActivity.d0("bankCode"));
        ActivityUtils.startActivityForResult(bindBankCardActivity, intent, 1000);
    }

    public View K(int i) {
        Map map = this.u;
        View view = (View) map.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        if (findViewById == null) {
            return null;
        }
        map.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final void b0(String str) {
        if (MainActivity.s.b()) {
            this.f.logEvent(str, new ParametersBuilder().getBundle());
        }
    }

    public final String c0() {
        String str;
        int i = R$id.mTvBanco;
        if (((TextView) K(i)).getTag() == null || TextUtils.isEmpty(((TextView) K(i)).getTag().toString())) {
            str = "";
        } else if (((TextView) K(i)).getTag().toString().length() > 3) {
            str = ((TextView) K(i)).getTag().toString().substring(((TextView) K(i)).getTag().toString().length() - 3);
            f30.g(str, "this as java.lang.String).substring(startIndex)");
        } else {
            str = ((TextView) K(i)).getTag().toString();
        }
        return ' ' + str;
    }

    public final Glide d0(String str) {
        List<Glide> list;
        List list2 = this.p;
        if (list2 != null) {
            Boolean valueOf = list2 != null ? Boolean.valueOf(list2.isEmpty()) : null;
            f30.e(valueOf);
            if (!valueOf.booleanValue() && (list = this.p) != null) {
                for (Glide glide : list) {
                    if (TextUtils.equals(glide.getLeave(), str)) {
                        return glide;
                    }
                }
            }
        }
        return null;
    }

    public final void e0() {
        this.h = getIntent().getStringExtra("behind");
        this.j = getIntent().getStringExtra("dreaming");
        this.m = getIntent().getIntExtra(FirebaseAnalytics.Param.INDEX, 1);
        this.n = getIntent().getIntExtra("total", 5);
        this.o = getIntent().getBooleanExtra("CertificationResult", false);
    }

    public final void f0() {
        ObservableOnSubscribe observableOnSubscribe = new ObservableOnSubscribe() {
            @Override
            public final void subscribe(ObservableEmitter observableEmitter) {
                BindBankCardActivity.g0(observableEmitter);
            }
        };
        f30.f(observableOnSubscribe, "null cannot be cast to non-null type io.reactivex.ObservableOnSubscribe<android.location.Location?>");
        Observable.create(observableOnSubscribe).timeout(3L, TimeUnit.SECONDS).subscribe(new Consumer() {
            @Override
            public final void accept(Object obj) {
                BindBankCardActivity.i0(BindBankCardActivity.this, (Location) obj);
            }
        }, new Consumer() {
            @Override
            public final void accept(Object obj) {
                BindBankCardActivity.j0(BindBankCardActivity.this, (Throwable) obj);
            }
        });
    }

    public final String k0(Glide glide, String str) {
        for (Lievg lievg : glide.getLievg()) {
            boolean z = false;
            if (str != null) {
                try {
                    if (lievg.getThough() == Integer.parseInt(str)) {
                        z = true;
                    }
                } catch (Exception unused) {
                }
            }
            if (z) {
                return lievg.getEvening();
            }
        }
        return str;
    }

    public final void l0(TimeData timeData, String str) {
        if (timeData != null) {
            if (timeData.getTime_num() == null || timeData.getTime_num().longValue() <= 0) {
                ((CountdownCertificationView) K(R$id.mCcvCountDown)).setVisibility(8);
            } else {
                int i = R$id.mCcvCountDown;
                ((CountdownCertificationView) K(i)).startCountDown(timeData.getTime_num().longValue());
                ((CountdownCertificationView) K(i)).setVisibility(0);
            }
            ((CountdownCertificationView) K(R$id.mCcvCountDown)).setNoticeMsg(timeData.getTime_msg(), timeData.getTime_log());
        }
        if (TextUtils.isEmpty(str)) {
            ((ImageView) K(R$id.ad)).setVisibility(8);
            return;
        }
        int i2 = R$id.ad;
        ((ImageView) K(i2)).setVisibility(0);
        com.bumptech.glide.Glide.with(this).load(str).into((ImageView) K(i2));
    }

    public final void m0() {
        RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpBindBankCardInit(w51.a().b(), this.h), o()).subscribe(new a());
    }

    public final void n0(String str, String str2, String str3) {
        this.t = System.currentTimeMillis();
        RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpGetJumpPath(str, str2), o()).subscribe(new b(str3, str2));
    }

    public final void o0(Integer num) {
        RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpGetTopNoticeMsgList(num), o()).subscribe(new c());
    }

    public void onActivityResult(int i, int i2, Intent intent) {
        super/*androidx.fragment.app.FragmentActivity*/.onActivityResult(i, i2, intent);
        if (i == 1000 && i2 == -1) {
            Lievg lievg = (Lievg) (intent != null ? intent.getSerializableExtra("Lievg") : null);
            int i3 = R$id.mTvBanco;
            ((TextView) K(i3)).setText(lievg != null ? lievg.getEvening() : null);
            ((TextView) K(i3)).setTag(lievg != null ? Integer.valueOf(lievg.getThough()).toString() : null);
            b0("bank_name_one");
            if (TextUtils.equals(((TextView) K(R$id.mTvBancoType)).getText(), "CLABE")) {
                TextView textView = (TextView) K(R$id.mTvBankNumMsg);
                StringBuilder sb = new StringBuilder();
                int i4 = R$id.mEtBankCardNum;
                Object tag = ((EditText) K(i4)).getTag();
                sb.append(tag != null ? tag.toString() : null);
                sb.append(c0());
                textView.setText(sb.toString());
                EditText editText = (EditText) K(i4);
                StringBuilder sb2 = new StringBuilder();
                Object tag2 = ((EditText) K(i4)).getTag();
                sb2.append(tag2 != null ? tag2.toString() : null);
                sb2.append(c0());
                editText.setHint(sb2.toString());
            }
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R$layout.activity_bind_bank_card);
        b0("bank_info_enter_one");
        f0();
        e0();
        w0();
        q0();
        m0();
    }

    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i != 4) {
            return super.onKeyDown(i, keyEvent);
        }
        ((ImageView) K(R$id.mIvFinish)).performClick();
        return true;
    }

    public final void p0() {
        String d2;
        String str;
        String d3;
        String obj;
        String obj2;
        HashMap hashMap = new HashMap();
        Object tag = ((TextView) K(R$id.mTvBanco)).getTag();
        hashMap.put("thousand", tag != null ? tag.toString() : null);
        int i = R$id.mEtBankCardNum;
        Editable text = ((EditText) K(i)).getText();
        hashMap.put("eight", (text == null || (obj2 = text.toString()) == null) ? null : kz0.s(obj2, " ", "", false, 4, null));
        Editable text2 = ((EditText) K(i)).getText();
        hashMap.put("more", (text2 == null || (obj = text2.toString()) == null) ? null : kz0.s(obj, " ", "", false, 4, null));
        hashMap.put("blink", this.h);
        hashMap.put("dreaming", this.j);
        String str2 = "";
        hashMap.put("find", "");
        hashMap.put("days", this.h);
        hashMap.put("message", "10");
        hashMap.put("daydf", this.j);
        try {
            hashMap.put("treat", Settings.Secure.getString(getApplicationContext().getContentResolver(), "android_id"));
        } catch (Exception unused) {
            hashMap.put("treat", "");
        }
        Double d4 = this.s;
        if (d4 == null || d4 == null || (d2 = d4.toString()) == null) {
            d2 = "";
        }
        hashMap.put("cause", d2);
        Double d5 = this.r;
        if (d5 != null && d5 != null && (d3 = d5.toString()) != null) {
            str2 = d3;
        }
        hashMap.put("simplicity", str2);
        hashMap.put("brevity", String.valueOf(this.q));
        hashMap.put("allow", String.valueOf(System.currentTimeMillis()));
        Glide d0 = d0("bankType");
        if (d0 == null || (str = d0.getLeave()) == null) {
            str = "outa";
        }
        Glide d02 = d0("bankType");
        hashMap.put(str, d02 != null ? d02.getFlowing() : null);
        RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpSaveBankCard(hashMap), o()).subscribe(new d());
    }

    public final void q0() {
        ((ImageView) K(R$id.mIvFinish)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BindBankCardActivity.s0(BindBankCardActivity.this, view);
            }
        });
        ((ImageView) K(R$id.mIvQuestion)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BindBankCardActivity.t0(BindBankCardActivity.this, view);
            }
        });
        ((TextView) K(R$id.mTvBancoType)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BindBankCardActivity.u0(BindBankCardActivity.this, view);
            }
        });
        ((TextView) K(R$id.mTvBanco)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BindBankCardActivity.v0(BindBankCardActivity.this, view);
            }
        });
        ((TextView) K(R$id.mTvSubmit)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BindBankCardActivity.r0(BindBankCardActivity.this, view);
            }
        });
        int i = R$id.mEtBankCardNum;
        ((EditText) K(i)).addTextChangedListener(new f());
        BankCardTextWatcher.bind((EditText) K(i), 22);
    }

    public final void w0() {
    }

    public final void x0(String str) {
        String sb;
        if (TextUtils.equals(null, "CLABE")) {
            StringBuilder sb2 = new StringBuilder();
            if (str != null) {
                char[] charArray = str.toCharArray();
                f30.g(charArray, "this as java.lang.String).toCharArray()");
                if (charArray != null) {
                    int length = charArray.length;
                    int i = 0;
                    int i2 = 0;
                    while (i < length) {
                        int i3 = i2 + 1;
                        sb2.append(charArray[i]);
                        if (i2 == 2 && i2 != str.length() - 1) {
                            sb2.append("-");
                        }
                        if (i2 == 5 && i2 != str.length() - 1) {
                            sb2.append("-");
                        }
                        if (i2 == 9 && i2 != str.length() - 1) {
                            sb2.append("-");
                        }
                        if (i2 == 13 && i2 != str.length() - 1) {
                            sb2.append("-");
                        }
                        if (i2 == 16 && i2 != str.length() - 1) {
                            sb2.append("-");
                        }
                        i++;
                        i2 = i3;
                    }
                }
            }
            sb = sb2.toString();
        } else {
            StringBuilder sb3 = new StringBuilder();
            if (str != null) {
                char[] charArray2 = str.toCharArray();
                f30.g(charArray2, "this as java.lang.String).toCharArray()");
                if (charArray2 != null) {
                    int length2 = charArray2.length;
                    int i4 = 0;
                    int i5 = 0;
                    while (i4 < length2) {
                        int i6 = i5 + 1;
                        sb3.append(charArray2[i4]);
                        if (i5 >= 3 && i6 % 4 == 0 && i5 != str.length() - 1) {
                            sb3.append("-");
                        }
                        i4++;
                        i5 = i6;
                    }
                }
            }
            sb = sb3.toString();
        }
        w9.a aVar = w9.j;
        String string = StringUtils.getString(R$string.bind_bank_Card_dialog_msg, new Object[]{null});
        f30.g(string, "getString(R.string.bind_…nk_Card_dialog_msg, text)");
        w9 a2 = aVar.a(string, sb, "Modificar", "Continuar");
        a2.g(new g());
        a2.showNow(getSupportFragmentManager(), "BindBankCardDialogFragment");
    }

    public final void y0(Glide glide) {
        us0 a2 = us0.m.a(new ArrayList(glide.getLievg()), glide.getGosl());
        a2.i(new h(glide, this));
        if (ActivityUtils.getTopActivity() instanceof FragmentActivity) {
            FragmentActivity topActivity = ActivityUtils.getTopActivity();
            f30.f(topActivity, "null cannot be cast to non-null type androidx.fragment.app.FragmentActivity");
            a2.showNow(topActivity.getSupportFragmentManager(), "SelectOptionsFragment");
        }
    }
}