得物.apk(点击下载) / RepayResultActivity.java
package com.shizhuang.duapp.modules.financialstagesdk.ui.activity;
import android.content.Context;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.Group;
import cc0.e;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.base.core.BaseCoreActivity;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.financialstagesdk.BannerSceneType;
import com.shizhuang.duapp.modules.financialstagesdk.model.FinishRepayActivityEvent;
import com.shizhuang.duapp.modules.financialstagesdk.model.RepayResult;
import com.shizhuang.duapp.modules.financialstagesdk.model.RepaySuccessEvent;
import com.shizhuang.duapp.modules.financialstagesdk.utils.FsBannerShowHelper;
import com.shizhuang.duapp.modules.financialstagesdk.utils.FsStringUtils;
import com.youth.banner.Banner;
import dc0.d;
import fc0.g2;
import fc0.h2;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Timer;
import jn.b;
import kotlin.Metadata;
import kotlin.jvm.internal.StringCompanionObject;
import org.greenrobot.eventbus.EventBus;
import p4.h;
import rd.l;
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/shizhuang/duapp/modules/financialstagesdk/ui/activity/RepayResultActivity;", "Lcom/shizhuang/duapp/common/base/core/BaseCoreActivity;", "<init>", "()V", "com.shizhuang.duapp.libs.du_financial_stage_sdk"}, k = 1, mv = {1, 4, 2})
/* compiled from: RepayResultActivity.kt */
public final class RepayResultActivity extends BaseCoreActivity {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: h reason: collision with root package name */
public String f15358h;
public CountDownTimer i;
public Timer j;
public boolean k;
public boolean l = true;
public HashMap m;
public class _boostWeave {
public static ChangeQuickRedirect changeQuickRedirect;
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
@Insert(mayCreateSuper = true, value = "onCreate")
@Keep
public static void ActivityMethodWeaver_onCreate(@Nullable RepayResultActivity repayResultActivity, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{repayResultActivity, bundle}, null, changeQuickRedirect, true, 149934, new Class[]{RepayResultActivity.class, Bundle.class}, Void.TYPE).isSupported) {
b bVar = b.f34396a;
if (!bVar.b()) {
bVar.d(true);
}
long currentTimeMillis = System.currentTimeMillis();
RepayResultActivity.f(repayResultActivity, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (repayResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.financialstagesdk.ui.activity.RepayResultActivity")) {
bVar.activityOnCreateMethod(repayResultActivity, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void ActivityMethodWeaver_onResume(RepayResultActivity repayResultActivity) {
if (!PatchProxy.proxy(new Object[]{repayResultActivity}, null, changeQuickRedirect, true, 149936, new Class[]{RepayResultActivity.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
RepayResultActivity.h(repayResultActivity);
long currentTimeMillis2 = System.currentTimeMillis();
if (repayResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.financialstagesdk.ui.activity.RepayResultActivity")) {
b.f34396a.activityOnResumeMethod(repayResultActivity, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void ActivityMethodWeaver_onStart(RepayResultActivity repayResultActivity) {
if (!PatchProxy.proxy(new Object[]{repayResultActivity}, null, changeQuickRedirect, true, 149935, new Class[]{RepayResultActivity.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
RepayResultActivity.g(repayResultActivity);
long currentTimeMillis2 = System.currentTimeMillis();
if (repayResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.financialstagesdk.ui.activity.RepayResultActivity")) {
b.f34396a.activityOnStartMethod(repayResultActivity, currentTimeMillis, currentTimeMillis2);
}
}
}
}
/* compiled from: RepayResultActivity.kt */
public static final class a extends d<RepayResult> {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ RepayResultActivity f;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public a(RepayResultActivity repayResultActivity, Context context) {
super(context);
this.f = repayResultActivity;
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, dc0.d
public void onFailed(@org.jetbrains.annotations.Nullable l<Object> lVar) {
if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 149943, new Class[]{l.class}, Void.TYPE).isSupported) {
super.onFailed(lVar);
this.f.l = true;
}
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, dc0.d
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149941, new Class[0], Void.TYPE).isSupported) {
super.onStart();
this.f.l = false;
}
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, dc0.d
public void onSuccess(RepayResult repayResult) {
RepayResult repayResult2 = repayResult;
if (!PatchProxy.proxy(new Object[]{repayResult2}, this, changeQuickRedirect, false, 149942, new Class[]{RepayResult.class}, Void.TYPE).isSupported) {
super.onSuccess(repayResult2);
this.f.l = true;
if (repayResult2.getStatus() == 1) {
RepayResultActivity repayResultActivity = this.f;
if (!repayResultActivity.k && !PatchProxy.proxy(new Object[0], repayResultActivity, RepayResultActivity.changeQuickRedirect, false, 149921, new Class[0], Void.TYPE).isSupported) {
repayResultActivity.k = true;
h hVar = new h("com.shizhuang.duapp.modules.financialstagesdk.ui.activity.RepayResultActivity");
repayResultActivity.j = hVar;
hVar.schedule(new h2(repayResultActivity), 0, 1000);
return;
}
return;
}
this.f.i();
this.f.m(repayResult2);
}
}
}
public static void f(RepayResultActivity repayResultActivity, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, repayResultActivity, changeQuickRedirect, false, 149929, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void g(RepayResultActivity repayResultActivity) {
if (!PatchProxy.proxy(new Object[0], repayResultActivity, changeQuickRedirect, false, 149931, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static void h(RepayResultActivity repayResultActivity) {
if (!PatchProxy.proxy(new Object[0], repayResultActivity, changeQuickRedirect, false, 149933, new Class[0], Void.TYPE).isSupported) {
super.onResume();
}
}
public View _$_findCachedViewById(int i3) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 149926, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.m == null) {
this.m = new HashMap();
}
View view = (View) this.m.get(Integer.valueOf(i3));
if (view != null) {
return view;
}
View findViewById = findViewById(i3);
this.m.put(Integer.valueOf(i3), findViewById);
return findViewById;
}
@Override // com.shizhuang.duapp.common.base.core.IViewController2, com.shizhuang.duapp.common.base.core.BaseCoreActivity
public int getLayout() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149912, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.activity_fs_repay_reslut;
}
public final void i() {
CountDownTimer countDownTimer;
Timer timer;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149924, new Class[0], Void.TYPE).isSupported) {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149922, new Class[0], Void.TYPE).isSupported && (timer = this.j) != null) {
timer.cancel();
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149923, new Class[0], Void.TYPE).isSupported && (countDownTimer = this.i) != null) {
countDownTimer.cancel();
}
}
}
@Override // com.shizhuang.duapp.common.base.core.IViewController2, com.shizhuang.duapp.common.base.core.BaseCoreActivity
public void initData() {
boolean z = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149913, new Class[0], Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.common.base.core.IViewController2, com.shizhuang.duapp.common.base.core.BaseCoreActivity
public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 149914, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
Toolbar e = e();
if (e != null) {
e.setNavigationOnClickListener(new RepayResultActivity$initView$1(this));
}
this.f15358h = getIntent().getStringExtra("repayNo");
String str = this.f15358h;
if (str == null) {
str = "";
}
m(new RepayResult(str, 1, 0, null, null, null, null, null, 248, null));
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149919, new Class[0], Void.TYPE).isSupported) {
((DuImageLoaderView) _$_findCachedViewById(R.id.img)).i("https://cdn.poizon.com/node-common/5abf914d8316761d7556da6384193365.gif").x();
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149915, new Class[0], Void.TYPE).isSupported) {
this.i = new g2(this, (long) 5000, 1000).start();
}
k(this.f15358h);
((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setOnClickListener(new RepayResultActivity$initView$2(this));
((TextView) _$_findCachedViewById(R.id.tv_to_bill_fail)).setOnClickListener(new RepayResultActivity$initView$3(this));
((TextView) _$_findCachedViewById(R.id.tv_to_repay)).setOnClickListener(new RepayResultActivity$initView$4(this));
}
}
public final void j() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149920, new Class[0], Void.TYPE).isSupported) {
EventBus.b().f(new FinishRepayActivityEvent());
}
}
public final void k(String str) {
if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 149916, new Class[]{String.class}, Void.TYPE).isSupported && str != null && this.l) {
e.f2461a.z(str, new a(this, this));
}
}
public final void l() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149918, new Class[0], Void.TYPE).isSupported) {
new FsBannerShowHelper(BannerSceneType.TYPE_REPAYMENT).b((Banner) _$_findCachedViewById(R.id.banner));
}
}
public final void m(RepayResult repayResult) {
boolean z = true;
if (!PatchProxy.proxy(new Object[]{repayResult}, this, changeQuickRedirect, false, 149917, new Class[]{RepayResult.class}, Void.TYPE).isSupported) {
int status = repayResult.getStatus();
String str = "";
if (status == 1) {
((TextView) _$_findCachedViewById(R.id.tv_1)).setText(R.string.fs_repaying);
((TextView) _$_findCachedViewById(R.id.tv_1)).setTextColor(getResources().getColor(R.color.fs_color_blue_01c2c3));
((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setVisibility(0);
((Group) _$_findCachedViewById(R.id.group)).setVisibility(8);
} else if (status == 2) {
j();
EventBus.b().f(new RepaySuccessEvent());
((DuImageLoaderView) _$_findCachedViewById(R.id.img)).k();
g00.a.o((DuImageLoaderView) _$_findCachedViewById(R.id.img), "https://cdn.poizon.com/node-common/eca57963cf0c7e5c7e4b95a2913296a5.gif", 1, true);
((TextView) _$_findCachedViewById(R.id.tv_1)).setText(R.string.fs_repay_success);
((TextView) _$_findCachedViewById(R.id.tv_1)).setTextColor(getResources().getColor(R.color.fs_color_blue_01c2c3));
StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
((TextView) _$_findCachedViewById(R.id.tv_2)).setText(String.format(getString(R.string.fs_repay_amount), Arrays.copyOf(new Object[]{FsStringUtils.a(repayResult.getAmount())}, 1)));
((TextView) _$_findCachedViewById(R.id.tv_2)).setTextColor(getResources().getColor(R.color.fs_color_gray_7f7f8e));
((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setVisibility(0);
((Group) _$_findCachedViewById(R.id.group)).setVisibility(8);
l();
} else if (status == 4) {
j();
((DuImageLoaderView) _$_findCachedViewById(R.id.img)).h(R.mipmap.fs_ic_applying).x();
((TextView) _$_findCachedViewById(R.id.tv_1)).setText(R.string.fs_repay_processing);
((TextView) _$_findCachedViewById(R.id.tv_1)).setTextColor(getResources().getColor(R.color.fs_color_blue_01c2c3));
((TextView) _$_findCachedViewById(R.id.tv_2)).setText(R.string.fs_do_not_repeat_repay);
((TextView) _$_findCachedViewById(R.id.tv_2)).setTextColor(getResources().getColor(R.color.fs_color_gray_7f7f8e));
((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setVisibility(0);
((Group) _$_findCachedViewById(R.id.group)).setVisibility(8);
l();
} else if (status == 9) {
((DuImageLoaderView) _$_findCachedViewById(R.id.img)).h(R.mipmap.fs_ic_apply_fail).x();
((TextView) _$_findCachedViewById(R.id.tv_1)).setText(R.string.fs_repay_fail);
((TextView) _$_findCachedViewById(R.id.tv_1)).setTextColor(getResources().getColor(R.color.fs_color_black_14151a));
TextView textView = (TextView) _$_findCachedViewById(R.id.tv_2);
String repayFailReason = repayResult.getRepayFailReason();
if (repayFailReason == null) {
repayFailReason = str;
}
textView.setText(repayFailReason);
((TextView) _$_findCachedViewById(R.id.tv_2)).setText(R.string.fs_please_re_repay);
((TextView) _$_findCachedViewById(R.id.tv_2)).setTextColor(getResources().getColor(R.color.fs_color_gray_7f7f8e));
((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setVisibility(8);
((Group) _$_findCachedViewById(R.id.group)).setVisibility(0);
}
String creditTip = repayResult.getCreditTip();
if (!(creditTip == null || creditTip.length() == 0)) {
z = false;
}
if (z) {
((TextView) _$_findCachedViewById(R.id.tvCreditTips)).setVisibility(8);
return;
}
((TextView) _$_findCachedViewById(R.id.tvCreditTips)).setVisibility(0);
TextView textView2 = (TextView) _$_findCachedViewById(R.id.tvCreditTips);
String creditTip2 = repayResult.getCreditTip();
if (creditTip2 != null) {
str = creditTip2;
}
textView2.setText(str);
}
}
@Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.base.core.BaseCoreActivity
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 149928, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.ActivityMethodWeaver_onCreate(this, bundle);
}
}
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.base.core.BaseCoreActivity
public void onDestroy() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149925, new Class[0], Void.TYPE).isSupported) {
super.onDestroy();
i();
}
}
@Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.base.core.BaseCoreActivity
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149932, new Class[0], Void.TYPE).isSupported) {
_boostWeave.ActivityMethodWeaver_onResume(this);
}
}
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.base.core.BaseCoreActivity
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 149930, new Class[0], Void.TYPE).isSupported) {
_boostWeave.ActivityMethodWeaver_onStart(this);
}
}
}