正在查看: Mabilis Cash v1.19.4 应用的 PHAuthLivingV5ResultActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mabilis Cash v1.19.4 应用的 PHAuthLivingV5ResultActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.loans.mabiliscash.auth.living;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.fintopia.face.common.FaceStatisticsEvents;
import com.fintopia.face.living.faceDetector.SensorUtil;
import com.fintopia.face.models.FaceIdCard;
import com.fintopia.face.models.event.LiveDetectionEvent;
import com.fintopia.libCommon.common.CommonResult;
import com.lingyue.supertoolkit.statistics.TrackingUtil;
import com.lingyue.supertoolkit.tools.customtools.JsonParamsBuilder;
import com.loans.mabiliscash.R;
import com.loans.mabiliscash.auth.helper.AuthUtils;
import com.loans.mabiliscash.auth.helper.QuitAuthHelper;
import com.loans.mabiliscash.auth.living.upload.UploadLiveRecognitionInfoV5Helper;
import com.loans.mabiliscash.auth.living.upload.UploadLiveRecognitionV5ImageHelper;
import com.loans.mabiliscash.common.PHViewBindingActivity;
import com.loans.mabiliscash.databinding.ActivityAuthLivenessRecognitionResultBinding;
import com.loans.mabiliscash.models.GravityParamsRequest;
import com.loans.mabiliscash.models.LivingInfo;
import com.loans.mabiliscash.models.response.VerifyLivingInfoResponse;
import com.loans.mabiliscash.net.ECObserver;
import com.loans.mabiliscash.net.IApiRoutes;
import com.loans.mabiliscash.sentry.sentrybusiness.ISentryBusinessEventAutoFinish;
import com.loans.mabiliscash.sentry.sentrybusiness.SentryBusiness;
import com.loans.mabiliscash.thirdpart.AppsFlyerUtil;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import io.sentry.ITransaction;
import java.io.Serializable;
import kotlin.Metadata;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.greenrobot.eventbus.EventBus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata
public final class PHAuthLivingV5ResultActivity extends PHViewBindingActivity<ActivityAuthLivenessRecognitionResultBinding> implements ISentryBusinessEventAutoFinish {
@NotNull
public static final Companion Companion = new Companion(null);
@Nullable
private SensorUtil p;
@Nullable
private FaceIdCard q;
@Nullable
private String r;
@Nullable
private LivingInfo s;
@Nullable
private UploadLiveRecognitionV5ImageHelper f115t;
@Nullable
private UploadLiveRecognitionInfoV5Helper f116u;
private boolean f117v;
@Nullable
private ITransaction f118w;
@Nullable
private String f119x;
@NotNull
private final Handler f120y = new Handler(Looper.getMainLooper());
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@JvmStatic
public final void a(@NotNull Activity activity, @NotNull FaceIdCard faceIdCard, @NotNull String str, @Nullable String str2) {
Intrinsics.checkNotNullParameter(activity, "activity");
Intrinsics.checkNotNullParameter(faceIdCard, "faceIdCard");
Intrinsics.checkNotNullParameter(str, "purpose");
Intent intent = new Intent(activity, (Class<?>) PHAuthLivingV5ResultActivity.class);
intent.putExtra("face_id_card", (Serializable) faceIdCard);
intent.putExtra("live_detection_args", str);
intent.putExtra("auth_ab_type", str2);
activity.startActivity(intent);
}
private Companion() {
}
}
private final void Z() {
AuthUtils authUtils = this.authUtil;
T t2 = this.o;
authUtils.q(this, ((ActivityAuthLivenessRecognitionResultBinding) t2).c, R.drawable.ic_auth_personal_info, ((ActivityAuthLivenessRecognitionResultBinding) t2).e.d, ((ActivityAuthLivenessRecognitionResultBinding) t2).e.c);
}
private final void a0() {
this.f115t = new UploadLiveRecognitionV5ImageHelper(this, this.q, new UploadLiveRecognitionV5ImageHelper.Callback() {
@Override
public void a(LivingInfo livingInfo) {
String str;
Intrinsics.checkNotNullParameter(livingInfo, "livingInfo");
PHAuthLivingV5ResultActivity.this.s = livingInfo;
PHAuthLivingV5ResultActivity.this.j0();
PHAuthLivingV5ResultActivity pHAuthLivingV5ResultActivity = PHAuthLivingV5ResultActivity.this;
String str2 = FaceStatisticsEvents.f;
Intrinsics.checkNotNullExpressionValue(str2, "FACEPP_V5_UPLOAD_IMAGE_SUCCEED");
JsonParamsBuilder.SemiData c = new JsonParamsBuilder().c("purpose");
str = PHAuthLivingV5ResultActivity.this.r;
String b = c.a(str).b();
Intrinsics.checkNotNullExpressionValue(b, "build(...)");
pHAuthLivingV5ResultActivity.g0(str2, b);
}
@Override
public void b(String str) {
String str2;
Intrinsics.checkNotNullParameter(str, "detail");
PHAuthLivingV5ResultActivity.this.c0();
PHAuthLivingV5ResultActivity pHAuthLivingV5ResultActivity = PHAuthLivingV5ResultActivity.this;
String str3 = FaceStatisticsEvents.g;
Intrinsics.checkNotNullExpressionValue(str3, "FACEPP_V5_UPLOAD_IMAGE_FAILED");
JsonParamsBuilder.SemiData c = new JsonParamsBuilder().c("purpose");
str2 = PHAuthLivingV5ResultActivity.this.r;
String b = c.a(str2).b();
Intrinsics.checkNotNullExpressionValue(b, "build(...)");
pHAuthLivingV5ResultActivity.g0(str3, b);
}
});
}
private final void b0() {
this.f116u = new UploadLiveRecognitionInfoV5Helper(this, new UploadLiveRecognitionInfoV5Helper.Callback() {
@Override
public void a() {
PHAuthLivingV5ResultActivity.this.c0();
}
@Override
public void b(VerifyLivingInfoResponse verifyLivingInfoResponse) {
Intrinsics.checkNotNullParameter(verifyLivingInfoResponse, "result");
PHAuthLivingV5ResultActivity.this.c0();
}
});
}
public final void c0() {
dismissLoadingDialog();
EventBus.c().k(new LiveDetectionEvent());
k0();
((ActivityAuthLivenessRecognitionResultBinding) this.o).g.setVisibility(0);
this.authUtil.h(this, new AuthUtils.DefaultAuthCallBack(this));
}
public static final void d0() {
EventBus.c().k(new LiveDetectionEvent());
}
public final void e0(String str) {
String str2 = FaceStatisticsEvents.d;
Intrinsics.checkNotNullExpressionValue(str2, "FACEPP_V5_FETCH_VIDEO_KEY_RESULT");
String b = new JsonParamsBuilder().c("purpose").a(this.r).c("videoKey").a(str).b();
Intrinsics.checkNotNullExpressionValue(b, "build(...)");
g0(str2, b);
if (TextUtils.isEmpty(str)) {
c0();
return;
}
FaceIdCard faceIdCard = this.q;
if (faceIdCard != null) {
faceIdCard.videoKey = str;
}
h0();
}
private final void f0(FaceIdCard faceIdCard) {
if (faceIdCard != null) {
String str = faceIdCard.bizToken;
Intrinsics.checkNotNullExpressionValue(str, "bizToken");
if (str.length() == 0) {
return;
}
showLoadingDialog();
IApiRoutes a = this.apiHelper.a();
String str2 = faceIdCard.bizToken;
AppsFlyerUtil.Companion companion = AppsFlyerUtil.b;
a.E(str2, companion.b().e(this), companion.b().f(this)).w(AndroidSchedulers.a()).a(new PHAuthLivingV5ResultActivity$sendUploadLivingInfoV5Request$1(this));
}
}
public final void g0(String str, String str2) {
TrackingUtil.j(this, str, str2);
}
private final void h0() {
a0();
showLoadingDialog();
String str = FaceStatisticsEvents.e;
Intrinsics.checkNotNullExpressionValue(str, "FACEPP_V5_START_UPLOAD_IMAGE");
String b = new JsonParamsBuilder().c("purpose").a(this.r).b();
Intrinsics.checkNotNullExpressionValue(b, "build(...)");
g0(str, b);
UploadLiveRecognitionV5ImageHelper uploadLiveRecognitionV5ImageHelper = this.f115t;
if (uploadLiveRecognitionV5ImageHelper != null) {
uploadLiveRecognitionV5ImageHelper.l();
}
if (this.f117v) {
return;
}
this.f117v = true;
this.f120y.postDelayed(new Runnable() {
@Override
public final void run() {
PHAuthLivingV5ResultActivity.i0(PHAuthLivingV5ResultActivity.this);
}
}, 120000L);
}
public static final void i0(PHAuthLivingV5ResultActivity pHAuthLivingV5ResultActivity) {
pHAuthLivingV5ResultActivity.c0();
String str = FaceStatisticsEvents.h;
Intrinsics.checkNotNullExpressionValue(str, "FACEPP_V5_UPLOAD_IMAGE_TIMEOUT");
String b = new JsonParamsBuilder().c("purpose").a(pHAuthLivingV5ResultActivity.r).b();
Intrinsics.checkNotNullExpressionValue(b, "build(...)");
pHAuthLivingV5ResultActivity.g0(str, b);
}
public final void j0() {
if (this.s == null) {
showLoadingDialog();
h0();
return;
}
if (this.f116u == null) {
b0();
}
showLoadingDialog();
UploadLiveRecognitionInfoV5Helper uploadLiveRecognitionInfoV5Helper = this.f116u;
if (uploadLiveRecognitionInfoV5Helper != null) {
uploadLiveRecognitionInfoV5Helper.b(this.s, this.r);
}
}
private final void k0() {
if (this.p == null) {
return;
}
IApiRoutes a = this.apiHelper.a();
SensorUtil sensorUtil = this.p;
Intrinsics.b(sensorUtil);
float f = sensorUtil.c;
SensorUtil sensorUtil2 = this.p;
Intrinsics.b(sensorUtil2);
float f2 = sensorUtil2.d;
SensorUtil sensorUtil3 = this.p;
Intrinsics.b(sensorUtil3);
a.M(new GravityParamsRequest(f, f2, sensorUtil3.e)).w(AndroidSchedulers.a()).K(Schedulers.b()).a(new ECObserver<CommonResult>(this) {
{
super(this);
}
@Override
public void c(CommonResult commonResult) {
}
@Override
public void e(Throwable th, CommonResult commonResult) {
}
});
}
@JvmStatic
public static final void start(@NotNull Activity activity, @NotNull FaceIdCard faceIdCard, @NotNull String str, @Nullable String str2) {
Companion.a(activity, faceIdCard, str, str2);
}
@Override
@NotNull
public ActivityAuthLivenessRecognitionResultBinding bindingInflater() {
ActivityAuthLivenessRecognitionResultBinding c = ActivityAuthLivenessRecognitionResultBinding.c(getLayoutInflater());
Intrinsics.checkNotNullExpressionValue(c, "inflate(...)");
return c;
}
protected void init() {
super.init();
this.p = new SensorUtil(this);
Z();
}
protected void j() {
super.j();
FaceIdCard faceIdCard = this.q;
if (faceIdCard == null) {
finish();
} else {
f0(faceIdCard);
}
}
@Override
protected void k(@NotNull Bundle bundle) {
Intrinsics.checkNotNullParameter(bundle, "inState");
super.k(bundle);
this.q = bundle.getSerializable("face_id_card");
this.r = bundle.getString("live_detection_args");
this.f119x = bundle.getString("auth_ab_type");
if (this.q == null) {
finish();
}
}
@Override
public void onBackPressed() {
QuitAuthHelper.p(this, new Runnable() {
@Override
public final void run() {
PHAuthLivingV5ResultActivity.d0();
}
});
}
@Override
protected void onCreate(@Nullable Bundle bundle) {
ITransaction f = SentryBusiness.e().f("UserAuthOrder");
this.f118w = f;
if (f != null) {
f.a("liveDetectWay", "FACEPP_V5");
}
super.onCreate(bundle);
}
@Override
protected void onDestroy() {
super.onDestroy();
this.f120y.removeCallbacksAndMessages(null);
SensorUtil sensorUtil = this.p;
if (sensorUtil != null) {
sensorUtil.c();
}
}
protected void s(@NotNull Bundle bundle) {
Intrinsics.checkNotNullParameter(bundle, "outState");
super.s(bundle);
bundle.putSerializable("face_id_card", this.q);
bundle.putString("live_detection_args", this.r);
bundle.putString("auth_ab_type", this.f119x);
}
}