正在查看: Mabilis Cash v1.19.4 应用的 PHBasicInfoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mabilis Cash v1.19.4 应用的 PHBasicInfoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.loans.mabiliscash.auth.basic;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.text.InputFilter;
import android.text.TextUtils;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.fintopia.libCommon.common.CommonActivity;
import com.fintopia.libCommon.common.CommonResult;
import com.fintopia.libCommon.generalconfig.GeneralConfigManager;
import com.fintopia.libCommon.widgets.dialog.alert.BaseAlertDialog;
import com.fintopia.libCommon.widgets.dialog.bottom.BaseBottomSheetDialog;
import com.fintopia.libCommon.widgets.input.BaseContentView;
import com.fintopia.libCommon.widgets.input.InputContentView;
import com.fintopia.libCommon.widgets.textFormat.SpaceTextFormatter;
import com.fintopia.libCommon.widgets.textFormat.TextFormatterWatcher;
import com.lingyue.supertoolkit.datacollection.DataCollectionUtil;
import com.lingyue.supertoolkit.datacollection.appdata.AppInfo;
import com.lingyue.supertoolkit.location.CashLocationManager;
import com.lingyue.supertoolkit.location.GeocoderLocationInfo;
import com.lingyue.supertoolkit.location.LocationHelper;
import com.lingyue.supertoolkit.permission.PermissionDenied;
import com.lingyue.supertoolkit.permission.PermissionGranted;
import com.lingyue.supertoolkit.statistics.TrackingUtil;
import com.lingyue.supertoolkit.tools.customtools.CollectionUtils;
import com.lingyue.supertoolkit.tools.customtools.JsonParamsBuilder;
import com.lingyue.supertoolkit.tools.customtools.ZipUtils;
import com.lingyue.supertoolkit.tools.phonetools.ScreenUtil;
import com.lingyue.supertoolkit.widgets.ToastCompat;
import com.lingyue.tracklib.ThirdPartTrackLib;
import com.lingyue.tracklib.TrackEventParamsConfigurator;
import com.loans.mabiliscash.R;
import com.loans.mabiliscash.appconfig.AppSwitchConfigKey;
import com.loans.mabiliscash.auth.InputNameFilter;
import com.loans.mabiliscash.auth.basic.PHBasicInfoActivity;
import com.loans.mabiliscash.auth.contact.ContactInputType;
import com.loans.mabiliscash.auth.helper.AreaStandardTreeUtil;
import com.loans.mabiliscash.auth.helper.AuthUtils;
import com.loans.mabiliscash.auth.helper.QuitAuthHelper;
import com.loans.mabiliscash.auth.personal.AuthPersonalInformationAlertDialog;
import com.loans.mabiliscash.auth.personal.GenderSelectView;
import com.loans.mabiliscash.common.BindClickCall;
import com.loans.mabiliscash.common.PHViewBindingActivity;
import com.loans.mabiliscash.databinding.ActivityBasicInformationBinding;
import com.loans.mabiliscash.models.AuthOption;
import com.loans.mabiliscash.models.FullContactInfo;
import com.loans.mabiliscash.models.ImmediateContactBean;
import com.loans.mabiliscash.models.LabelBean;
import com.loans.mabiliscash.models.TrackingEvents;
import com.loans.mabiliscash.models.request.AuthBasicInfo;
import com.loans.mabiliscash.models.request.AuthBasicInfoRequest;
import com.loans.mabiliscash.models.response.AuthGuideResponse;
import com.loans.mabiliscash.models.response.GeneralConfigResponse;
import com.loans.mabiliscash.models.response.MultiAuthOptionListResponse;
import com.loans.mabiliscash.models.response.PHBooleanResponse;
import com.loans.mabiliscash.net.ECObserver;
import com.loans.mabiliscash.net.IApiRoutes;
import com.loans.mabiliscash.sentry.sentrybusiness.ISentryBusinessEventAutoFinish;
import com.loans.mabiliscash.storage.MMKVUtil;
import com.loans.mabiliscash.thirdpart.AppsFlyerUtil;
import com.loans.mabiliscash.tracklib.CommonTrackUtil;
import com.loans.mabiliscash.utils.DxFilterUtil;
import com.loans.mabiliscash.utils.IMMKVPageController;
import com.loans.mabiliscash.utils.LaunchUtil;
import com.loans.mabiliscash.utils.PhoneNumberHelper;
import com.loans.mabiliscash.utils.ThreadPool;
import com.loans.mabiliscash.widght.BottomSheetDialogHelper;
import com.loans.mabiliscash.widght.dialog.SingleBottomSheetDialog;
import com.loans.mabiliscash.widght.dialog.bottomSelect.Bottom3ColumnsSelectDialog;
import com.loans.mabiliscash.widght.dialog.bottomSelect.BottomBirthdaySelectDialog;
import com.veda.android.bananalibrary.net.ICallBack;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Action;
import io.sentry.SpanStatus;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import org.jetbrains.annotations.NotNull;
public class PHBasicInfoActivity extends PHViewBindingActivity<ActivityBasicInformationBinding> implements BaseContentView.OnContentChangedListener, ISentryBusinessEventAutoFinish, IMMKVPageController {
public static final String BIRTHDAY = "birthday";
public static final String DAY_OF_BIRTHDAY = "day_of_birthday";
public static final int DEFAULT_SELECT_YEAR_INDEX = 14;
public static final String DETAILED_ADDRESS = "detailed_address";
public static final String EDUCATION = "education";
public static final String FIRST_CONTACT = "firstContact";
public static final String FIRST_CONTACT_NAME = "firstContactName";
public static final String FIRST_CONTACT_NUMBER = "firstContactNumber";
public static final String FIRST_NAME = "first_name";
public static final String FIRST_RELATION_SHIP = "firstRelationShip";
public static final String GENDER = "gender";
public static final String IDENTITY_BRGY = "identity_brgy";
public static final String IDENTITY_CITY = "identity_city";
public static final String IDENTITY_REGION = "identity_region";
public static final String INCOME_DAY = "income_day";
public static final String INSTITUTION_TYPE = "institution_type";
public static final String JOB_TYPE = "job_type";
public static final String LAST_NAME = "last_name";
public static final String MARRY_STATUS = "marry_status";
public static final String MONTH_INCOME = "month_income";
public static final String MONTH_OF_BIRTHDAY = "month_of_birthday";
public static final String NUMBER_OF_CREDIT_CARDS = "number_of_credit_cards";
public static final String PAYROLL_PERIOD = "payroll_period";
public static final String PURPOSE_OF_LOAN = "purpose_of_loan";
public static final String WORK_DURATION = "work_duration";
public static final String YEAR_OF_BIRTHDAY = "year_of_birthday";
private static final String f65a0;
private static final Map<String, List<String>> f66b0 = new HashMap();
private static final Map<String, List<String>> f67c0 = new HashMap();
private static final List<String> f68d0 = new ArrayList();
LabelBean A;
String B;
String C;
String D;
private ArrayList<LabelBean> F;
private List<LabelBean> G;
private List<LabelBean> H;
private List<LabelBean> I;
private List<LabelBean> J;
private List<LabelBean> K;
private List<LabelBean> L;
private List<LabelBean> M;
private IAuthBasicExperiment N;
private String O;
private List<LabelBean> P;
private Map<LabelBean, List<LabelBean>> Q;
private Map<LabelBean, List<LabelBean>> R;
private List<AppInfo> S;
private boolean U;
private boolean V;
private String W;
public String firstContactName;
public String firstContactNumber;
public LabelBean firstRelationShip;
public FullContactInfo firstSelectedContact;
public LabelBean jobType;
public List<LabelBean> jobTypeOptionList;
public ArrayList<LabelBean> nextPayDayList;
public LabelBean nextPayday;
String p;
public LabelBean payrollPeriod;
public List<LabelBean> payrollPeriodOptionList;
String q;
LabelBean r;
LabelBean s;
LabelBean f69t;
public String totalMonthlyIncome;
LabelBean f70u;
LabelBean f71v;
LabelBean f72w;
public LabelBean workDuration;
public List<LabelBean> workDurationOptionList;
LabelBean f73x;
LabelBean f74y;
String f75z;
@Nullable
private GeocoderLocationInfo E = null;
private boolean T = false;
private boolean X = false;
private boolean Y = false;
private int Z = 0;
class AnonymousClass8 extends ECObserver<PHBooleanResponse> {
AnonymousClass8(ICallBack iCallBack) {
super(iCallBack);
}
public static void h(PHBooleanResponse pHBooleanResponse, Map map) {
map.put("is_success", String.valueOf(false));
map.put("api_code", pHBooleanResponse != null ? pHBooleanResponse.getStatusCodeString() : "");
}
public static void i(Map map) {
map.put("is_success", String.valueOf(true));
}
@Override
public void e(Throwable th, final PHBooleanResponse pHBooleanResponse) {
super.e(th, pHBooleanResponse);
ThirdPartTrackLib.d(PHBasicInfoActivity.this, "auth_basic_info_result", new TrackEventParamsConfigurator() {
@Override
public final void a(Map map) {
PHBasicInfoActivity.AnonymousClass8.h(PHBooleanResponse.this, map);
}
});
PHBasicInfoActivity.this.businessTransaction("UserAuthOrder").b(SpanStatus.INTERNAL_ERROR);
PHBasicInfoActivity.this.dismissLoadingDialog();
}
@Override
public void c(PHBooleanResponse pHBooleanResponse) {
ThirdPartTrackLib.d(PHBasicInfoActivity.this, "auth_basic_info_result", new TrackEventParamsConfigurator() {
@Override
public final void a(Map map) {
PHBasicInfoActivity.AnonymousClass8.i(map);
}
});
PHBasicInfoActivity.this.businessTransaction("UserAuthOrder").i(SpanStatus.OK);
PHBasicInfoActivity.this.Z2();
}
}
static {
StringBuilder sb = new StringBuilder();
sb.append(Calendar.getInstance().get(1) - 14);
sb.append("");
f65a0 = sb.toString();
t1();
}
@Nullable
private LabelBean A1(@NonNull final String str, @Nullable LabelBean labelBean) {
LabelBean labelBean2 = (LabelBean) CollectionsKt.U(this.P, new Function1() {
public final Object invoke(Object obj) {
Boolean N1;
N1 = PHBasicInfoActivity.N1(str, (LabelBean) obj);
return N1;
}
});
return labelBean2 != null ? labelBean2 : labelBean;
}
public void A2(View view, int i, LabelBean labelBean) {
this.firstRelationShip = labelBean;
saveDataToLocal(FIRST_RELATION_SHIP, this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).o.setContentText(this.firstRelationShip.label);
}
@NonNull
private String B1(String str) {
return "0" + str;
}
public boolean B2(LabelBean labelBean) {
return labelBean.equals(this.firstRelationShip);
}
private static List<String> C1(int i, int i2) {
ArrayList arrayList = new ArrayList();
Calendar calendar = Calendar.getInstance();
calendar.set(1, i);
calendar.set(2, i2 - 1);
int actualMaximum = calendar.getActualMaximum(5);
for (int i3 = 1; i3 <= actualMaximum; i3++) {
arrayList.add(String.format("%02d", Integer.valueOf(i3)));
}
return arrayList;
}
public void C2(View view, int i, LabelBean labelBean) {
this.f70u = labelBean;
saveDataToLocal("marry_status", this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).r.setContentText(this.f70u.label);
AuthUtils.i(((ActivityBasicInformationBinding) this.o).r);
}
private void D1(final boolean z2) {
if (this.F != null) {
return;
}
showLoadingDialog();
new AreaStandardTreeUtil(this, new AreaStandardTreeUtil.AreaStandardTreeEvent() {
@Override
public final void a(ArrayList arrayList) {
PHBasicInfoActivity.this.O1(z2, arrayList);
}
}, new Runnable() {
@Override
public final void run() {
PHBasicInfoActivity.this.P1();
}
}).f();
}
public boolean D2(LabelBean labelBean) {
return labelBean.equals(this.f70u);
}
private String E1(FullContactInfo fullContactInfo, String str, String str2) {
ContactInputType contactInputType = ContactInputType.INPUT_TYPE_INPUT;
contactInputType.name();
return fullContactInfo == null ? contactInputType.name() : (fullContactInfo.name.equals(str) && fullContactInfo.mobilePhoneNo.replaceAll("\\D", "").equals(B1(str2))) ? ContactInputType.INPUT_TYPE_SELECT.name() : ContactInputType.INPUT_TYPE_SELECTED_AND_CHANGED.name();
}
public void E2(View view, int i, LabelBean labelBean) {
this.nextPayday = labelBean;
if (labelBean != null) {
saveDataToLocal(INCOME_DAY, this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).s.setContentText(this.nextPayday.label);
}
AuthUtils.i(((ActivityBasicInformationBinding) this.o).s);
}
private void F1() {
showLoadingDialog();
this.apiHelper.a().A("SEX,MARRY_STATUS,EDUCATION,EMPLOYMENT_LENGTH,INSTITUTION_TYPE,LOAN_USE,LIMITED_NUMBERS,PROFESSION,SALARY_PAYMENT_METHOD,CONTACT_RELATION_SHIP").w(AndroidSchedulers.a()).j(new Action() {
public void run() throws Exception {
PHBasicInfoActivity.this.N.f();
}
}).a(new ECObserver<MultiAuthOptionListResponse>(this) {
@Override
public void e(Throwable th, MultiAuthOptionListResponse multiAuthOptionListResponse) {
super.e(th, multiAuthOptionListResponse);
PHBasicInfoActivity.this.dismissLoadingDialog();
PHBasicInfoActivity.this.Q();
}
@Override
public void c(MultiAuthOptionListResponse multiAuthOptionListResponse) {
PHBasicInfoActivity.this.dismissLoadingDialog();
AuthOption authOption = multiAuthOptionListResponse.body;
if (authOption != null) {
PHBasicInfoActivity.this.X2(authOption);
}
PHBasicInfoActivity.this.Q();
}
});
}
public boolean F2(LabelBean labelBean) {
return labelBean.equals(this.nextPayday);
}
private void G1() {
AuthUtils authUtils = this.authUtil;
T t2 = this.o;
authUtils.q(this, ((ActivityBasicInformationBinding) t2).j, R.drawable.ico_auth_step_one, ((ActivityBasicInformationBinding) t2).k.d, ((ActivityBasicInformationBinding) t2).k.c);
}
public int G2() {
LabelBean labelBean = this.nextPayday;
if (labelBean != null) {
return this.nextPayDayList.indexOf(labelBean);
}
return 14;
}
private void H1() {
if (TextUtils.isEmpty(this.O)) {
this.O = "C";
}
if ("D".equals(this.O)) {
this.N = new AuthBasicExperimentD(this, (ActivityBasicInformationBinding) this.o);
} else {
this.N = new AuthBasicExperimentC(this, (ActivityBasicInformationBinding) this.o);
}
}
public void H2(View view, int i, LabelBean labelBean) {
this.A = labelBean;
saveDataToLocal("number_of_credit_cards", this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).f151t.setContentText(this.A.label);
AuthUtils.i(((ActivityBasicInformationBinding) this.o).f151t);
}
private ArrayList<LabelBean> I1() {
this.nextPayDayList = new ArrayList<>();
for (int i = 1; i <= 31; i++) {
LabelBean labelBean = new LabelBean();
this.nextPayDayList.add(labelBean);
labelBean.label = String.valueOf(i);
labelBean.value = String.valueOf(i);
}
return this.nextPayDayList;
}
public boolean I2(LabelBean labelBean) {
return labelBean.equals(this.A);
}
private void J1() {
InputNameFilter inputNameFilter = new InputNameFilter();
((ActivityBasicInformationBinding) this.o).f.setFilters(new InputFilter[]{inputNameFilter});
((ActivityBasicInformationBinding) this.o).g.setFilters(new InputFilter[]{inputNameFilter});
((ActivityBasicInformationBinding) this.o).h.setFilters(new InputFilter[]{new InputFilter.LengthFilter(6)});
((ActivityBasicInformationBinding) this.o).h.setInputType(2);
((ActivityBasicInformationBinding) this.o).h.d(new TextFormatterWatcher.TextFormatter() {
public final String a(String str) {
String R1;
R1 = PHBasicInfoActivity.R1(str);
return R1;
}
});
((ActivityBasicInformationBinding) this.o).d.C(false);
((ActivityBasicInformationBinding) this.o).e.setFilters(new InputFilter[]{new InputFilter.LengthFilter(12)});
((ActivityBasicInformationBinding) this.o).e.setInputType(2);
((ActivityBasicInformationBinding) this.o).e.d(new SpaceTextFormatter(4));
((ActivityBasicInformationBinding) this.o).e.setContentVerifier(new BaseContentView.ContentVerifier() {
public final CharSequence a(CharSequence charSequence) {
CharSequence S1;
S1 = PHBasicInfoActivity.this.S1(charSequence);
return S1;
}
});
((ActivityBasicInformationBinding) this.o).f.setOnFocusChangedListener(new InputContentView.OnFocusChangedListener() {
public final void a(boolean z2) {
PHBasicInfoActivity.this.T1(z2);
}
});
((ActivityBasicInformationBinding) this.o).g.setOnFocusChangedListener(new InputContentView.OnFocusChangedListener() {
public final void a(boolean z2) {
PHBasicInfoActivity.this.U1(z2);
}
});
((ActivityBasicInformationBinding) this.o).h.setOnFocusChangedListener(new InputContentView.OnFocusChangedListener() {
public final void a(boolean z2) {
PHBasicInfoActivity.this.V1(z2);
}
});
((ActivityBasicInformationBinding) this.o).c.setOnFocusChangedListener(new InputContentView.OnFocusChangedListener() {
public final void a(boolean z2) {
PHBasicInfoActivity.this.W1(z2);
}
});
((ActivityBasicInformationBinding) this.o).d.setOnFocusChangedListener(new InputContentView.OnFocusChangedListener() {
public final void a(boolean z2) {
PHBasicInfoActivity.this.X1(z2);
}
});
((ActivityBasicInformationBinding) this.o).e.setOnFocusChangedListener(new InputContentView.OnFocusChangedListener() {
public final void a(boolean z2) {
PHBasicInfoActivity.this.Y1(z2);
}
});
}
public void J2(View view, int i, LabelBean labelBean) {
this.f71v = labelBean;
saveDataToLocal("purpose_of_loan", this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).f153v.setContentText(this.f71v.label);
AuthUtils.i(((ActivityBasicInformationBinding) this.o).f153v);
}
private void K1() {
((ActivityBasicInformationBinding) this.o).i.setOnGenderSelectedListener(new GenderSelectView.OnGenderSelectedListener() {
@Override
public final void a(LabelBean labelBean) {
PHBasicInfoActivity.this.s2(labelBean);
}
});
V(((ActivityBasicInformationBinding) this.o).m, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.Z1(view);
}
});
V(((ActivityBasicInformationBinding) this.o).n, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.a2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).r, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.b2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).f153v, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.c2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).p, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.d2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).f154w, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.e2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).f151t, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.f2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).b, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.g2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).q, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.h2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).f156y, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.i2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).f152u, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.j2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).s, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.k2(view);
}
});
V(((ActivityBasicInformationBinding) this.o).o, new BindClickCall() {
@Override
public final void onClick(View view) {
PHBasicInfoActivity.this.l2(view);
}
});
((ActivityBasicInformationBinding) this.o).d.setRightIconClickListener(new BaseContentView.RightIconClickListener() {
public final void a() {
PHBasicInfoActivity.this.m2();
}
});
((ActivityBasicInformationBinding) this.o).f.setDelIconClickListener(new BaseContentView.DelIconClickListener() {
public final void a() {
PHBasicInfoActivity.this.n2();
}
});
((ActivityBasicInformationBinding) this.o).g.setDelIconClickListener(new BaseContentView.DelIconClickListener() {
public final void a() {
PHBasicInfoActivity.this.o2();
}
});
((ActivityBasicInformationBinding) this.o).h.setDelIconClickListener(new BaseContentView.DelIconClickListener() {
public final void a() {
PHBasicInfoActivity.this.p2();
}
});
((ActivityBasicInformationBinding) this.o).e.setDelIconClickListener(new BaseContentView.DelIconClickListener() {
public final void a() {
PHBasicInfoActivity.this.q2();
}
});
((ActivityBasicInformationBinding) this.o).c.setDelIconClickListener(new BaseContentView.DelIconClickListener() {
public final void a() {
PHBasicInfoActivity.this.r2();
}
});
}
public boolean K2(LabelBean labelBean) {
return labelBean.equals(this.f71v);
}
private boolean L1() {
return "C".equals(this.O);
}
public void L2(View view, int i, LabelBean labelBean) {
this.f69t = labelBean;
if (labelBean != null) {
saveDataToLocal("institution_type", this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).p.setContentText(this.f69t.label);
}
AuthUtils.i(((ActivityBasicInformationBinding) this.o).p);
}
public static void M1() {
f68d0.clear();
f66b0.clear();
f67c0.clear();
int i = Calendar.getInstance().get(1);
for (int i2 = 0; i2 < 100; i2++) {
int i3 = i - i2;
String valueOf = String.valueOf(i3);
f68d0.add(valueOf);
ArrayList arrayList = new ArrayList();
for (int i4 = 1; i4 <= 12; i4++) {
String format = String.format("%02d", Integer.valueOf(i4));
arrayList.add(format);
List<String> C1 = C1(i3, i4);
f67c0.put(valueOf + format, C1);
}
f66b0.put(valueOf, arrayList);
}
}
public boolean M2(LabelBean labelBean) {
return labelBean.equals(this.f69t);
}
public static Boolean N1(String str, LabelBean labelBean) {
return Boolean.valueOf(labelBean.label.equals(str));
}
public void N2(View view, int i, LabelBean labelBean) {
this.jobType = labelBean;
if (labelBean != null) {
saveDataToLocal(JOB_TYPE, this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).q.setContentText(this.jobType.label);
}
AuthUtils.i(((ActivityBasicInformationBinding) this.o).q);
}
public void O1(boolean z2, ArrayList arrayList) {
this.F = arrayList;
if (!z2 || CollectionUtils.a(arrayList)) {
return;
}
i3(this.F);
}
public boolean O2(LabelBean labelBean) {
return labelBean.equals(this.jobType);
}
public void P1() {
dismissLoadingDialog();
}
public void P2(View view, int i, LabelBean labelBean) {
this.payrollPeriod = labelBean;
if (labelBean != null) {
saveDataToLocal(PAYROLL_PERIOD, this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).f152u.setContentText(this.payrollPeriod.label);
}
AuthUtils.i(((ActivityBasicInformationBinding) this.o).f152u);
}
public void Q1(GeocoderLocationInfo geocoderLocationInfo) {
this.E = geocoderLocationInfo;
}
public boolean Q2(LabelBean labelBean) {
return labelBean.equals(this.payrollPeriod);
}
public static String R1(String str) {
return (TextUtils.isEmpty(str) || str.length() <= 1) ? str : str.replaceAll("^(0+)", "");
}
public void R2(List list) {
if (!CollectionUtils.a(list)) {
f3(list);
return;
}
this.U = true;
this.T = false;
dismissLoadingDialog();
Y2();
}
public CharSequence S1(CharSequence charSequence) {
return (TextUtils.isEmpty(charSequence) || isValidPhoneNumber(charSequence.toString())) ? "" : getString(R.string.input_phone_number_error);
}
private void S2() {
LaunchUtil.b(this, 100349);
}
public void T1(boolean z2) {
if (z2) {
return;
}
saveDataToLocal("first_name", ((ActivityBasicInformationBinding) this.o).f.getContentTrim());
}
public void U1(boolean z2) {
if (z2) {
return;
}
saveDataToLocal("last_name", ((ActivityBasicInformationBinding) this.o).g.getContentTrim());
}
public void V1(boolean z2) {
if (z2) {
return;
}
saveDataToLocal(MONTH_INCOME, ((ActivityBasicInformationBinding) this.o).h.getContent());
}
public void W1(boolean z2) {
if (z2) {
return;
}
saveDataToLocal("detailed_address", ((ActivityBasicInformationBinding) this.o).c.getContentTrim());
}
private void W2() {
ThirdPartTrackLib.d(this, "basic_info_start_upload", new TrackEventParamsConfigurator() {
@Override
public final void a(Map map) {
PHBasicInfoActivity.this.t2(map);
}
});
if (!this.V) {
Y2();
return;
}
if (this.W.equals("B")) {
b3();
return;
}
if (this.W.equals("C")) {
Y2();
} else if (this.U) {
Y2();
} else {
c3();
}
}
public void X1(boolean z2) {
if (z2) {
return;
}
saveDataToLocal(FIRST_CONTACT_NAME, ((ActivityBasicInformationBinding) this.o).d.getContentTrim());
}
public void X2(AuthOption authOption) {
List<LabelBean> list = authOption.sex;
this.G = list;
this.H = authOption.education;
this.I = authOption.marryStatus;
this.J = authOption.loanUse;
this.L = authOption.limitedNumbers;
this.jobTypeOptionList = authOption.jobType;
this.payrollPeriodOptionList = authOption.salaryPaymentMethod;
((ActivityBasicInformationBinding) this.o).i.setGenderList(list);
this.K = authOption.institutionType;
this.workDurationOptionList = authOption.employmentLength;
this.M = authOption.contactRelationShip;
}
public void Y1(boolean z2) {
if (z2) {
return;
}
saveDataToLocal(FIRST_CONTACT_NUMBER, ((ActivityBasicInformationBinding) this.o).e.getContent());
}
public void Y2() {
if (this.N.e()) {
s3(TrackingEvents.PH_BASIC_INFO_COMMIT);
e3();
}
}
public void Z1(View view) {
h3();
}
public void Z2() {
MMKVUtil.c(getMMKVPagePrefix());
this.userSession.c().userName = this.p + " " + this.q;
this.authUtil.h(this, new AuthUtils.DefaultAuthCallBack(this));
}
public void a2(View view) {
T2();
}
public void a3(int i) {
if (!this.U) {
this.T = true;
u3(i);
} else if (this.W.equals("B")) {
Y2();
}
}
public void b2(View view) {
V2();
}
private void b3() {
((CommonActivity) this).permissionHelper.requestPermissions((Activity) this, "android.permission.READ_SMS");
}
public void c2(View view) {
preShowPurposeOfLoanPickView();
}
private void c3() {
showLoadingDialog();
((CommonActivity) this).permissionHelper.requestPermissionsForce(this, getResources().getString(R.string.reject_message_tips), "android.permission.READ_SMS");
}
public void d2(View view) {
preShowInstitutionTypePickView();
}
private void d3() {
ArrayList arrayList = new ArrayList();
arrayList.add(AppSwitchConfigKey.UPLOAD_SMS_LIMIT);
this.apiHelper.a().a(arrayList).w(AndroidSchedulers.a()).a(new ECObserver<GeneralConfigResponse>(this) {
@Override
public void e(Throwable th, GeneralConfigResponse generalConfigResponse) {
PHBasicInfoActivity.this.a3(1000);
}
@Override
public void c(GeneralConfigResponse generalConfigResponse) {
int i;
GeneralConfigResponse.BodyBean bodyBean = generalConfigResponse.body;
if (bodyBean == null || CollectionUtils.a(bodyBean.configs) || !AppSwitchConfigKey.UPLOAD_SMS_LIMIT.equals(generalConfigResponse.body.configs.get(0).configName)) {
return;
}
try {
i = Integer.parseInt(generalConfigResponse.body.configs.get(0).configValue);
} catch (NumberFormatException unused) {
i = 1000;
}
PHBasicInfoActivity.this.a3(i);
}
});
}
public void e2(View view) {
U2();
}
private void e3() {
showLoadingDialog();
AuthBasicInfo c = this.N.c();
c.contactInfos = u1();
if (!CollectionUtils.a(this.S)) {
c.appInfoList = ZipUtils.a(this.gson.t(this.S));
}
IApiRoutes a = this.apiHelper.a();
AppsFlyerUtil.Companion companion = AppsFlyerUtil.b;
a.h0(new AuthBasicInfoRequest(c, companion.b().f(this), companion.b().e(this))).w(AndroidSchedulers.a()).a(new AnonymousClass8(this));
}
public void f2(View view) {
preShowNumberOfCreditCardsSelectDialog();
}
public void f3(final List<Map<String, String>> list) {
if (CollectionUtils.a(list)) {
dismissLoadingDialog();
} else {
this.apiHelper.a().w(ZipUtils.a(this.gson.t(list)), "user_basic").w(AndroidSchedulers.a()).a(new ECObserver<CommonResult>(getCallBack()) {
@Override
protected boolean d() {
return false;
}
@Override
public void e(Throwable th, CommonResult commonResult) {
super.e(th, commonResult);
PHBasicInfoActivity pHBasicInfoActivity = PHBasicInfoActivity.this;
int i = pHBasicInfoActivity.Z;
pHBasicInfoActivity.Z = i + 1;
if (i < 2) {
PHBasicInfoActivity.this.f3(list);
return;
}
PHBasicInfoActivity.this.U = true;
PHBasicInfoActivity.this.T = false;
PHBasicInfoActivity.this.dismissLoadingDialog();
PHBasicInfoActivity.this.Y2();
}
@Override
public void c(CommonResult commonResult) {
PHBasicInfoActivity.this.U = true;
PHBasicInfoActivity.this.T = false;
PHBasicInfoActivity.this.dismissLoadingDialog();
PHBasicInfoActivity.this.Y2();
}
});
}
}
public void g2(View view) {
W2();
}
public void g3(AuthGuideResponse authGuideResponse) {
BaseAlertDialog authPersonalInformationAlertDialog = new AuthPersonalInformationAlertDialog(this, TrackingEvents.PH_AUTH_PERSONAL_INFORMATION_DIALOG, authGuideResponse.body);
authPersonalInformationAlertDialog.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
TrackingUtil.j(PHBasicInfoActivity.this, TrackingEvents.AUTH_PERSONAL_INFORMATION_DIALOG_SHOW, "");
}
});
authPersonalInformationAlertDialog.show();
}
public void h2(View view) {
preShowSelectJobTypeDialog();
}
public void i2(View view) {
preShowSelectWorkDurationDialog();
}
private void i3(ArrayList<LabelBean> arrayList) {
if (CollectionUtils.a(this.P) || CollectionUtils.b(this.Q) || CollectionUtils.b(this.R)) {
s1(arrayList);
}
List<LabelBean> list = this.P;
Map<LabelBean, List<LabelBean>> map = this.Q;
Map<LabelBean, List<LabelBean>> map2 = this.R;
GeocoderLocationInfo geocoderLocationInfo = this.E;
LabelBean A1 = geocoderLocationInfo != null ? A1(geocoderLocationInfo.a, this.f72w) : this.f72w;
GeocoderLocationInfo geocoderLocationInfo2 = this.E;
LabelBean A12 = geocoderLocationInfo2 != null ? A1(geocoderLocationInfo2.b, this.f73x) : this.f73x;
GeocoderLocationInfo geocoderLocationInfo3 = this.E;
BottomSheetDialogHelper.d(this, list, map, map2, TrackingEvents.PH_AUTH_PERSONAL_INFO_AREA_DIALOG, R.string.residential_address, A1, A12, geocoderLocationInfo3 != null ? A1(geocoderLocationInfo3.c, this.f74y) : this.f74y, new Bottom3ColumnsSelectDialog.OnSelectedListener() {
@Override
public final void a(Object obj, Object obj2, Object obj3) {
PHBasicInfoActivity.this.v2((LabelBean) obj, (LabelBean) obj2, (LabelBean) obj3);
}
}).show();
}
public void j2(View view) {
preShowSelectPayrollPeriodDialog();
}
private void j3() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, this.workDurationOptionList, TrackingEvents.PH_WORK_DURATION_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.w2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean x2;
x2 = PHBasicInfoActivity.this.x2((LabelBean) obj);
return x2;
}
});
singleBottomSheetDialog.l(R.string.work_duration);
singleBottomSheetDialog.show();
}
public void k2(View view) {
showNextPaydayPickView();
}
private void k3() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, this.H, TrackingEvents.PH_EDUCATION_LEVEL_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.y2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean z2;
z2 = PHBasicInfoActivity.this.z2((LabelBean) obj);
return z2;
}
});
singleBottomSheetDialog.l(R.string.education_lavel);
singleBottomSheetDialog.show();
}
public void l2(View view) {
preShowFirstRelationShipDialog();
}
private void l3() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, this.M, TrackingEvents.PH_BASIC_INFO_RELATION_SHIP_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.A2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean B2;
B2 = PHBasicInfoActivity.this.B2((LabelBean) obj);
return B2;
}
});
singleBottomSheetDialog.l(R.string.relation);
singleBottomSheetDialog.show();
}
public void m2() {
s3(TrackingEvents.PH_BASIC_INFO_SELECTED_CONTACT);
S2();
}
private void m3() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, this.I, TrackingEvents.PH_MARITAL_STATUS_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.C2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean D2;
D2 = PHBasicInfoActivity.this.D2((LabelBean) obj);
return D2;
}
});
singleBottomSheetDialog.l(R.string.marital_status);
singleBottomSheetDialog.show();
}
public void n2() {
saveDataToLocal("first_name", "");
}
private void n3() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, this.L, TrackingEvents.PH_NUMBER_OF_CREDIT_CARDS_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.H2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean I2;
I2 = PHBasicInfoActivity.this.I2((LabelBean) obj);
return I2;
}
});
singleBottomSheetDialog.l(R.string.number_of_credit_cards);
singleBottomSheetDialog.show();
}
public void o2() {
saveDataToLocal("last_name", "");
}
private void o3() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, this.J, TrackingEvents.PH_PURPOSE_OF_LOAN_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.J2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean K2;
K2 = PHBasicInfoActivity.this.K2((LabelBean) obj);
return K2;
}
});
singleBottomSheetDialog.l(R.string.purpose_of_loan);
singleBottomSheetDialog.show();
}
public void p2() {
saveDataToLocal(MONTH_INCOME, "");
}
private void p3() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, this.K, TrackingEvents.PH_INSTITUTION_TYPE_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.L2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean M2;
M2 = PHBasicInfoActivity.this.M2((LabelBean) obj);
return M2;
}
});
singleBottomSheetDialog.l(R.string.institution_type);
singleBottomSheetDialog.show();
}
public void q2() {
saveDataToLocal(FIRST_CONTACT_NUMBER, "");
}
private void q3(List<LabelBean> list) {
if (CollectionUtils.a(list)) {
return;
}
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, list, TrackingEvents.PH_JOB_TYPE_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.N2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean O2;
O2 = PHBasicInfoActivity.this.O2((LabelBean) obj);
return O2;
}
});
singleBottomSheetDialog.l(R.string.job_type);
singleBottomSheetDialog.show();
}
public void r2() {
saveDataToLocal("detailed_address", "");
}
private void r3() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, this.payrollPeriodOptionList, TrackingEvents.PH_PAYROLL_PERIOD_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.P2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean Q2;
Q2 = PHBasicInfoActivity.this.Q2((LabelBean) obj);
return Q2;
}
});
singleBottomSheetDialog.l(R.string.payroll_period);
singleBottomSheetDialog.show();
}
private void s1(ArrayList<LabelBean> arrayList) {
ArrayList<LabelBean> arrayList2;
this.P = new ArrayList();
this.Q = new HashMap();
this.R = new HashMap();
Iterator<LabelBean> it = arrayList.iterator();
while (it.hasNext()) {
LabelBean next = it.next();
if (next != null) {
this.P.add(next);
ArrayList<LabelBean> arrayList3 = next.children;
if (arrayList3 != null) {
Iterator<LabelBean> it2 = arrayList3.iterator();
while (it2.hasNext()) {
LabelBean next2 = it2.next();
if (next2 != null && (arrayList2 = next2.children) != null) {
this.Q.put(next2, arrayList2);
}
}
this.R.put(next, arrayList3);
}
}
}
}
public void s2(LabelBean labelBean) {
if (this.r != labelBean) {
AuthUtils.i(((ActivityBasicInformationBinding) this.o).i);
}
saveDataToLocal("gender", this.gson.t(labelBean));
TrackingUtil.j(this, TrackingEvents.PH_BASIC_INFO_SELECTED_GENDER, new JsonParamsBuilder().c("gender").a(labelBean.value).c("showGuideDialog").b(this.Y).c("mergeStrategyABType").a(this.O).c("uploadSmsAbType").a(this.W).b());
this.r = labelBean;
((ActivityBasicInformationBinding) this.o).b.setEnabled(w1());
}
private void s3(String str) {
TrackingUtil.j(this, str, new JsonParamsBuilder().c("mergeStrategyABType").a(this.O).c("uploadSmsAbType").a(this.W).c("showGuideDialog").b(this.Y).b());
}
public static void start(Activity activity, @Nullable Bundle bundle, boolean z2, @NonNull String str, String str2) {
Intent intent = new Intent(activity, (Class<?>) PHBasicInfoActivity.class);
if (bundle != null) {
intent.putExtra("extra_auth_args", bundle);
}
intent.putExtra("extra_need_upload_sms_in_auth", z2);
intent.putExtra("extra_auth_ab_type", str);
intent.putExtra("extra_auth_upload_sms_ab_type", str2);
activity.startActivity(intent);
}
private static void t1() {
ThreadPool.a(new Runnable() {
@Override
public final void run() {
PHBasicInfoActivity.M1();
}
});
}
public void t2(Map map) {
map.put("need_upload_dx_in_auth", Boolean.valueOf(this.V));
map.put("upload_sms_ab_type", this.W);
map.put("has_dx_permission", Boolean.valueOf(this.X));
}
private void t3(String str) {
this.f69t = null;
MMKVUtil.d(getMMKVKey("institution_type"));
if (L1()) {
((ActivityBasicInformationBinding) this.o).p.setVisibility(8);
return;
}
if (CollectionUtils.a(this.K) || str == null) {
return;
}
if (!needShowInstitutionType(str)) {
((ActivityBasicInformationBinding) this.o).p.setVisibility(8);
} else {
((ActivityBasicInformationBinding) this.o).p.setVisibility(0);
((ActivityBasicInformationBinding) this.o).p.setContentText("");
}
}
private List<ImmediateContactBean> u1() {
ArrayList arrayList = new ArrayList();
arrayList.add(new ImmediateContactBean(this.firstContactName, B1(this.firstContactNumber), this.firstRelationShip.value, E1(this.firstSelectedContact, this.firstContactName, this.firstContactNumber)));
return arrayList;
}
public void u2(String str, String str2, String str3) {
this.B = str3;
this.C = str;
this.D = str2;
String buildBirthday = buildBirthday(str3, str, str2);
saveDataToLocal("birthday", buildBirthday);
((ActivityBasicInformationBinding) this.o).m.setContentText(buildBirthday);
AuthUtils.i(((ActivityBasicInformationBinding) this.o).m);
}
private void u3(int i) {
onSubscribe(DxFilterUtil.e(this, i, new DataCollectionUtil.CallBack() {
@Override
public final void onResult(Object obj) {
PHBasicInfoActivity.this.R2((List) obj);
}
}, "user_basic"));
}
private void v1() {
((ActivityBasicInformationBinding) this.o).f.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).g.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).m.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).n.setOnContentChangedListener(this);
if (!L1()) {
((ActivityBasicInformationBinding) this.o).p.setOnContentChangedListener(this);
}
((ActivityBasicInformationBinding) this.o).r.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).f153v.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).f151t.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).q.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).f156y.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).f152u.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).s.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).f154w.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).c.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).h.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).d.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).e.setOnContentChangedListener(this);
((ActivityBasicInformationBinding) this.o).o.setOnContentChangedListener(this);
}
public void v2(LabelBean labelBean, LabelBean labelBean2, LabelBean labelBean3) {
this.f72w = labelBean;
this.f73x = labelBean2;
this.f74y = labelBean3;
saveDataToLocal("identity_region", this.gson.t(labelBean));
saveDataToLocal("identity_city", this.gson.t(this.f73x));
saveDataToLocal("identity_brgy", this.gson.t(this.f74y));
((ActivityBasicInformationBinding) this.o).f154w.setContentText(String.format("%s %s %s", this.f72w.label, this.f73x.label, this.f74y.label));
AuthUtils.i(((ActivityBasicInformationBinding) this.o).f154w);
}
private boolean w1() {
return this.N.a();
}
public void w2(View view, int i, LabelBean labelBean) {
this.workDuration = labelBean;
if (labelBean != null) {
saveDataToLocal(WORK_DURATION, this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).f156y.setContentText(this.workDuration.label);
}
AuthUtils.i(((ActivityBasicInformationBinding) this.o).f156y);
}
private void x1() {
new GeneralConfigManager().c(this, new AnonymousClass1(), new String[]{AppSwitchConfigKey.PHI_NEED_UPLOAD_APP_LIST_IN_BASIC_INFO_AUTH});
}
public boolean x2(LabelBean labelBean) {
return labelBean.equals(this.workDuration);
}
private void y1() {
Bundle bundleExtra = getIntent().getBundleExtra("extra_auth_args");
if (bundleExtra == null || !bundleExtra.getBoolean("intent_key_request_auth_guide_dialog", false)) {
return;
}
this.apiHelper.a().o0().w(AndroidSchedulers.a()).a(new ECObserver<AuthGuideResponse>(this) {
@Override
public void c(AuthGuideResponse authGuideResponse) {
AuthGuideResponse.Body body = authGuideResponse.body;
if (body == null || TextUtils.isEmpty(body.imageUrl)) {
return;
}
PHBasicInfoActivity.this.Y = true;
PHBasicInfoActivity.this.g3(authGuideResponse);
}
});
}
public void y2(View view, int i, LabelBean labelBean) {
this.s = labelBean;
saveDataToLocal("education", this.gson.t(labelBean));
((ActivityBasicInformationBinding) this.o).n.setContentText(this.s.label);
t3(this.s.value);
AuthUtils.i(((ActivityBasicInformationBinding) this.o).n);
}
private void z1(Intent intent) {
onFullContactInfoEvent(LaunchUtil.a(this, intent));
}
public boolean z2(LabelBean labelBean) {
return labelBean.equals(this.s);
}
void T2() {
if (CollectionUtils.a(this.H)) {
F1();
} else {
k3();
}
}
void U2() {
ArrayList<LabelBean> arrayList = this.F;
if (arrayList == null || arrayList.isEmpty()) {
D1(true);
} else {
i3(this.F);
}
}
void V2() {
if (CollectionUtils.a(this.I)) {
F1();
} else {
m3();
}
}
public void autoScrollToTarget(View view) {
if (view == null) {
return;
}
((ActivityBasicInformationBinding) this.o).f155x.smoothScrollTo(0, (view.getTop() - (ScreenUtil.e(this) / 2)) + (view.getHeight() / 2));
}
public String buildBirthday(String str, String str2, String str3) {
return (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || TextUtils.isEmpty(str3)) ? "" : String.format("%s-%s-%s", str2, str3, str);
}
public String buildBirthdayForServer(String str, String str2, String str3) {
return (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || TextUtils.isEmpty(str3)) ? "" : String.format("%s%s%s", str, str2, str3);
}
protected boolean d() {
return true;
}
@Override
@NotNull
public String getMMKVKey(@NotNull String str) {
return IMMKVPageController.DefaultImpls.a(this, str);
}
@Override
@NotNull
public String getMMKVPagePrefix() {
return "basic_info";
}
void h3() {
List<String> list = f68d0;
if (CollectionUtils.a(list) || CollectionUtils.b(f66b0) || CollectionUtils.b(f67c0)) {
t1();
}
BottomSheetDialogHelper.c(this, list, f66b0, f67c0, TrackingEvents.PH_AUTH_PERSONAL_INFO_AREA_DIALOG, R.string.birthday, TextUtils.isEmpty(this.B) ? f65a0 : this.B, TextUtils.isEmpty(this.C) ? "07" : this.C, TextUtils.isEmpty(this.D) ? "15" : this.D, new BottomBirthdaySelectDialog.OnSelectedListener() {
@Override
public final void a(Object obj, Object obj2, Object obj3) {
PHBasicInfoActivity.this.u2((String) obj, (String) obj2, (String) obj3);
}
}).show();
}
protected void init() {
super.init();
this.X = ContextCompat.checkSelfPermission(this, "android.permission.READ_SMS") == 0;
H1();
}
public boolean isValidPhoneNumber(String str) {
return PhoneNumberHelper.c(B1(str.replaceAll("\\D", "")));
}
protected void j() {
super.j();
showLoadingDialog();
D1(false);
x1();
F1();
y1();
LocationHelper.j().i(this, new CashLocationManager.GeocoderLocationInfoListener() {
@Override
public final void a(GeocoderLocationInfo geocoderLocationInfo) {
PHBasicInfoActivity.this.Q1(geocoderLocationInfo);
}
});
}
@Override
protected void k(@NonNull Bundle bundle) {
super.k(bundle);
this.O = bundle.getString("extra_auth_ab_type");
this.V = bundle.getBoolean("extra_need_upload_sms_in_auth");
this.W = bundle.getString("extra_auth_upload_sms_ab_type");
this.p = bundle.getString("first_name");
this.q = bundle.getString("last_name");
this.r = (LabelBean) bundle.getSerializable("gender");
this.B = bundle.getString("year_of_birthday");
this.C = bundle.getString("month_of_birthday");
this.D = bundle.getString("day_of_birthday");
this.s = (LabelBean) bundle.getSerializable("education");
this.f69t = (LabelBean) bundle.getSerializable("institution_type");
this.f72w = (LabelBean) bundle.getSerializable("identity_region");
this.f73x = (LabelBean) bundle.getSerializable("identity_city");
this.f74y = (LabelBean) bundle.getSerializable("identity_brgy");
this.f70u = (LabelBean) bundle.getSerializable("marry_status");
this.f71v = (LabelBean) bundle.getSerializable("purpose_of_loan");
this.f75z = bundle.getString("detailed_address");
this.A = (LabelBean) bundle.getSerializable("number_of_credit_cards");
this.jobType = (LabelBean) bundle.getSerializable(JOB_TYPE);
this.payrollPeriod = (LabelBean) bundle.getSerializable(PAYROLL_PERIOD);
this.workDuration = (LabelBean) bundle.getSerializable(WORK_DURATION);
this.totalMonthlyIncome = bundle.getString(MONTH_INCOME);
this.nextPayday = (LabelBean) bundle.getSerializable(INCOME_DAY);
this.firstSelectedContact = (FullContactInfo) bundle.getSerializable(FIRST_CONTACT);
this.firstContactName = bundle.getString(FIRST_CONTACT_NAME);
this.firstContactNumber = bundle.getString(FIRST_CONTACT_NUMBER);
this.firstRelationShip = (LabelBean) bundle.getSerializable(FIRST_RELATION_SHIP);
}
public boolean needShowInstitutionType(String str) {
return !L1() && (str.equalsIgnoreCase("PHI_BACHELORS_DEGREE") || str.equalsIgnoreCase("PHI_MASTER_DEGREE") || str.equalsIgnoreCase("PHI_DOCTORATE"));
}
protected void o() {
super.o();
v1();
G1();
J1();
K1();
this.N.d();
this.N.b();
}
protected void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i2 == -1 && i == 100349) {
z1(intent);
}
}
@Override
public void onBackPressed() {
QuitAuthHelper.o(this);
}
@Override
protected void onCreate(Bundle bundle) {
ThirdPartTrackLib.c(this, "auth_basic_info_enter");
businessTransaction("UserAuthOrder");
super.onCreate(bundle);
s3(TrackingEvents.PH_BASIC_INFO_PAGE_OPEN);
}
public void onEditContentChanged(BaseContentView baseContentView) {
int id = baseContentView.getId();
if (id == 2131362080) {
this.q = ((ActivityBasicInformationBinding) this.o).g.getContentTrim();
} else if (id != 2131362085) {
switch (id) {
case R.id.evDetailedAddress:
this.f75z = ((ActivityBasicInformationBinding) this.o).c.getContentTrim();
break;
case R.id.evFirstContactName:
this.firstContactName = ((ActivityBasicInformationBinding) this.o).d.getContentTrim();
break;
case R.id.evFirstContactNumber:
this.firstContactNumber = ((ActivityBasicInformationBinding) this.o).e.getContent();
break;
case R.id.evFirstName:
this.p = ((ActivityBasicInformationBinding) this.o).f.getContentTrim();
break;
}
} else {
this.totalMonthlyIncome = ((ActivityBasicInformationBinding) this.o).h.getContent();
}
((ActivityBasicInformationBinding) this.o).b.setEnabled(w1());
}
public void onFullContactInfoEvent(FullContactInfo fullContactInfo) {
if (fullContactInfo == null || TextUtils.isEmpty(fullContactInfo.mobilePhoneNo) || !PhoneNumberHelper.a(fullContactInfo.mobilePhoneNo.replaceAll("\\D", ""))) {
TrackingUtil.j(this, TrackingEvents.ACTION_PICK_SELECT_CONTACT_ERROR, "");
ToastCompat.e(this, getString(R.string.error_phone_num_toast));
return;
}
this.firstContactName = fullContactInfo.name;
String str = fullContactInfo.mobilePhoneNo;
this.firstContactNumber = str;
if (str.startsWith("0")) {
this.firstContactNumber = this.firstContactNumber.substring(1);
}
((ActivityBasicInformationBinding) this.o).d.setContentText(this.firstContactName);
((ActivityBasicInformationBinding) this.o).e.setContentText(this.firstContactNumber);
this.firstSelectedContact = fullContactInfo;
saveDataToLocal(FIRST_CONTACT_NAME, this.firstContactName);
saveDataToLocal(FIRST_CONTACT_NUMBER, this.firstContactNumber);
saveDataToLocal(FIRST_CONTACT, this.gson.t(this.firstSelectedContact));
}
@PermissionDenied("android.permission.READ_SMS")
public void onSmsPermissionDenied() {
if (this.W.equals("B")) {
Y2();
}
CommonTrackUtil.b(this, false, "sms", "user_basic");
TrackingUtil.j(this, TrackingEvents.PH_READ_SMS_PERMISSION, new JsonParamsBuilder().c("granted").b(false).c("fromDeniedToGranted").b(false).c("pageName").a("user_basic").b());
}
@PermissionGranted({"android.permission.READ_SMS"})
public void onSmsPermissionResult() {
if (!this.T) {
d3();
}
CommonTrackUtil.b(this, true, "sms", "user_basic");
TrackingUtil.j(this, TrackingEvents.PH_READ_SMS_PERMISSION, new JsonParamsBuilder().c("granted").b(true).c("fromDeniedToGranted").b(true ^ this.X).c("pageName").a("user_basic").b());
}
public void parseBirthday(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
String[] split = str.split("-");
if (split.length == 3) {
this.C = split[0];
this.D = split[1];
this.B = split[2];
}
}
public void preShowFirstRelationShipDialog() {
if (CollectionUtils.a(this.M)) {
F1();
} else {
l3();
}
}
public void preShowInstitutionTypePickView() {
if (CollectionUtils.a(this.K)) {
F1();
} else {
p3();
}
}
public void preShowNumberOfCreditCardsSelectDialog() {
if (CollectionUtils.a(this.L)) {
F1();
} else {
n3();
}
}
public void preShowPurposeOfLoanPickView() {
if (CollectionUtils.a(this.J)) {
F1();
} else {
o3();
}
}
public void preShowSelectJobTypeDialog() {
if (CollectionUtils.a(this.jobTypeOptionList)) {
F1();
} else {
q3(this.jobTypeOptionList);
}
}
public void preShowSelectPayrollPeriodDialog() {
if (CollectionUtils.a(this.payrollPeriodOptionList)) {
F1();
} else {
r3();
}
}
public void preShowSelectWorkDurationDialog() {
if (CollectionUtils.a(this.workDurationOptionList)) {
F1();
} else {
j3();
}
}
@Override
public ActivityBasicInformationBinding bindingInflater() {
return ActivityBasicInformationBinding.c(getLayoutInflater());
}
protected void s(@NonNull Bundle bundle) {
super.s(bundle);
bundle.putString("extra_auth_ab_type", this.O);
bundle.putBoolean("extra_need_upload_sms_in_auth", this.V);
bundle.putString("extra_auth_upload_sms_ab_type", this.W);
bundle.putString("first_name", this.p);
bundle.putString("last_name", this.q);
bundle.putSerializable("gender", this.r);
bundle.putString("year_of_birthday", this.B);
bundle.putString("month_of_birthday", this.C);
bundle.putString("day_of_birthday", this.D);
bundle.putSerializable("identity_region", this.f72w);
bundle.putSerializable("identity_city", this.f73x);
bundle.putSerializable("identity_brgy", this.f74y);
bundle.putSerializable("education", this.s);
bundle.putSerializable("institution_type", this.f69t);
bundle.putSerializable("marry_status", this.f70u);
bundle.putSerializable("purpose_of_loan", this.f71v);
bundle.putString("detailed_address", this.f75z);
bundle.putSerializable("number_of_credit_cards", this.A);
bundle.putSerializable(JOB_TYPE, this.jobType);
bundle.putSerializable(PAYROLL_PERIOD, this.payrollPeriod);
bundle.putSerializable(WORK_DURATION, this.workDuration);
bundle.putString(MONTH_INCOME, this.totalMonthlyIncome);
bundle.putSerializable(INCOME_DAY, this.nextPayday);
bundle.putSerializable(FIRST_CONTACT, this.firstSelectedContact);
bundle.putString(FIRST_CONTACT_NAME, this.firstContactName);
bundle.putString(FIRST_CONTACT_NUMBER, this.firstContactNumber);
bundle.putSerializable(FIRST_RELATION_SHIP, this.firstRelationShip);
saveDataToLocal("first_name", this.p);
saveDataToLocal("last_name", this.q);
saveDataToLocal("detailed_address", this.f75z);
saveDataToLocal(MONTH_INCOME, this.totalMonthlyIncome);
saveDataToLocal(FIRST_CONTACT_NAME, this.firstContactName);
saveDataToLocal(FIRST_CONTACT_NUMBER, this.firstContactNumber);
}
public void saveDataToLocal(@NotNull String str, @Nullable String str2) {
IMMKVPageController.DefaultImpls.b(this, str, str2);
}
void showErrorToast(int i) {
try {
ToastCompat.e(this, getResources().getString(i));
} catch (Resources.NotFoundException unused) {
}
}
public void showNextPaydayPickView() {
BaseBottomSheetDialog singleBottomSheetDialog = new SingleBottomSheetDialog(this, I1(), TrackingEvents.PH_NEXT_PAY_DAY_SELECT_DIALOG, new SingleBottomSheetDialog.OnItemSelectListener() {
@Override
public final void a(View view, int i, Object obj) {
PHBasicInfoActivity.this.E2(view, i, (LabelBean) obj);
}
}, new SingleBottomSheetDialog.InitCallback() {
@Override
public final boolean a(Object obj) {
boolean F2;
F2 = PHBasicInfoActivity.this.F2((LabelBean) obj);
return F2;
}
}, new SingleBottomSheetDialog.ItemDefaultScrollIndexListener() {
@Override
public final int a() {
int G2;
G2 = PHBasicInfoActivity.this.G2();
return G2;
}
});
singleBottomSheetDialog.l(R.string.next_payday);
singleBottomSheetDialog.show();
}
class AnonymousClass1 implements GeneralConfigManager.FetchGeneralConfigCallback {
AnonymousClass1() {
}
public void c(List list) {
PHBasicInfoActivity.this.S = list;
}
public void a(@NonNull HashMap<String, String> hashMap) {
try {
if (Boolean.parseBoolean(hashMap.get(AppSwitchConfigKey.PHI_NEED_UPLOAD_APP_LIST_IN_BASIC_INFO_AUTH))) {
DataCollectionUtil.b(PHBasicInfoActivity.this, new DataCollectionUtil.CallBack() {
@Override
public final void onResult(Object obj) {
PHBasicInfoActivity.AnonymousClass1.this.c((List) obj);
}
});
}
} catch (Exception unused) {
}
}
public void onFinish() {
}
public void onError(@Nullable String str) {
}
}
}