正在查看: Easycash v3.75.13 应用的 PersonalInformationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Easycash v3.75.13 应用的 PersonalInformationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fintopia.lender.module.profile;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import butterknife.BindView;
import butterknife.OnClick;
import com.bigkoo.pickerview.TimePickerView;
import com.fintopia.lender.R;
import com.fintopia.lender.module.account.AccountSecurityActivity;
import com.fintopia.lender.module.account.ChangeNumberActivity;
import com.fintopia.lender.module.baseui.LenderCommonActivity;
import com.fintopia.lender.module.maintab.AuthHelper;
import com.fintopia.lender.module.network.ILenderApiRoutes;
import com.fintopia.lender.module.profile.model.CanModifyInformationResponse;
import com.fintopia.lender.module.profile.model.UserResponse;
import com.fintopia.lender.widget.FullScreenDialog;
import com.fintopia.lender.widget.LenderConfirmDialog;
import com.fintopia.lender.widget.PickViewHelper;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.framework.lifecycle.m;
import com.lingyue.idnbaselib.model.IdnBaseResult;
import com.lingyue.idnbaselib.model.IdnObserver;
import com.lingyue.idnbaselib.utils.EcFormatUtil;
import com.lingyue.idnbaselib.utils.ThirdPartEventUtils;
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.disposables.Disposable;
import java.util.Calendar;
import java.util.Date;
public class PersonalInformationActivity extends LenderCommonActivity {
@BindView(4759)
ConstraintLayout clBirthday;
@BindView(4764)
ConstraintLayout clIndustryVocation;
@BindView(4770)
ConstraintLayout clName;
@BindView(4771)
ConstraintLayout clNik;
@BindView(5598)
TextView tvBirthday;
@BindView(5678)
TextView tvIndustryVocation;
@BindView(5756)
TextView tvNIK;
@BindView(5748)
TextView tvName;
@BindView(5800)
TextView tvPhoneNumber;
private String f147u;
private Boolean f148v;
public void R(View view, Date date) {
this.tvBirthday.setText(DateFormatUtil.d(date));
this.tvBirthday.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, (Drawable) null, (Drawable) null);
f0(date);
}
public static void S(Activity activity, FullScreenDialog fullScreenDialog, View view, TimePickerView timePickerView) {
timePickerView.r(false);
Calendar calendar = Calendar.getInstance();
int i = calendar.get(1);
Date time = calendar.getTime();
calendar.add(1, -200);
timePickerView.t(calendar.get(1), i);
timePickerView.w(time);
}
@SensorsDataInstrumented
public void T(Date date, DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
b0(date);
SensorsDataAutoTrackHelper.trackDialog(dialogInterface, i);
AutoTrackHelper.trackViewOnClick(dialogInterface, i);
}
@SensorsDataInstrumented
public void U(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
c0();
SensorsDataAutoTrackHelper.trackDialog(dialogInterface, i);
AutoTrackHelper.trackViewOnClick(dialogInterface, i);
}
public void V(UserResponse userResponse) {
Boolean bool = userResponse.body.isProvideWorkInfo;
this.f148v = Boolean.valueOf(bool != null && bool.booleanValue());
Z(userResponse);
W(userResponse);
X(userResponse);
this.tvPhoneNumber.setText(EcFormatUtil.y(userResponse.body.mobileNumber));
}
private void W(UserResponse userResponse) {
if (TextUtils.isEmpty(userResponse.body.birthday)) {
c0();
return;
}
d0();
this.tvBirthday.setText(EcFormatUtil.f(EcFormatUtil.a(userResponse.body.birthday)));
}
private void X(UserResponse userResponse) {
if (!this.f148v.booleanValue()) {
this.tvIndustryVocation.setText(getString(R.string.lender_not_filled));
this.tvIndustryVocation.setTextColor(getResources().getColor(R.color.c_base_light_black));
this.tvIndustryVocation.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, getResources().getDrawable(R.drawable.ic_arrow_dcdde0), (Drawable) null);
this.clIndustryVocation.setEnabled(true);
return;
}
this.tvIndustryVocation.setText(userResponse.body.industry + ", " + userResponse.body.profession);
this.tvIndustryVocation.setTextColor(getResources().getColor(R.color.c_base_black));
this.tvIndustryVocation.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, (Drawable) null, (Drawable) null);
this.clIndustryVocation.setEnabled(false);
}
private void Y(boolean z, String str) {
this.clNik.setEnabled(z);
this.tvNIK.setText(str);
this.tvNIK.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, z ? getResources().getDrawable(R.drawable.ic_arrow_dcdde0) : null, (Drawable) null);
}
private void Z(UserResponse userResponse) {
char c;
String str = this.f147u;
switch (str.hashCode()) {
case -2116564694:
if (str.equals("CAN_NOT_BE_MODIFIED")) {
c = 3;
break;
}
c = 65535;
break;
case -1364061898:
if (str.equals("CAN_BE_MODIFIED")) {
c = 0;
break;
}
c = 65535;
break;
case -1192177016:
if (str.equals("MODIFY_NIK_APPLYING")) {
c = 2;
break;
}
c = 65535;
break;
case -773389789:
if (str.equals("MODIFY_NAME_APPLYING")) {
c = 1;
break;
}
c = 65535;
break;
default:
c = 65535;
break;
}
if (c == 0) {
a0(true, userResponse.body.name);
Y(true, userResponse.body.identityNumber);
} else if (c == 1) {
a0(true, getString(R.string.lender_under_review));
Y(false, userResponse.body.identityNumber);
} else if (c != 2) {
a0(false, userResponse.body.name);
Y(false, userResponse.body.identityNumber);
} else {
a0(false, userResponse.body.name);
Y(true, getString(R.string.lender_under_review));
}
}
private void a0(boolean z, String str) {
this.clName.setEnabled(z);
this.tvName.setText(str);
this.tvName.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, z ? getResources().getDrawable(R.drawable.ic_arrow_dcdde0) : null, (Drawable) null);
}
private void b0(Date date) {
showLoadingDialog();
((ILenderApiRoutes) this.apiHelper.a()).X(DateFormatUtil.a(date)).a(new IdnObserver<IdnBaseResult>(getCallBack()) {
public void onSuccess(IdnBaseResult idnBaseResult) {
PersonalInformationActivity.this.d0();
PersonalInformationActivity.this.dismissLoadingDialog();
}
});
}
private void c0() {
this.clBirthday.setEnabled(true);
this.tvBirthday.setText(getString(R.string.lender_edit));
this.tvBirthday.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, getResources().getDrawable(R.drawable.ic_arrow_dcdde0), (Drawable) null);
this.tvBirthday.setCompoundDrawablePadding(10);
}
public void d0() {
this.clBirthday.setEnabled(false);
this.tvBirthday.setCompoundDrawablesWithIntrinsicBounds((Drawable) null, (Drawable) null, (Drawable) null, (Drawable) null);
}
private void e0() {
PickViewHelper.c(this, String.valueOf(this.tvBirthday.getId()), new PickViewHelper.TimeSelectionCallBack() {
@Override
public final void b(View view, Date date) {
PersonalInformationActivity.this.R(view, date);
}
}, new FullScreenDialog.IFullScreenDialogInitCallBack() {
@Override
public final void a(Activity activity, FullScreenDialog fullScreenDialog, View view, Object obj) {
PersonalInformationActivity.S(activity, fullScreenDialog, view, (TimePickerView) obj);
}
}).show();
}
private void f0(final Date date) {
LenderConfirmDialog.e(this).s("dialog_confirm_modify_birthday").g(getString(R.string.lender_modify_birthday_tip)).o(R.string.lender_confirm).j(R.string.lender_cancel).n(new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
PersonalInformationActivity.this.T(date, dialogInterface, i);
}
}).i(new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
PersonalInformationActivity.this.U(dialogInterface, i);
}
}).show();
}
public static void startPersonalInformationActivity(Activity activity) {
activity.startActivity(new Intent(activity, (Class<?>) PersonalInformationActivity.class));
}
@Override
protected void A() {
super.A();
this.clName.setEnabled(false);
this.clNik.setEnabled(false);
this.clBirthday.setEnabled(false);
}
@Override
public int getLayoutID() {
return R.layout.layout_lender_personal_information_activity;
}
@OnClick({5589})
protected void goBankAccount() {
if (BaseUtils.l() || this.userSession.b().j == null) {
return;
}
if (AuthHelper.g(this)) {
BankAccountActivity.startBankAccountActivity(u(), this.userSession.b().j);
} else {
AuthHelper.f(this, null);
}
}
@OnClick({5332})
protected void goChangePhone() {
if (BaseUtils.l()) {
return;
}
ThirdPartEventUtils.y(this, "lender_accsecurity_changenumber");
ChangeNumberActivity.startChangeNumberActivity(this);
}
@OnClick({4759})
protected void goEditBirthday() {
if (BaseUtils.l()) {
return;
}
e0();
}
@OnClick({4764})
protected void goInputIndustryVocation() {
if (BaseUtils.l()) {
return;
}
JobIndustryInformationActivity.startJobIndustryInformationActivity(this);
}
@OnClick({4771})
protected void goModifyNIK() {
if (BaseUtils.l()) {
return;
}
jumpToWebPage(Uri.parse(((BaseActivity) this).appGlobal.a.a().toString()).buildUpon().path("webview/upload-info").appendQueryParameter("applyType", "MODIFY_NIK").build().toString());
}
@OnClick({4770})
protected void goModifyName() {
if (BaseUtils.l()) {
return;
}
jumpToWebPage(Uri.parse(((BaseActivity) this).appGlobal.a.a().toString()).buildUpon().path("webview/upload-info").appendQueryParameter("applyType", "MODIFY_NAME").build().toString());
}
@OnClick({5790})
protected void goPasswordManager() {
if (BaseUtils.l()) {
return;
}
ThirdPartEventUtils.y(this, "lender_setting_btn_accsecurity");
AccountSecurityActivity.startAccountSecurityActivity(u());
}
@Override
protected void onResume() {
super.onResume();
sendCanModifyInformationRequest();
}
@Override
public Disposable runOnActiveEvent(Runnable runnable) {
return m.a(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnCreated(@NonNull Runnable runnable) {
return m.b(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnDestroy(@NonNull Runnable runnable) {
return m.c(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnEvent(@NonNull LifecycleEvent lifecycleEvent, @Nullable Runnable runnable) {
return m.d(this, lifecycleEvent, runnable);
}
@Override
public Disposable runOnEvents(@NonNull LifecycleEvent[] lifecycleEventArr, @Nullable Runnable runnable) {
return m.e(this, lifecycleEventArr, runnable);
}
public void sendCanModifyInformationRequest() {
showLoadingDialog();
((ILenderApiRoutes) this.apiHelper.a()).j1().a(new IdnObserver<CanModifyInformationResponse>(this) {
public void onError(Throwable th, CanModifyInformationResponse canModifyInformationResponse) {
super.onError(th, canModifyInformationResponse);
PersonalInformationActivity.this.f147u = "CAN_NOT_BE_MODIFIED";
PersonalInformationActivity.this.sendGetUserInfoRequest();
}
public void onSuccess(CanModifyInformationResponse canModifyInformationResponse) {
PersonalInformationActivity.this.f147u = canModifyInformationResponse.body.modifyStatus;
PersonalInformationActivity.this.sendGetUserInfoRequest();
}
});
}
public void sendGetUserInfoRequest() {
showLoadingDialog();
((ILenderApiRoutes) this.apiHelper.a()).b().a(new IdnObserver<UserResponse>(getCallBack()) {
public void onSuccess(UserResponse userResponse) {
PersonalInformationActivity.this.V(userResponse);
PersonalInformationActivity.this.dismissLoadingDialog();
}
});
}
}