正在查看: Mabilis Cash v1.19.4 应用的 PHModifyPhoneNumberLiveRecognitionResultActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mabilis Cash v1.19.4 应用的 PHModifyPhoneNumberLiveRecognitionResultActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.loans.mabiliscash.auth.living;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import androidx.annotation.NonNull;
import com.fintopia.face.models.FaceIdCard;
import com.fintopia.face.models.event.LiveDetectionEvent;
import com.lingyue.supertoolkit.tools.BaseUtils;
import com.lingyue.supertoolkit.widgets.ToastCompat;
import com.loans.mabiliscash.R;
import com.loans.mabiliscash.auth.living.upload.UploadLiveRecognitionImageHelper;
import com.loans.mabiliscash.auth.living.upload.UploadLiveRecognitionInfoHelper;
import com.loans.mabiliscash.common.BindClickCall;
import com.loans.mabiliscash.common.PHViewBindingActivity;
import com.loans.mabiliscash.databinding.ActivityModifyPhoneNumberLivenessRecognitionResultBinding;
import com.loans.mabiliscash.models.LivingInfo;
import com.loans.mabiliscash.models.OnLineServicePageName;
import com.loans.mabiliscash.models.response.VerifyLivingInfoResponse;
import java.io.Serializable;
import org.greenrobot.eventbus.EventBus;
public class PHModifyPhoneNumberLiveRecognitionResultActivity extends PHViewBindingActivity<ActivityModifyPhoneNumberLivenessRecognitionResultBinding> {
private FaceIdCard p;
private LivingInfo q;
private boolean r;
private String s;
private UploadLiveRecognitionInfoHelper f128t;
private UploadLiveRecognitionImageHelper f129u;
@SuppressLint({"HandlerLeak"})
private Handler f130v = new Handler() {
@Override
public void handleMessage(Message message) {
super.handleMessage(message);
if (message.what == 11 && !PHModifyPhoneNumberLiveRecognitionResultActivity.this.f0()) {
?? r2 = PHModifyPhoneNumberLiveRecognitionResultActivity.this;
r2.m0(r2.getString(R.string.net_work_exception));
}
}
};
public boolean f0() {
UploadLiveRecognitionImageHelper uploadLiveRecognitionImageHelper = this.f129u;
if (uploadLiveRecognitionImageHelper == null) {
return false;
}
return uploadLiveRecognitionImageHelper.c();
}
private void g0() {
V(((ActivityModifyPhoneNumberLivenessRecognitionResultBinding) this.o).b, new BindClickCall() {
@Override
public final void onClick(View view) {
PHModifyPhoneNumberLiveRecognitionResultActivity.this.j0(view);
}
});
}
private void h0() {
this.f129u = new UploadLiveRecognitionImageHelper(this, this.p, new UploadLiveRecognitionImageHelper.Callback() {
@Override
public void a(LivingInfo livingInfo) {
PHModifyPhoneNumberLiveRecognitionResultActivity.this.q = livingInfo;
PHModifyPhoneNumberLiveRecognitionResultActivity.this.o0();
}
@Override
public void b(String str) {
PHModifyPhoneNumberLiveRecognitionResultActivity.this.m0(str);
}
});
}
private void i0() {
this.f128t = new UploadLiveRecognitionInfoHelper(this, new UploadLiveRecognitionInfoHelper.Callback() {
@Override
public void a() {
PHModifyPhoneNumberLiveRecognitionResultActivity.this.p0();
}
@Override
public void b(VerifyLivingInfoResponse verifyLivingInfoResponse) {
PHModifyPhoneNumberLiveRecognitionResultActivity.this.q0(verifyLivingInfoResponse);
}
});
}
public void j0(View view) {
l0();
}
public void k0(VerifyLivingInfoResponse verifyLivingInfoResponse) {
EventBus.c().k(new LiveDetectionEvent(verifyLivingInfoResponse.body.applyCredentialId));
finish();
}
private void l0() {
if (BaseUtils.a()) {
return;
}
showLoadingDialog();
if (f0()) {
o0();
} else {
n0();
}
}
public void m0(String str) {
dismissLoadingDialog();
if (TextUtils.isEmpty(str)) {
ToastCompat.g(this, getString(R.string.net_work_exception));
} else {
ToastCompat.g(this, str);
}
((ActivityModifyPhoneNumberLivenessRecognitionResultBinding) this.o).b.setVisibility(0);
}
private void n0() {
if (this.f129u == null) {
h0();
}
showLoadingDialog();
this.f129u.l();
if (this.r) {
return;
}
this.r = true;
this.f130v.sendEmptyMessageDelayed(11, 120000L);
}
public void o0() {
if (this.q == null) {
showLoadingDialog();
n0();
} else {
if (this.f128t == null) {
i0();
}
showLoadingDialog();
this.f128t.b(this.q, this.s);
}
}
public void p0() {
dismissLoadingDialog();
this.f130v.removeCallbacksAndMessages(null);
this.f130v.postDelayed(new Runnable() {
@Override
public final void run() {
PHModifyPhoneNumberLiveRecognitionResultActivity.this.finish();
}
}, 1000L);
Q();
}
public void q0(final VerifyLivingInfoResponse verifyLivingInfoResponse) {
dismissLoadingDialog();
this.f130v.removeCallbacksAndMessages(null);
this.f130v.postDelayed(new Runnable() {
@Override
public final void run() {
PHModifyPhoneNumberLiveRecognitionResultActivity.this.k0(verifyLivingInfoResponse);
}
}, 1000L);
Q();
}
public static void start(Activity activity, FaceIdCard faceIdCard, String str) {
Intent intent = new Intent(activity, (Class<?>) PHModifyPhoneNumberLiveRecognitionResultActivity.class);
intent.putExtra("faceIdCard", (Serializable) faceIdCard);
intent.putExtra("live_detection_purpose", str);
activity.startActivity(intent);
}
@Override
public ActivityModifyPhoneNumberLivenessRecognitionResultBinding bindingInflater() {
return ActivityModifyPhoneNumberLivenessRecognitionResultBinding.c(getLayoutInflater());
}
protected void j() {
super.j();
n0();
if ("MODIFY_MOBILE".equals(this.s)) {
sendFetchOnLineServiceRequest(OnLineServicePageName.MODIFY_MOBILE_PAGE);
}
}
@Override
protected void k(@NonNull Bundle bundle) {
super.k(bundle);
this.p = bundle.getSerializable("faceIdCard");
this.q = (LivingInfo) bundle.getSerializable("living_info");
this.s = bundle.getString("live_detection_purpose");
if (this.p == null) {
finish();
}
}
protected void o() {
g0();
}
protected void s(@NonNull Bundle bundle) {
super.s(bundle);
bundle.putSerializable("faceIdCard", this.p);
bundle.putSerializable("living_info", this.q);
bundle.putString("live_detection_purpose", this.s);
}
}