正在查看: Easycash v3.75.13 应用的 OpenRDLActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Easycash v3.75.13 应用的 OpenRDLActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fintopia.lender.module.rdl;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.OnClick;
import com.bigkoo.pickerview.OptionsPickerView;
import com.bigkoo.pickerview.TimePickerView;
import com.fintopia.lender.R;
import com.fintopia.lender.module.LabelBean;
import com.fintopia.lender.module.baseui.LenderCommonActivity;
import com.fintopia.lender.module.livecheck.LiveCheckPreviewActivity;
import com.fintopia.lender.module.maintab.model.UserStatusResponse;
import com.fintopia.lender.module.network.ILenderApiRoutes;
import com.fintopia.lender.module.rdl.model.AuthInfoStepResponse;
import com.fintopia.lender.module.rdl.model.AuthOptionType;
import com.fintopia.lender.module.rdl.model.AuthStepResponse;
import com.fintopia.lender.module.rdl.model.AuthStepType;
import com.fintopia.lender.module.rdl.model.GetAuthOptionListInfoResponse;
import com.fintopia.lender.module.rdl.model.LenderAddressSelectEvent;
import com.fintopia.lender.module.rdl.model.LenderIndustryVocationResponse;
import com.fintopia.lender.module.utils.AuthStepRationale;
import com.fintopia.lender.module.utils.YqdUtils;
import com.fintopia.lender.widget.FullScreenDialog;
import com.fintopia.lender.widget.LenderBottomAddressDialog;
import com.fintopia.lender.widget.LenderTwoRowSelectCompanion;
import com.fintopia.lender.widget.PickViewHelper;
import com.fintopia.livenessdetection.facev5.models.LiveDetectionArgs;
import com.google.android.gms.common.Scopes;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.model.IdnBaseResult;
import com.lingyue.idnbaselib.model.IdnObserver;
import com.lingyue.idnbaselib.model.events.UserConfirmAgreementEvent;
import com.lingyue.idnbaselib.model.live.LiveDetectionEvent;
import com.lingyue.idnbaselib.utils.FieldRuleUtils;
import com.lingyue.idnbaselib.utils.SmoothScrollUtils;
import com.lingyue.idnbaselib.utils.ThirdPartEventUtils;
import com.lingyue.idnbaselib.widget.InterceptCheckBox;
import com.lingyue.idnbaselib.widget.NPWPEditText;
import com.lingyue.supertoolkit.customtools.CollectionUtils;
import com.lingyue.supertoolkit.formattools.DateFormatUtil;
import com.lingyue.supertoolkit.widgets.BaseUtils;
import com.sensorsdata.analytics.android.autotrack.aop.SensorsDataAutoTrackHelper;
import com.sensorsdata.analytics.android.sdk.SensorsDataInstrumented;
import com.veda.android.bananalibrary.infrastructure.BaseActivity;
import com.yangqianguan.statistics.AutoTrackHelper;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
@AuthStepRationale
public class OpenRDLActivity extends LenderCommonActivity {
public static final String INTENT_KEY_IS_DISPLAY_LIVING_CHECK_VIEW = "isDisplayLivingCheckView";
public static final String INTENT_KEY_IS_FINISH_LIVE_CHECK = "isFinishLiveCheck";
public static final String INTENT_KEY_IS_HAS_TAX_CARD = "isHasTaxCard";
public static final String INTENT_KEY_IS_RDL_SUPPLEMENT = "isRdlSupplement";
private LabelBean C;
private LabelBean D;
private LabelBean E;
private LabelBean F;
private boolean I;
private boolean J;
private boolean K;
private Date L;
private LabelBean O;
private LabelBean P;
private LabelBean Q;
private LabelBean R;
private LabelBean S;
private LabelBean T;
private LabelBean U;
private LabelBean V;
private LenderBottomAddressDialog W;
private LenderBottomAddressDialog X;
private LenderBottomAddressDialog Y;
private InterceptCheckBox.CheckedInterceptor Z;
@BindView(4738)
InterceptCheckBox cbReadProtocol;
@BindView(4741)
CheckBox cbTaxCard;
@BindView(4881)
EditText etEmail;
@BindView(4882)
EditText etEmployerAddress;
@BindView(4883)
EditText etEmployerName;
@BindView(4888)
EditText etMotherName;
@BindView(4890)
EditText etNeighborhoodCommittee;
@BindView(4901)
EditText etStreet;
@BindView(4902)
NPWPEditText etTaxCardNumber;
@BindView(5954)
View lineEmail;
@BindView(5142)
LinearLayout llLivingCheck;
@BindView(5161)
LinearLayout llRdlSupplement;
@BindView(5169)
LinearLayout llTaxCard;
@BindView(5384)
ScrollView scrollView;
@BindView(5567)
TextView tvAddress;
@BindView(5571)
TextView tvAddressTitle;
@BindView(5600)
TextView tvBirthplace;
@BindView(5601)
TextView tvBirthplaceTitle;
@BindView(5652)
TextView tvEducationLevel;
@BindView(5653)
TextView tvEducationLevelTitle;
@BindView(5654)
TextView tvEmail;
@BindView(5655)
TextView tvEmployerAddress;
@BindView(5656)
TextView tvEmployerCity;
@BindView(5657)
TextView tvEmployerCityTitle;
@BindView(5658)
TextView tvEmployerName;
@BindView(5689)
TextView tvKtpExpiryDate;
@BindView(5690)
TextView tvKtpExpiryDateTitle;
@BindView(5714)
TextView tvLivingCheckStatus;
@BindView(5724)
TextView tvMaritalStatus;
@BindView(5725)
TextView tvMaritalStatusTitle;
@BindView(5743)
TextView tvMonthlyIncome;
@BindView(5744)
TextView tvMonthlyIncomeTitle;
@BindView(5746)
TextView tvMotherName;
@BindView(5750)
TextView tvNeighborhoodCommittee;
@BindView(5769)
TextView tvOpenRDLReason;
@BindView(5770)
TextView tvOpenRDLReasonTitle;
@BindView(5812)
TextView tvProfession;
@BindView(5813)
TextView tvProfessionTitle;
@BindView(5816)
TextView tvProtocol;
@BindView(5832)
TextView tvReligion;
@BindView(5833)
TextView tvReligionTitle;
@BindView(5863)
TextView tvSourceOfFund;
@BindView(5864)
TextView tvSourceOfFundTitle;
@BindView(5870)
TextView tvStreet;
@BindView(5877)
TextView tvTaxCard;
@BindView(5878)
TextView tvTaxCardNumber;
private LenderTwoRowSelectCompanion f149u;
@BindView(5953)
View vEducationLevel;
@BindView(5955)
View vEmployerAddressLine;
@BindView(5956)
View vEmployerCityLine;
@BindView(5957)
View vEmployerNameLine;
@BindView(5976)
View vMonthlyIncome;
@BindView(5977)
View vMotherNameLine;
@BindView(5982)
View vOpenRDLReason;
@BindView(5986)
View vProfession;
@BindView(5994)
View vSourceOfFund;
@BindView(5997)
View vTaxCardNumberLine;
private LabelBean f152x;
private LabelBean z;
private boolean f150v = true;
private ArrayList<LabelBean> f151w = new ArrayList<>();
private ArrayList<LabelBean> y = new ArrayList<>();
private ArrayList<LabelBean> A = new ArrayList<>();
private ArrayList<LabelBean> B = new ArrayList<>();
private final String G = "OPEN_RDL";
private final String H = "INVESTAJA_RDL_ACCOUNT";
private ArrayList<LabelBean> M = new ArrayList<>();
private ArrayList<LabelBean> N = new ArrayList<>();
static class AnonymousClass11 {
static final int[] a;
static {
int[] iArr = new int[AuthOptionType.values().length];
a = iArr;
try {
iArr[AuthOptionType.EDUCATION.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[AuthOptionType.OPEN_RDL_ACCOUNT_REASON.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[AuthOptionType.SOURCE_OF_FUND.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[AuthOptionType.MARRY_STATUS.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[AuthOptionType.RELIGION.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[AuthOptionType.MONTHLY_INCOME_RANGE.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
}
}
public void A0() {
LiveCheckPreviewActivity.startECLiveCheckPreviewActivity(this, new LiveDetectionArgs(5, this.userSession.b().b, null));
}
private void B0() {
LenderTwoRowSelectCompanion lenderTwoRowSelectCompanion = new LenderTwoRowSelectCompanion(getString(R.string.industry_vocation), this.tvProfession, this);
this.f149u = lenderTwoRowSelectCompanion;
lenderTwoRowSelectCompanion.e(new LenderTwoRowSelectCompanion.TwoRowSelectViewListener() {
@Override
public void a() {
OpenRDLActivity.this.c1();
}
@Override
public void b(View view, LabelBean labelBean, LabelBean labelBean2) {
OpenRDLActivity.this.E = labelBean;
OpenRDLActivity.this.F = labelBean2;
OpenRDLActivity.this.tvProfession.setText(labelBean.label + " " + labelBean2.label);
}
});
}
private void C0() {
InterceptCheckBox.CheckedInterceptor checkedInterceptor = new InterceptCheckBox.CheckedInterceptor() {
public final boolean a() {
boolean O0;
O0 = OpenRDLActivity.this.O0();
return O0;
}
};
this.Z = checkedInterceptor;
this.cbReadProtocol.setCheckedInterceptor(checkedInterceptor);
String string = getString(R.string.lender_protocol_template_2);
String string2 = getString(R.string.lender_protocol_open_rdl);
String format = MessageFormat.format(string, string2);
int indexOf = format.indexOf(string2);
int length = string2.length() + indexOf;
SpannableString spannableString = new SpannableString(format);
spannableString.setSpan(YqdUtils.c(this, new Runnable() {
@Override
public final void run() {
OpenRDLActivity.this.P0();
}
}), indexOf, length, 33);
this.tvProtocol.setMovementMethod(LinkMovementMethod.getInstance());
this.tvProtocol.setText(spannableString);
}
private boolean D0() {
return (this.R == null || this.S == null || this.T == null || this.U == null) ? false : true;
}
public void E0(Activity activity, FullScreenDialog fullScreenDialog, View view, OptionsPickerView optionsPickerView) {
LabelBean labelBean = this.f152x;
if (labelBean != null) {
optionsPickerView.y(this.f151w.indexOf(labelBean));
}
}
public void F0(View view, LabelBean labelBean) {
this.f152x = labelBean;
this.tvEducationLevel.setText(labelBean.label);
}
public void G0(View view, LabelBean labelBean) {
this.D = labelBean;
this.tvMonthlyIncome.setText(labelBean.label);
}
public void H0(Activity activity, FullScreenDialog fullScreenDialog, View view, OptionsPickerView optionsPickerView) {
LabelBean labelBean = this.D;
if (labelBean != null) {
optionsPickerView.y(this.B.indexOf(labelBean));
}
}
public void I0(Activity activity, FullScreenDialog fullScreenDialog, View view, OptionsPickerView optionsPickerView) {
LabelBean labelBean = this.P;
if (labelBean != null) {
optionsPickerView.y(this.M.indexOf(labelBean));
}
}
public void J0(View view, LabelBean labelBean) {
this.z = labelBean;
this.tvOpenRDLReason.setText(labelBean.label);
}
public void K0(Activity activity, FullScreenDialog fullScreenDialog, View view, OptionsPickerView optionsPickerView) {
LabelBean labelBean = this.z;
if (labelBean != null) {
optionsPickerView.y(this.y.indexOf(labelBean));
}
}
public void L0(Activity activity, FullScreenDialog fullScreenDialog, View view, OptionsPickerView optionsPickerView) {
LabelBean labelBean = this.Q;
if (labelBean != null) {
optionsPickerView.y(this.N.indexOf(labelBean));
}
}
public void M0(View view, LabelBean labelBean) {
this.C = labelBean;
this.tvSourceOfFund.setText(labelBean.label);
}
public void N0(Activity activity, FullScreenDialog fullScreenDialog, View view, OptionsPickerView optionsPickerView) {
LabelBean labelBean = this.C;
if (labelBean != null) {
optionsPickerView.y(this.A.indexOf(labelBean));
}
}
public boolean O0() {
W0(true);
return true;
}
public void P0() {
if (BaseUtils.l()) {
return;
}
W0(false);
}
@SensorsDataInstrumented
public static void Q0(CompoundButton compoundButton, boolean z) {
SensorsDataAutoTrackHelper.trackViewOnClick(compoundButton);
AutoTrackHelper.b(compoundButton, z);
}
public void R0(View view, Date date) {
this.tvKtpExpiryDate.setText(DateFormatUtil.d(date));
this.L = date;
}
public static void S0(Activity activity, FullScreenDialog fullScreenDialog, View view, TimePickerView timePickerView) {
timePickerView.r(false);
Calendar calendar = Calendar.getInstance();
Calendar calendar2 = Calendar.getInstance();
Calendar calendar3 = Calendar.getInstance();
calendar.add(1, 100);
calendar2.add(1, -100);
int i = calendar.get(1);
Date time = calendar3.getTime();
timePickerView.t(calendar2.get(1), i);
timePickerView.w(time);
}
public void T0(LenderAddressSelectEvent lenderAddressSelectEvent) {
LabelBean labelBean;
if (lenderAddressSelectEvent == null || (labelBean = lenderAddressSelectEvent.provinceLabelBean) == null) {
return;
}
this.R = labelBean;
this.S = lenderAddressSelectEvent.cityLabelBean;
this.T = lenderAddressSelectEvent.districtLabelBean;
this.U = lenderAddressSelectEvent.villageLabelBean;
StringBuilder sb = new StringBuilder(labelBean.label);
if (this.S != null) {
sb.append(", ");
sb.append(this.S.label);
}
if (this.T != null) {
sb.append(", ");
sb.append(this.T.label);
}
if (this.U != null) {
sb.append(", ");
sb.append(this.U.label);
}
this.tvAddress.setText(sb.toString());
}
public void U0(LenderAddressSelectEvent lenderAddressSelectEvent) {
LabelBean labelBean;
if (lenderAddressSelectEvent == null || (labelBean = lenderAddressSelectEvent.cityLabelBean) == null) {
return;
}
this.O = labelBean;
this.tvBirthplace.setText(labelBean.label);
}
public void V0(LenderAddressSelectEvent lenderAddressSelectEvent) {
LabelBean labelBean;
if (lenderAddressSelectEvent == null || (labelBean = lenderAddressSelectEvent.cityLabelBean) == null) {
return;
}
this.V = labelBean;
this.tvEmployerCity.setText(labelBean.label);
}
private void W0(boolean z) {
jumpToWebPage(Uri.parse(((BaseActivity) this).appGlobal.a.a().toString()).buildUpon().path("webview/static-agreement/INVESTAJA_RDL_ACCOUNT").appendQueryParameter("key", "INVESTAJA_RDL_ACCOUNT").appendQueryParameter("confirm", String.valueOf(z)).appendQueryParameter("purpose", "OPEN_RDL").build().toString());
}
public void X0(AuthInfoStepResponse authInfoStepResponse) {
AuthInfoStepResponse.Body body;
LabelBean labelBean;
if (authInfoStepResponse == null || (body = authInfoStepResponse.body) == null) {
return;
}
if (!TextUtils.isEmpty(body.npwpNumber)) {
this.etTaxCardNumber.setText(authInfoStepResponse.body.npwpNumber);
}
LabelBean labelBean2 = authInfoStepResponse.body.openRdlAccountReason;
if (labelBean2 != null) {
this.z = labelBean2;
this.tvOpenRDLReason.setText(labelBean2.label);
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.motherLastName)) {
this.etMotherName.setText(authInfoStepResponse.body.motherLastName);
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.employerName)) {
this.etEmployerName.setText(authInfoStepResponse.body.employerName);
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.employerCity)) {
LabelBean labelBean3 = new LabelBean(authInfoStepResponse.body.employerCity, "");
this.V = labelBean3;
this.tvEmployerCity.setText(labelBean3.label);
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.employerAddress)) {
this.etEmployerAddress.setText(authInfoStepResponse.body.employerAddress);
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.expiryDate)) {
Date c = DateFormatUtil.c(authInfoStepResponse.body.expiryDate);
this.L = c;
this.tvKtpExpiryDate.setText(DateFormatUtil.d(c));
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.birthPlace)) {
LabelBean labelBean4 = new LabelBean(authInfoStepResponse.body.birthPlace, "");
this.O = labelBean4;
this.tvBirthplace.setText(labelBean4.label);
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.province)) {
this.R = new LabelBean(authInfoStepResponse.body.province, "");
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.city)) {
this.S = new LabelBean(authInfoStepResponse.body.city, "");
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.district)) {
this.T = new LabelBean(authInfoStepResponse.body.district, "");
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.village)) {
this.U = new LabelBean(authInfoStepResponse.body.village, "");
}
LabelBean labelBean5 = this.R;
if (labelBean5 != null && this.S != null && this.T != null && this.U != null) {
this.tvAddress.setText(labelBean5.label + ", " + this.S.label + ", " + this.T.label + ", " + this.U.label);
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.street)) {
this.etStreet.setText(authInfoStepResponse.body.street);
}
LabelBean labelBean6 = authInfoStepResponse.body.marryStatus;
if (labelBean6 != null) {
this.P = labelBean6;
this.tvMaritalStatus.setText(labelBean6.label);
}
LabelBean labelBean7 = authInfoStepResponse.body.religion;
if (labelBean7 != null) {
this.Q = labelBean7;
this.tvReligion.setText(labelBean7.label);
}
if (!TextUtils.isEmpty(authInfoStepResponse.body.email)) {
this.etEmail.setText(authInfoStepResponse.body.email);
}
LabelBean labelBean8 = authInfoStepResponse.body.monthlyIncome;
if (labelBean8 != null) {
this.D = labelBean8;
this.tvMonthlyIncome.setText(labelBean8.label);
}
LabelBean labelBean9 = authInfoStepResponse.body.sourceOfFund;
if (labelBean9 != null) {
this.C = labelBean9;
this.tvSourceOfFund.setText(labelBean9.label);
}
LabelBean labelBean10 = authInfoStepResponse.body.education;
if (labelBean10 != null) {
this.f152x = labelBean10;
this.tvEducationLevel.setText(labelBean10.label);
}
AuthInfoStepResponse.Body body2 = authInfoStepResponse.body;
LabelBean labelBean11 = body2.industry;
if (labelBean11 != null && (labelBean = body2.profession) != null) {
this.E = labelBean11;
this.F = labelBean;
this.tvProfession.setText(this.E.label + " " + this.F.label);
}
if (TextUtils.isEmpty(authInfoStepResponse.body.rtrw)) {
return;
}
this.etNeighborhoodCommittee.setText(authInfoStepResponse.body.rtrw);
}
public void Y0(GetAuthOptionListInfoResponse getAuthOptionListInfoResponse, AuthOptionType authOptionType) {
switch (AnonymousClass11.a[authOptionType.ordinal()]) {
case 1:
this.f151w.clear();
this.f151w.addAll(getAuthOptionListInfoResponse.body);
t0();
break;
case 2:
this.y.clear();
this.y.addAll(getAuthOptionListInfoResponse.body);
x0();
break;
case 3:
this.A.clear();
this.A.addAll(getAuthOptionListInfoResponse.body);
z0();
break;
case 4:
this.M.clear();
this.M.addAll(getAuthOptionListInfoResponse.body);
w0();
break;
case 5:
this.N.clear();
this.N.addAll(getAuthOptionListInfoResponse.body);
y0();
break;
case 6:
this.B.clear();
this.B.addAll(getAuthOptionListInfoResponse.body);
v0();
break;
}
}
public void Z0(boolean z) {
this.K = z;
this.tvLivingCheckStatus.setEnabled(!z);
this.tvLivingCheckStatus.setText(z ? R.string.lender_completed : R.string.lender_go_live_recognition);
}
private void a1() {
this.llRdlSupplement.setVisibility(this.I ? 0 : 8);
this.tvEmail.setVisibility(this.I ? 0 : 8);
this.etEmail.setVisibility(this.I ? 0 : 8);
this.lineEmail.setVisibility(this.I ? 0 : 8);
this.tvProfessionTitle.setVisibility(this.I ? 0 : 8);
this.tvProfession.setVisibility(this.I ? 0 : 8);
this.vProfession.setVisibility(this.I ? 0 : 8);
this.tvMonthlyIncomeTitle.setVisibility(this.I ? 0 : 8);
this.tvMonthlyIncome.setVisibility(this.I ? 0 : 8);
this.vMonthlyIncome.setVisibility(this.I ? 0 : 8);
this.tvEducationLevelTitle.setVisibility(this.I ? 0 : 8);
this.tvEducationLevel.setVisibility(this.I ? 0 : 8);
this.vEducationLevel.setVisibility(this.I ? 0 : 8);
this.tvSourceOfFundTitle.setVisibility(this.I ? 0 : 8);
this.tvSourceOfFund.setVisibility(this.I ? 0 : 8);
this.vSourceOfFund.setVisibility(this.I ? 0 : 8);
if (this.J) {
this.llLivingCheck.setVisibility(0);
} else {
this.llLivingCheck.setVisibility(8);
}
}
public void b1(boolean z) {
this.tvTaxCardNumber.setVisibility(z ? 0 : 8);
this.etTaxCardNumber.setVisibility(z ? 0 : 8);
this.vTaxCardNumberLine.setVisibility(z ? 0 : 8);
}
public void c1() {
showLoadingDialog();
((ILenderApiRoutes) this.apiHelper.a()).x().K(AndroidSchedulers.a()).a(new IdnObserver<LenderIndustryVocationResponse>(this) {
public void onSuccess(LenderIndustryVocationResponse lenderIndustryVocationResponse) {
OpenRDLActivity.this.dismissLoadingDialog();
OpenRDLActivity.this.f149u.d(lenderIndustryVocationResponse.body);
OpenRDLActivity.this.f149u.f();
}
});
}
private void d1() {
showLoadingDialog();
((ILenderApiRoutes) this.apiHelper.a()).d1(AuthStepType.RDL.name()).a(new IdnObserver<AuthInfoStepResponse>(this) {
public void onSuccess(AuthInfoStepResponse authInfoStepResponse) {
OpenRDLActivity.this.dismissLoadingDialog();
OpenRDLActivity.this.X0(authInfoStepResponse);
}
});
}
private void displaySelectAddressDlg() {
if (D0()) {
this.W.j();
}
this.W.show();
}
private void e1() {
((ILenderApiRoutes) this.apiHelper.a()).k1().a(new IdnObserver<AuthStepResponse>(this) {
public void onError(Throwable th, AuthStepResponse authStepResponse) {
super.onError(th, authStepResponse);
OpenRDLActivity.this.dismissLoadingDialog();
OpenRDLActivity.this.A0();
}
public void onSuccess(AuthStepResponse authStepResponse) {
OpenRDLActivity.this.dismissLoadingDialog();
boolean isFinishAuthStep = authStepResponse.isFinishAuthStep(AuthStepType.UPLOAD_LIVING_INFO);
OpenRDLActivity.this.Z0(isFinishAuthStep);
if (isFinishAuthStep) {
return;
}
OpenRDLActivity.this.A0();
}
protected boolean superShowErrorToast() {
return false;
}
});
}
public void f1() {
((ILenderApiRoutes) this.apiHelper.a()).Y().a(new IdnObserver<UserStatusResponse>(this) {
public void onSuccess(UserStatusResponse userStatusResponse) {
OpenRDLActivity.this.dismissLoadingDialog();
OpenRDLActivity.this.userSession.b().g = userStatusResponse.body.status;
OpenRDLActivity.this.startActivity(new Intent((Context) OpenRDLActivity.this, (Class<?>) EKycActivity.class));
OpenRDLActivity.this.finish();
}
});
}
private void g1(HashMap<String, String> hashMap) {
((ILenderApiRoutes) this.apiHelper.a()).k0(hashMap).a(new IdnObserver<IdnBaseResult>(getCallBack()) {
public void onSuccess(IdnBaseResult idnBaseResult) {
OpenRDLActivity.this.f1();
}
});
}
private void h1(final AuthOptionType authOptionType) {
showLoadingDialog();
((ILenderApiRoutes) this.apiHelper.a()).w(authOptionType.name()).a(new IdnObserver<GetAuthOptionListInfoResponse>(this) {
public void onSuccess(GetAuthOptionListInfoResponse getAuthOptionListInfoResponse) {
OpenRDLActivity.this.dismissLoadingDialog();
OpenRDLActivity.this.Y0(getAuthOptionListInfoResponse, authOptionType);
}
});
}
private void i1() {
PickViewHelper.c(this, String.valueOf(this.tvKtpExpiryDate.getId()), new PickViewHelper.TimeSelectionCallBack() {
@Override
public final void b(View view, Date date) {
OpenRDLActivity.this.R0(view, date);
}
}, new FullScreenDialog.IFullScreenDialogInitCallBack() {
@Override
public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
OpenRDLActivity.S0(activity, fullScreenDialog, view, (TimePickerView) obj);
}
}).show();
}
private void j1() {
ThirdPartEventUtils.z(this, "lender_rdl_source", this.J ? "bannar" : this.I ? "registeredUser" : "auth");
}
private void s0() {
if (this.O != null) {
this.Y.j();
}
this.Y.show();
}
public static void startOpenRDLActivity(Activity activity, boolean z, boolean z2) {
Intent intent = new Intent(activity, (Class<?>) OpenRDLActivity.class);
intent.putExtra(INTENT_KEY_IS_RDL_SUPPLEMENT, z);
intent.putExtra(INTENT_KEY_IS_DISPLAY_LIVING_CHECK_VIEW, z2);
activity.startActivity(intent);
}
private void t0() {
PickViewHelper.f(this, PickViewHelper.b(this, this.f151w, "R2.id.tv_education_level", new PickViewHelper.SingleRowSelectionCallBack() {
@Override
public final void a(View view, Object obj) {
OpenRDLActivity.this.F0(view, (LabelBean) obj);
}
}), new FullScreenDialog.IFullScreenDialogInitCallBack() {
@Override
public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
OpenRDLActivity.this.E0(activity, fullScreenDialog, view, (OptionsPickerView) obj);
}
});
}
private void u0() {
if (this.V != null) {
this.X.j();
}
this.X.show();
}
private void v0() {
PickViewHelper.f(this, PickViewHelper.b(this, this.B, "R2.id.tv_monthly_income", new PickViewHelper.SingleRowSelectionCallBack() {
@Override
public final void a(View view, Object obj) {
OpenRDLActivity.this.G0(view, (LabelBean) obj);
}
}), new FullScreenDialog.IFullScreenDialogInitCallBack() {
@Override
public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
OpenRDLActivity.this.H0(activity, fullScreenDialog, view, (OptionsPickerView) obj);
}
});
}
private void w0() {
PickViewHelper.f(this, PickViewHelper.b(this, this.M, "R2.id.tv_marital_status", new PickViewHelper.SingleRowSelectionCallBack<LabelBean>() {
@Override
public void a(View view, LabelBean labelBean) {
OpenRDLActivity.this.P = labelBean;
OpenRDLActivity openRDLActivity = OpenRDLActivity.this;
openRDLActivity.tvMaritalStatus.setText(openRDLActivity.P.label);
}
}), new FullScreenDialog.IFullScreenDialogInitCallBack() {
@Override
public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
OpenRDLActivity.this.I0(activity, fullScreenDialog, view, (OptionsPickerView) obj);
}
});
}
private void x0() {
PickViewHelper.f(this, PickViewHelper.b(this, this.y, "R2.id.tv_open_rdl_reason", new PickViewHelper.SingleRowSelectionCallBack() {
@Override
public final void a(View view, Object obj) {
OpenRDLActivity.this.J0(view, (LabelBean) obj);
}
}), new FullScreenDialog.IFullScreenDialogInitCallBack() {
@Override
public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
OpenRDLActivity.this.K0(activity, fullScreenDialog, view, (OptionsPickerView) obj);
}
});
}
private void y0() {
PickViewHelper.f(this, PickViewHelper.b(this, this.N, "R2.id.tv_religion", new PickViewHelper.SingleRowSelectionCallBack<LabelBean>() {
@Override
public void a(View view, LabelBean labelBean) {
OpenRDLActivity.this.Q = labelBean;
OpenRDLActivity openRDLActivity = OpenRDLActivity.this;
openRDLActivity.tvReligion.setText(openRDLActivity.Q.label);
}
}), new FullScreenDialog.IFullScreenDialogInitCallBack() {
@Override
public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
OpenRDLActivity.this.L0(activity, fullScreenDialog, view, (OptionsPickerView) obj);
}
});
}
private void z0() {
PickViewHelper.f(this, PickViewHelper.b(this, this.A, "R2.id.tv_source_of_fund", new PickViewHelper.SingleRowSelectionCallBack() {
@Override
public final void a(View view, Object obj) {
OpenRDLActivity.this.M0(view, (LabelBean) obj);
}
}), new FullScreenDialog.IFullScreenDialogInitCallBack() {
@Override
public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
OpenRDLActivity.this.N0(activity, fullScreenDialog, view, (OptionsPickerView) obj);
}
});
}
@Override
protected void A() {
super.A();
this.W = new LenderBottomAddressDialog(this, getString(R.string.lender_address), false, false, new LenderBottomAddressDialog.CallBack() {
@Override
public final void a(LenderAddressSelectEvent lenderAddressSelectEvent) {
OpenRDLActivity.this.T0(lenderAddressSelectEvent);
}
});
this.X = new LenderBottomAddressDialog(this, getString(R.string.lender_employer_city), true, true, new LenderBottomAddressDialog.CallBack() {
@Override
public final void a(LenderAddressSelectEvent lenderAddressSelectEvent) {
OpenRDLActivity.this.V0(lenderAddressSelectEvent);
}
});
this.Y = new LenderBottomAddressDialog(this, getString(R.string.lender_birthplace), true, true, new LenderBottomAddressDialog.CallBack() {
@Override
public final void a(LenderAddressSelectEvent lenderAddressSelectEvent) {
OpenRDLActivity.this.U0(lenderAddressSelectEvent);
}
});
this.cbTaxCard.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
@SensorsDataInstrumented
public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
OpenRDLActivity.this.f150v = z;
OpenRDLActivity openRDLActivity = OpenRDLActivity.this;
openRDLActivity.b1(openRDLActivity.f150v);
SensorsDataAutoTrackHelper.trackViewOnClick(compoundButton);
AutoTrackHelper.b(compoundButton, z);
}
});
this.cbReadProtocol.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
OpenRDLActivity.Q0(compoundButton, z);
}
});
a1();
C0();
B0();
ThirdPartEventUtils.m(this.etStreet);
ThirdPartEventUtils.m(this.etNeighborhoodCommittee);
ThirdPartEventUtils.m(this.etEmail);
ThirdPartEventUtils.m(this.etTaxCardNumber);
ThirdPartEventUtils.m(this.etMotherName);
ThirdPartEventUtils.m(this.etEmployerName);
ThirdPartEventUtils.m(this.etEmployerAddress);
j1();
}
@Override
protected void G(@NonNull Bundle bundle) {
super.G(bundle);
bundle.putBoolean(INTENT_KEY_IS_RDL_SUPPLEMENT, this.I);
bundle.putBoolean(INTENT_KEY_IS_DISPLAY_LIVING_CHECK_VIEW, this.J);
bundle.putBoolean(INTENT_KEY_IS_HAS_TAX_CARD, this.f150v);
bundle.putBoolean(INTENT_KEY_IS_FINISH_LIVE_CHECK, this.K);
}
@OnClick({5689})
public void chooseKtpExpiryDate() {
if (BaseUtils.l()) {
return;
}
i1();
}
@Override
public int getLayoutID() {
return R.layout.activity_open_rdlactivity;
}
@OnClick({5714})
public void onClickGoLiveCheck() {
if (BaseUtils.l()) {
return;
}
showLoadingDialog();
e1();
}
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
public void onEventUserConfirmAgreement(UserConfirmAgreementEvent userConfirmAgreementEvent) {
if ("OPEN_RDL".equals(userConfirmAgreementEvent.a)) {
EventBus.c().q(userConfirmAgreementEvent);
this.cbReadProtocol.setCheckedInterceptor((InterceptCheckBox.CheckedInterceptor) null);
this.cbReadProtocol.setChecked(true);
this.cbReadProtocol.setCheckedInterceptor(this.Z);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onFinishLiveCheckEvent(LiveDetectionEvent liveDetectionEvent) {
Z0(liveDetectionEvent.result);
}
@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);
}
@OnClick({5567})
public void showAddress(View view) {
if (BaseUtils.l()) {
return;
}
displaySelectAddressDlg();
}
@OnClick({5600})
public void showBirthplace(View view) {
if (BaseUtils.l()) {
return;
}
s0();
}
@OnClick({5652})
public void showEducationLevel(View view) {
if (BaseUtils.l()) {
return;
}
if (CollectionUtils.f(this.f151w)) {
h1(AuthOptionType.EDUCATION);
} else {
t0();
}
}
@OnClick({5656})
public void showEmployerCity(View view) {
if (BaseUtils.l()) {
return;
}
u0();
}
@OnClick({5724})
public void showMaritalStatus(View view) {
if (BaseUtils.l()) {
return;
}
if (CollectionUtils.f(this.M)) {
h1(AuthOptionType.MARRY_STATUS);
} else {
w0();
}
}
@OnClick({5743})
public void showMonthlyIncome() {
if (BaseUtils.l()) {
return;
}
if (CollectionUtils.f(this.B)) {
h1(AuthOptionType.MONTHLY_INCOME_RANGE);
} else {
v0();
}
}
@OnClick({5769})
public void showOpenRDLReason(View view) {
if (BaseUtils.l()) {
return;
}
if (CollectionUtils.f(this.y)) {
h1(AuthOptionType.OPEN_RDL_ACCOUNT_REASON);
} else {
x0();
}
}
@OnClick({5812})
public void showProfession(View view) {
if (BaseUtils.l()) {
return;
}
this.f149u.c();
}
@OnClick({5832})
public void showReligion(View view) {
if (BaseUtils.l()) {
return;
}
if (CollectionUtils.f(this.N)) {
h1(AuthOptionType.RELIGION);
} else {
y0();
}
}
@OnClick({5863})
public void showSourceOfFund(View view) {
if (BaseUtils.l()) {
return;
}
if (CollectionUtils.f(this.A)) {
h1(AuthOptionType.SOURCE_OF_FUND);
} else {
z0();
}
}
@OnClick({4714})
protected void submit() {
if (BaseUtils.l()) {
return;
}
String trim = this.etMotherName.getText().toString().trim();
String trim2 = this.etEmployerName.getText().toString().trim();
String trim3 = this.etEmployerAddress.getText().toString().trim();
String trimmedText = this.etTaxCardNumber.getTrimmedText();
String trim4 = this.etStreet.getText().toString().trim();
String trim5 = this.etNeighborhoodCommittee.getText().toString().trim();
String trim6 = this.etEmail.getText().toString().trim();
if (this.I) {
if (this.J && !this.K) {
BaseUtils.p(this, getString(R.string.lender_pleases_go_live_check));
SmoothScrollUtils.a(this.tvLivingCheckStatus);
return;
}
if (this.L == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_ktp_expiry_date)));
SmoothScrollUtils.a(this.tvKtpExpiryDateTitle);
return;
}
if (this.O == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_birthplace)));
SmoothScrollUtils.a(this.tvBirthplaceTitle);
return;
}
if (!D0()) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_address)));
SmoothScrollUtils.a(this.tvAddressTitle);
return;
}
if (TextUtils.isEmpty(trim4)) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_street)));
SmoothScrollUtils.a(this.tvStreet);
showSoftInput(this.etStreet);
return;
}
if (TextUtils.isEmpty(trim5)) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_neighborhood_committee)));
SmoothScrollUtils.a(this.tvNeighborhoodCommittee);
showSoftInput(this.etNeighborhoodCommittee);
return;
}
if (this.P == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.ec_marital_status)));
SmoothScrollUtils.a(this.tvMaritalStatusTitle);
return;
}
if (this.Q == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_religion)));
SmoothScrollUtils.a(this.tvReligionTitle);
return;
} else if (TextUtils.isEmpty(trim6)) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.ec_personal_email)));
SmoothScrollUtils.a(this.tvEmail);
showSoftInput(this.etEmail);
return;
} else if (!FieldRuleUtils.b(trim6)) {
BaseUtils.o(this, R.string.lender_email_format_error);
SmoothScrollUtils.a(this.tvEmail);
showSoftInput(this.etEmail);
return;
}
}
if (this.f150v && TextUtils.isEmpty(trimmedText)) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_tax_card_number)));
SmoothScrollUtils.a(this.llTaxCard);
showSoftInput(this.etTaxCardNumber);
return;
}
if (this.f150v && !FieldRuleUtils.g(trimmedText)) {
BaseUtils.o(this, R.string.lender_tax_card_number_format_error);
SmoothScrollUtils.a(this.llTaxCard);
showSoftInput(this.etTaxCardNumber);
return;
}
boolean z = this.I;
if (z && (this.E == null || this.F == null)) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.industry_vocation)));
SmoothScrollUtils.a(this.tvProfessionTitle);
return;
}
if (z && this.D == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.ec_monthly_income)));
SmoothScrollUtils.a(this.tvMonthlyIncomeTitle);
return;
}
if (z && this.f152x == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_education_level)));
SmoothScrollUtils.a(this.tvEducationLevelTitle);
return;
}
if (this.z == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_open_rdl_reason)));
SmoothScrollUtils.a(this.tvOpenRDLReasonTitle);
return;
}
if (z && this.C == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_source_of_fund)));
SmoothScrollUtils.a(this.tvSourceOfFundTitle);
return;
}
if (TextUtils.isEmpty(trim)) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.ec_mother_name)));
SmoothScrollUtils.a(this.tvMotherName);
showSoftInput(this.etMotherName);
return;
}
if (TextUtils.isEmpty(trim2)) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_employer_name)));
SmoothScrollUtils.a(this.tvEmployerName);
showSoftInput(this.etEmployerName);
return;
}
if (TextUtils.isEmpty(trim3)) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_employer_address)));
SmoothScrollUtils.a(this.tvEmployerAddress);
showSoftInput(this.etEmployerAddress);
return;
}
if (this.V == null) {
BaseUtils.p(this, MessageFormat.format(getString(R.string.lender_file_empty_toast), getString(R.string.lender_employer_city)));
SmoothScrollUtils.a(this.tvEmployerCityTitle);
return;
}
if (!this.cbReadProtocol.isChecked()) {
BaseUtils.p(this, getString(R.string.lender_not_agree_open_rdl_protocol));
return;
}
HashMap hashMap = new HashMap();
if (this.f150v) {
hashMap.put("npwpNumber", trimmedText);
}
hashMap.put("openRdlAccountReason", this.z.value);
hashMap.put("motherLastName", trim);
hashMap.put("employerName", trim2);
hashMap.put("employerCity", this.V.label);
hashMap.put("employerAddress", trim3);
if (this.I) {
hashMap.put("expiryDate", DateFormatUtil.a(this.L));
hashMap.put("birthPlace", this.O.label);
hashMap.put("province", this.R.label);
hashMap.put("district", this.T.label);
hashMap.put("village", this.U.label);
hashMap.put("city", this.S.label);
hashMap.put("street", trim4);
hashMap.put("marryStatus", this.P.value);
hashMap.put("religion", this.Q.value);
hashMap.put(Scopes.EMAIL, trim6);
hashMap.put("monthlyIncome", this.D.value);
hashMap.put("sourceOfFund", this.C.value);
hashMap.put("education", this.f152x.value);
hashMap.put("industry", this.E.value);
hashMap.put("profession", this.F.value);
hashMap.put("rtrw", trim5);
}
g1(hashMap);
}
@Override
protected void w() {
super.w();
d1();
}
@Override
protected void y(@NonNull Bundle bundle) {
super.y(bundle);
this.I = bundle.getBoolean(INTENT_KEY_IS_RDL_SUPPLEMENT, false);
this.J = bundle.getBoolean(INTENT_KEY_IS_DISPLAY_LIVING_CHECK_VIEW, false);
this.f150v = bundle.getBoolean(INTENT_KEY_IS_HAS_TAX_CARD, true);
this.K = bundle.getBoolean(INTENT_KEY_IS_FINISH_LIVE_CHECK, false);
}
}