正在查看: CreditNow v1.0.2 应用的 VerifyNewMobileActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CreditNow v1.0.2 应用的 VerifyNewMobileActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.aa.my.view;
import android.net.Uri;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import androidx.appcompat.widget.AppCompatImageView;
import com.aa.commonuilibrary.R$drawable;
import com.aa.commonuilibrary.base.activity.BaseActivity;
import com.aa.my.R$string;
import com.aa.my.databinding.ActivityVerifyNewMobileBinding;
import com.aa.my.viewmodel.VerifyNewMobileViewModel;
import com.cat.themelibrary.R$color;
import com.orhanobut.logger.Logger;
import defpackage.a10;
import defpackage.az;
import defpackage.d40;
import defpackage.e00;
import defpackage.ex4;
import defpackage.f00;
import defpackage.g10;
import defpackage.h40;
import defpackage.j40;
import defpackage.j41;
import defpackage.jp;
import defpackage.k14;
import defpackage.op1;
import defpackage.ph0;
import defpackage.pp1;
import defpackage.td;
import defpackage.tp;
import defpackage.v10;
import defpackage.w30;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
@Metadata
public final class VerifyNewMobileActivity extends BaseActivity<VerifyNewMobileViewModel, ActivityVerifyNewMobileBinding> {
@Metadata
public final class a {
public a() {
}
public final void a() {
((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).etMobileAcVerifyNewMobile.setText("");
}
public final void b() {
((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).etOtpAcVerifyNewMobile.setText("");
}
public final void c() {
VerifyNewMobileActivity.this.w1();
}
}
@Metadata
public static final class d implements op1 {
public d() {
}
@Override
public void a(@NotNull View view, boolean z) {
Intrinsics.checkNotNullParameter(view, "v");
if (VerifyNewMobileActivity.this.s1()) {
if (VerifyNewMobileActivity.this.t1()) {
String string = VerifyNewMobileActivity.this.getResources().getString(R$string.cat_my_str_please_input_info_2);
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
j40.a.b(j40.a, VerifyNewMobileActivity.this.Q0(), string, 0, 4, null);
} else if (VerifyNewMobileActivity.this.u1()) {
VerifyNewMobileActivity.this.y1();
}
}
}
}
@Metadata
public static final class e extends jp<tp<Void>> {
public e() {
}
@Override
public void b(Throwable th) {
VerifyNewMobileActivity.this.M0();
j40.a.b(j40.a, VerifyNewMobileActivity.this.Q0(), VerifyNewMobileActivity.this.getResources().getString(com.aa.foundation.R$string.str_network_error), 0, 4, null);
}
@Override
public void a(tp<Void> tpVar) {
VerifyNewMobileActivity.this.M0();
td.a.a(VerifyNewMobileActivity.this.Q0(), tpVar);
}
@Override
public void c(tp<Void> tpVar) {
VerifyNewMobileActivity.this.M0();
j41.a.c(new v10(v10.c, ""));
VerifyNewMobileActivity.this.C1();
}
}
@Metadata
public static final class f extends jp<tp<Void>> {
public f() {
}
@Override
public void b(Throwable th) {
VerifyNewMobileActivity.this.M0();
td.a.b(VerifyNewMobileActivity.this.Q0());
}
@Override
public void a(tp<Void> tpVar) {
VerifyNewMobileActivity.this.M0();
td.a.a(VerifyNewMobileActivity.this.Q0(), tpVar);
}
@Override
public void c(tp<Void> tpVar) {
VerifyNewMobileActivity.this.M0();
new d40(VerifyNewMobileActivity.this.Q0()).a();
((VerifyNewMobileViewModel) VerifyNewMobileActivity.this.O0()).setMSendOtpSuccess(true);
VerifyNewMobileActivity.this.D1();
((VerifyNewMobileViewModel) VerifyNewMobileActivity.this.O0()).countDown(((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).tvResendAcVerifyCurrentMobile);
}
}
@Metadata
public static final class g extends jp<tp<Boolean>> {
public g() {
}
@Override
public void b(Throwable th) {
VerifyNewMobileActivity.this.M0();
td.a.b(VerifyNewMobileActivity.this.Q0());
}
@Override
public void a(tp<Boolean> tpVar) {
VerifyNewMobileActivity.this.M0();
td.a.a(VerifyNewMobileActivity.this.Q0(), tpVar);
}
@Override
public void c(tp<Boolean> tpVar) {
if (tpVar != null && Intrinsics.a(tpVar.data, Boolean.TRUE)) {
VerifyNewMobileActivity.this.v1();
} else {
VerifyNewMobileActivity.this.M0();
td.a.a(VerifyNewMobileActivity.this.Q0(), tpVar);
}
}
}
private final String A1() {
return i84.u(String.valueOf(((ActivityVerifyNewMobileBinding) n1()).etMobileAcVerifyNewMobile.getText()), " ", "", false, 4, (Object) null);
}
public final void D1() {
String A1 = A1();
String B1 = B1();
if (((VerifyNewMobileViewModel) O0()).checkMobile(A1) && ((VerifyNewMobileViewModel) O0()).checkOtp(B1) && ((VerifyNewMobileViewModel) O0()).getMSendOtpSuccess()) {
((ActivityVerifyNewMobileBinding) n1()).tvSubmitAcVerifyCurrentMobile.setAble(true);
} else {
((ActivityVerifyNewMobileBinding) n1()).tvSubmitAcVerifyCurrentMobile.setAble(false);
}
}
private final void r1() {
((ActivityVerifyNewMobileBinding) n1()).etMobileAcVerifyNewMobile.addTextChangedListener(new b());
((ActivityVerifyNewMobileBinding) n1()).etOtpAcVerifyNewMobile.addTextChangedListener(new c());
((ActivityVerifyNewMobileBinding) n1()).tvSubmitAcVerifyCurrentMobile.setOnClickCallbackWithAble(new d());
}
private final void z1() {
String str;
String string;
Uri data = getIntent().getData();
String str2 = "";
if (data == null || (str = data.getQueryParameter("authType")) == null) {
str = "";
}
((VerifyNewMobileViewModel) O0()).setMAuthType(str);
Bundle extras = getIntent().getExtras();
if (extras != null && (string = extras.getString("mLivenessImageUrl")) != null) {
str2 = string;
}
((VerifyNewMobileViewModel) O0()).setMLivenessImageUrl(str2);
}
@NotNull
public final String B1() {
return String.valueOf(((ActivityVerifyNewMobileBinding) n1()).etOtpAcVerifyNewMobile.getText());
}
public final void C1() {
e00 B;
e00 C;
e00 A;
e00 v;
e00 e00Var = new e00();
String string = getResources().getString(R$string.cat_my_str_change_mobile_dialog_success_title);
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
String string2 = getResources().getString(R$string.cat_my_str_change_mobile_dialog_success_desc);
Intrinsics.checkNotNullExpressionValue(string2, "getString(...)");
String string3 = getResources().getString(R$string.str_continuar);
Intrinsics.checkNotNullExpressionValue(string3, "getString(...)");
e00 n = e00Var.n(this, f00.b.a);
if (n != null && (B = n.B(string)) != null && (C = B.C(R$drawable.cat_icon_common_dialog_success)) != null && (A = C.A(string2)) != null && (v = A.v(string3)) != null) {
v.h();
}
e00Var.y(new h(e00Var));
}
@Override
public void V0(Bundle bundle) {
h40.a.d(this);
((ActivityVerifyNewMobileBinding) n1()).setClick(new a());
ex4.c().e(false);
z1();
r1();
D1();
}
@f94(threadMode = ThreadMode.MAIN)
public final void onMessageEvent(v10<k14> v10Var) {
k14 b2;
if (v10Var != null && v10Var.a() == v10.h && (b2 = v10Var.b()) != null && b2.b()) {
String a2 = b2.a();
if (a2 == null) {
a2 = "";
}
if (TextUtils.isEmpty(a2)) {
return;
}
((ActivityVerifyNewMobileBinding) n1()).etOtpAcVerifyNewMobile.setText(a2);
}
}
public final boolean s1() {
if (((VerifyNewMobileViewModel) O0()).checkMobile(A1())) {
return true;
}
j40.a.b(j40.a, Q0(), getResources().getString(R$string.str_mobile_check_failed_2), 0, 4, null);
return false;
}
public final boolean t1() {
return w30.a.c(g10.a.f(), A1());
}
public final boolean u1() {
if (((VerifyNewMobileViewModel) O0()).checkOtp(B1())) {
return true;
}
j40.a.b(j40.a, Q0(), getResources().getString(R$string.str_mobile_check_failed), 0, 4, null);
return false;
}
public final void v1() {
((VerifyNewMobileViewModel) O0()).dealWithChangeMobileResp(Q0(), A1(), B1(), new e());
}
public final void w1() {
if (((VerifyNewMobileViewModel) O0()).getMCanClickSend()) {
if (!((VerifyNewMobileViewModel) O0()).checkMobile(A1())) {
j40.a.b(j40.a, Q0(), getResources().getString(R$string.str_mobile_check_failed), 0, 4, null);
return;
}
if (!t1()) {
l1();
x1();
} else {
String string = getResources().getString(R$string.cat_my_str_please_input_info_2);
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
j40.a.b(j40.a, Q0(), string, 0, 4, null);
}
}
}
public final void x1() {
((VerifyNewMobileViewModel) O0()).dealWithSendMessageResp(A1(), new f());
}
public final void y1() {
String A1 = A1();
String B1 = B1();
l1();
((VerifyNewMobileViewModel) O0()).dealWithValidSmsCodeResp(A1, B1, new g());
}
@Metadata
public static final class h implements pp1 {
public final e00 a;
public h(e00 e00Var) {
this.a = e00Var;
}
@Override
public void c() {
Logger.e("onSingleBtnClick", new Object[0]);
this.a.b();
az.b.a().d("changeMobile");
}
@Override
public void a() {
}
@Override
public void b() {
}
}
@Metadata
public static final class b implements TextWatcher {
public b() {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
if (charSequence == null || charSequence.length() <= 0) {
AppCompatImageView appCompatImageView = ((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).ivClearMobileAcRegisterAndLogin;
Intrinsics.checkNotNullExpressionValue(appCompatImageView, "ivClearMobileAcRegisterAndLogin");
dr4.e(appCompatImageView);
} else {
AppCompatImageView appCompatImageView2 = ((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).ivClearMobileAcRegisterAndLogin;
Intrinsics.checkNotNullExpressionValue(appCompatImageView2, "ivClearMobileAcRegisterAndLogin");
dr4.g(appCompatImageView2);
}
if (((VerifyNewMobileViewModel) VerifyNewMobileActivity.this.O0()).checkMobile(String.valueOf(charSequence))) {
((VerifyNewMobileViewModel) VerifyNewMobileActivity.this.O0()).setMCanClickSend(true);
((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).tvResendAcVerifyCurrentMobile.setTextColor(ph0.c(VerifyNewMobileActivity.this.Q0(), R$color.color_12B298));
} else {
((VerifyNewMobileViewModel) VerifyNewMobileActivity.this.O0()).setMCanClickSend(false);
((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).tvResendAcVerifyCurrentMobile.setTextColor(ph0.c(VerifyNewMobileActivity.this.Q0(), R$color.color_12B298_alpha_60));
}
a10.a.f(String.valueOf(charSequence), ((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).etMobileAcVerifyNewMobile);
VerifyNewMobileActivity.this.D1();
}
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
}
@Metadata
public static final class c implements TextWatcher {
public c() {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
if (charSequence == null || charSequence.length() <= 0) {
AppCompatImageView appCompatImageView = ((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).ivClearOtpAcRegisterAndLogin;
Intrinsics.checkNotNullExpressionValue(appCompatImageView, "ivClearOtpAcRegisterAndLogin");
dr4.e(appCompatImageView);
} else {
AppCompatImageView appCompatImageView2 = ((ActivityVerifyNewMobileBinding) VerifyNewMobileActivity.this.n1()).ivClearOtpAcRegisterAndLogin;
Intrinsics.checkNotNullExpressionValue(appCompatImageView2, "ivClearOtpAcRegisterAndLogin");
dr4.g(appCompatImageView2);
}
VerifyNewMobileActivity.this.D1();
}
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
}
}