正在查看: Easycash v3.75.13 应用的 PrivyIdWebActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Easycash v3.75.13 应用的 PrivyIdWebActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.lingyue.easycash.activity;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.github.lzyzsd.jsbridge.BridgeWebView;
import com.lingyue.easycash.R;
import com.lingyue.easycash.business.nsrender.WebViewCore;
import com.lingyue.easycash.models.event.InitCheckOrderSuccessEvent;
import com.lingyue.easycash.models.event.SignInterruptEvent;
import com.lingyue.easycash.models.event.WrittenSignResultEvent;
import com.lingyue.easycash.models.sign.BizCheckResultResponse;
import com.lingyue.easycash.net.IApiRoutes;
import com.lingyue.easycash.widght.EasycashSingleButtonDialog;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.model.IdnObserver;
import com.lingyue.idnbaselib.model.sign.BizCheckResultInfo;
import com.lingyue.idnbaselib.model.sign.CheckStatus;
import com.lingyue.idnbaselib.model.sign.CheckType;
import com.lingyue.idnbaselib.utils.EcActivityLifecycleCallback;
import io.reactivex.disposables.Disposable;
import java.util.concurrent.TimeUnit;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
public class PrivyIdWebActivity extends EasyCashWebViewActivity {
private BizCheckResultInfo Q;
static class AnonymousClass2 {
static final int[] a;
static {
int[] iArr = new int[CheckStatus.values().length];
a = iArr;
try {
iArr[CheckStatus.SUCCESS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[CheckStatus.INIT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[CheckStatus.PENDING.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[CheckStatus.FAILED.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[CheckStatus.EXPIRED.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[CheckStatus.UNKNOWN.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
}
}
public void R0() {
if (EcActivityLifecycleCallback.f.f(this)) {
U0();
}
}
public void S0(DialogInterface dialogInterface) {
finish();
}
public void T0(BizCheckResultResponse bizCheckResultResponse) {
if (!this.Q.checkType.equals(bizCheckResultResponse.body.checkType)) {
dismissLoadingDialog();
return;
}
BizCheckResultInfo bizCheckResultInfo = bizCheckResultResponse.body;
this.Q = bizCheckResultInfo;
int i = AnonymousClass2.a[CheckStatus.a(bizCheckResultInfo.checkGroupStatus).ordinal()];
if (i == 1) {
dismissLoadingDialog();
EventBus.c().k(new InitCheckOrderSuccessEvent());
finish();
} else {
if (i == 2 || i == 3) {
BridgeWebView bridgeWebView = this.C;
if (bridgeWebView == null) {
return;
}
bridgeWebView.postDelayed(new Runnable() {
@Override
public final void run() {
PrivyIdWebActivity.this.R0();
}
}, TimeUnit.SECONDS.toMillis(this.Q.getTimeInterval()));
return;
}
if (i == 4 || i == 5) {
dismissLoadingDialog();
EasycashSingleButtonDialog f = EasycashSingleButtonDialog.d(this).o("dialog_sign_expired").g(R.string.easycash_expired_privy_id_tip).f(2131886194);
f.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
PrivyIdWebActivity.this.S0(dialogInterface);
}
});
f.show();
}
dismissLoadingDialog();
}
}
private void U0() {
IApiRoutes a = this.apiHelper.a();
BizCheckResultInfo bizCheckResultInfo = this.Q;
a.f2(bizCheckResultInfo.businessId, bizCheckResultInfo.businessType, bizCheckResultInfo.checkTypeGroup).a(new IdnObserver<BizCheckResultResponse>(this) {
@Override
public void onError(Throwable th, BizCheckResultResponse bizCheckResultResponse) {
super.onError(th, (Throwable) bizCheckResultResponse);
PrivyIdWebActivity.this.dismissLoadingDialog();
}
@Override
public void onSuccess(BizCheckResultResponse bizCheckResultResponse) {
if (EcActivityLifecycleCallback.f.f(PrivyIdWebActivity.this)) {
PrivyIdWebActivity.this.T0(bizCheckResultResponse);
}
}
@Override
protected boolean superShowErrorToast() {
return false;
}
});
}
public static void startPrivyIdWebActivity(Activity activity, String str, BizCheckResultInfo bizCheckResultInfo) {
if (TextUtils.isEmpty(str)) {
return;
}
WebViewCore.h().t(str);
Intent intent = new Intent(activity, (Class<?>) PrivyIdWebActivity.class);
intent.putExtra("actionUrl", str);
intent.putExtra("orderCheckInfo", bizCheckResultInfo);
activity.startActivity(intent);
}
@Override
protected void B(@NonNull Bundle bundle) {
super.B(bundle);
this.Q = (BizCheckResultInfo) bundle.getSerializable("orderCheckInfo");
}
@Override
protected void N(@NonNull Bundle bundle) {
super.N(bundle);
bundle.putSerializable("orderCheckInfo", this.Q);
}
@Override
public void onBackPressed() {
super.onBackPressed();
if (CheckType.a(this.Q.checkType) == CheckType.PRIVY_SIGNATURE || CheckType.a(this.Q.checkType) == CheckType.OJK_LOAN_DEMO_SIGNATURE) {
EventBus.c().k(new SignInterruptEvent());
}
}
@Override
protected void onResume() {
super.onResume();
if (CheckType.a(this.Q.checkType) == CheckType.PRIVY_SIGNATURE || CheckType.a(this.Q.checkType) == CheckType.OJK_LOAN_DEMO_SIGNATURE) {
U0();
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onSignResult(WrittenSignResultEvent writtenSignResultEvent) {
showLoadingDialog();
U0();
}
@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);
}
}