正在查看: Niza v1.4.3 应用的 SNSAppActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Niza v1.4.3 应用的 SNSAppActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.sumsub.sns.internal.features.presentation.main;
import android.content.Intent;
import android.nfc.tech.IsoDep;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.KeyEvent;
import android.view.View;
import androidx.activity.ComponentActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.os.BundleCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentResultListener;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import com.sumsub.sns.R;
import com.sumsub.sns.core.SNSMobileSDK;
import com.sumsub.sns.core.data.model.SNSCompletionResult;
import com.sumsub.sns.core.presentation.base.c;
import com.sumsub.sns.core.widget.SNSProgressView;
import com.sumsub.sns.internal.core.analytics.Screen;
import com.sumsub.sns.internal.core.common.NetworkManager;
import com.sumsub.sns.internal.core.common.i;
import com.sumsub.sns.internal.core.common.n0;
import com.sumsub.sns.internal.core.common.o0;
import com.sumsub.sns.internal.core.common.q0;
import com.sumsub.sns.internal.core.common.r;
import com.sumsub.sns.internal.core.common.w0;
import com.sumsub.sns.internal.features.data.model.common.Document;
import com.sumsub.sns.internal.features.data.model.common.DocumentType;
import com.sumsub.sns.internal.features.data.model.common.ValidationIdentifierType;
import com.sumsub.sns.internal.features.data.model.common.o;
import com.sumsub.sns.internal.features.data.model.common.v;
import com.sumsub.sns.internal.features.presentation.main.a;
import com.sumsub.sns.internal.features.presentation.main.c;
import com.sumsub.sns.internal.features.presentation.prooface.SNSLiveness3dFaceFragment;
import com.sumsub.sns.internal.features.presentation.questionnaire.SNSQuestionnaireFragment;
import com.sumsub.sns.internal.features.presentation.videoident.presentation.SNSVideoIdentFragment;
import io.sentry.clientreport.DiscardedEvent;
import io.sentry.protocol.Request;
import io.sentry.protocol.SentryThread;
import java.io.File;
import java.util.Map;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.Reflection;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.Dispatchers;
@Metadata(d1 = {"\u0000ì\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\r\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010$\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u0000 62\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u00012\u00020\u00042\u00020\u0005:\u0001\rB\u0007¢\u0006\u0004\bj\u0010kJ\"\u0010\r\u001a\u00020\f2\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\b2\b\u0010\u000b\u001a\u0004\u0018\u00010\nH\u0002J\u0010\u0010\u0010\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\u000eH\u0002J\u0010\u0010\r\u001a\u00020\f2\u0006\u0010\u0012\u001a\u00020\u0011H\u0002J\b\u0010\u0013\u001a\u00020\fH\u0002J\b\u0010\u0014\u001a\u00020\fH\u0002J0\u0010\r\u001a\u00020\f2\u0006\u0010\u0016\u001a\u00020\u00152\n\b\u0002\u0010\u0017\u001a\u0004\u0018\u00010\n2\b\b\u0002\u0010\u0018\u001a\u00020\b2\b\b\u0002\u0010\u0019\u001a\u00020\bH\u0002J\u0018\u0010\u001a\u001a\u00020\f2\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u0017\u001a\u00020\nH\u0002J\b\u0010\u001b\u001a\u00020\fH\u0002J\u0010\u0010\u0010\u001a\u00020\f2\u0006\u0010\u001c\u001a\u00020\bH\u0002J\b\u0010\u001d\u001a\u00020\fH\u0002J\b\u0010\u001e\u001a\u00020\fH\u0002J\b\u0010\u001f\u001a\u00020\bH\u0002J\u001a\u0010#\u001a\u00020\b2\u0006\u0010!\u001a\u00020 2\b\u0010\u0012\u001a\u0004\u0018\u00010\"H\u0016J\u0012\u0010&\u001a\u00020\f2\b\u0010%\u001a\u0004\u0018\u00010$H\u0014J\u0010\u0010\r\u001a\u00020\f2\u0006\u0010'\u001a\u00020\u0002H\u0014J$\u0010\r\u001a\u00020\f2\b\u0010\u000f\u001a\u0004\u0018\u00010\u000e2\u0006\u0010(\u001a\u00020\n2\b\u0010*\u001a\u0004\u0018\u00010)H\u0016J\b\u0010\r\u001a\u00020\fH\u0016J\b\u0010+\u001a\u00020 H\u0014J\u0010\u0010\r\u001a\u00020\f2\u0006\u0010\u0012\u001a\u00020,H\u0014J\u0010\u0010\r\u001a\u00020\f2\u0006\u0010.\u001a\u00020-H\u0016J\u0010\u0010\r\u001a\u00020\f2\u0006\u00100\u001a\u00020/H\u0016J\b\u00101\u001a\u00020\fH\u0014J\b\u00102\u001a\u00020\fH\u0014J\u0010\u0010\r\u001a\u00020\f2\u0006\u00104\u001a\u000203H\u0016J\u0010\u0010\r\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\u000eH\u0016J\u0010\u0010\u001a\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\u000eH\u0016J\u0010\u0010\r\u001a\u00020\f2\u0006\u00105\u001a\u00020\bH\u0016J\b\u00106\u001a\u00020\fH\u0014J!\u0010\r\u001a\u00020\f2\u0006\u00108\u001a\u0002072\b\u0010:\u001a\u0004\u0018\u000109H\u0016¢\u0006\u0004\b\r\u0010;J\b\u0010<\u001a\u00020\fH\u0016J\u0018\u0010\r\u001a\u00020\f2\u0006\u0010=\u001a\u00020\n2\u0006\u0010.\u001a\u00020\nH\u0016J\u0012\u0010@\u001a\u00020\f2\b\u0010?\u001a\u0004\u0018\u00010>H\u0014J\u001c\u0010\r\u001a\u00020\f2\u0012\u0010C\u001a\u000e\u0012\u0004\u0012\u00020B\u0012\u0004\u0012\u00020\f0AH\u0016J\b\u0010\u0010\u001a\u00020\fH\u0016J\u001a\u0010\r\u001a\u00020\f2\u0006\u0010\u0016\u001a\u00020\u00152\b\u0010\u0017\u001a\u0004\u0018\u00010\nH\u0016JJ\u0010\r\u001a\u00020\f2\u0006\u0010E\u001a\u00020D2\u0006\u0010F\u001a\u00020 2\u0006\u0010(\u001a\u00020\n2\b\u0010=\u001a\u0004\u0018\u00010\n2\b\u0010H\u001a\u0004\u0018\u00010G2\u0014\u0010K\u001a\u0010\u0012\u0004\u0012\u00020\n\u0012\u0004\u0012\u00020J\u0018\u00010IH\u0016J\u001a\u0010\r\u001a\u00020\f2\u0006\u0010M\u001a\u00020L2\b\u0010O\u001a\u0004\u0018\u00010NH\u0016J\u0010\u0010\r\u001a\u00020\f2\u0006\u0010P\u001a\u00020\nH\u0016J\b\u0010\u001a\u001a\u00020\fH\u0016R\u001b\u0010U\u001a\u00020\u00038TX\u0094\u0084\u0002¢\u0006\f\n\u0004\bQ\u0010R\u001a\u0004\bS\u0010TR\u0018\u0010Y\u001a\u0004\u0018\u00010V8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bW\u0010XR\u0014\u0010]\u001a\u00020Z8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b[\u0010\\R\u0014\u0010a\u001a\u00020^8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b_\u0010`R\u001e\u0010e\u001a\f\u0012\u0002\b\u0003\u0012\u0002\b\u0003\u0018\u00010b8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\bc\u0010dR\u0014\u0010i\u001a\u00020f8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\bg\u0010h¨\u0006l"}, d2 = {"Lcom/sumsub/sns/internal/features/presentation/main/SNSAppActivity;", "Lcom/sumsub/sns/core/presentation/base/a;", "Lcom/sumsub/sns/internal/features/presentation/main/c$d;", "Lcom/sumsub/sns/internal/features/presentation/main/c;", "Lcom/sumsub/sns/internal/core/common/n0;", "Lcom/sumsub/sns/internal/core/common/o0;", "Lcom/sumsub/sns/internal/core/presentation/intro/f;", "stepInfo", "", "cancelOnBackPressed", "", "countryCode", "", "a", "Lcom/sumsub/sns/internal/features/data/model/common/o;", com.sumsub.sns.internal.features.presentation.preview.photo.mrtd.c.v, "c", "Lcom/sumsub/sns/internal/features/presentation/main/a$d;", "event", "r", "s", "Landroidx/fragment/app/Fragment;", Request.JsonKeys.FRAGMENT, "tag", "allowStateLoss", "addToBackStack", "b", "q", "isCancelled", "k", "l", "p", "", "keyCode", "Landroid/view/KeyEvent;", "onKeyDown", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", SentryThread.JsonKeys.STATE, "idDocSetType", "", "buttonText", "d", "Lcom/sumsub/sns/core/presentation/base/c$i;", "Lcom/sumsub/sns/internal/features/data/model/common/DocumentType;", "documentType", "Lcom/sumsub/sns/internal/features/data/model/common/v;", "mrtd", "onResume", "onPause", "Lcom/sumsub/sns/internal/features/data/model/common/Document;", "document", "show", "j", "Lcom/sumsub/sns/internal/core/common/r;", DiscardedEvent.JsonKeys.REASON, "", "delay", "(Lcom/sumsub/sns/internal/core/common/r;Ljava/lang/Long;)V", "onBackPressed", "requestKey", "Landroid/content/Intent;", "intent", "onNewIntent", "Lkotlin/Function1;", "Landroid/nfc/tech/IsoDep;", "callback", "Ljava/io/File;", "file", "rotation", "Lcom/sumsub/sns/internal/core/analytics/Screen;", com.sumsub.sns.internal.features.presentation.imageviewer.a.n, "", "", com.sumsub.sns.internal.features.presentation.imageviewer.a.o, "Lcom/sumsub/sns/internal/features/data/model/common/r;", "introParams", "Landroid/os/Parcelable;", "payload", Request.JsonKeys.URL, "f", "Lkotlin/Lazy;", "o", "()Lcom/sumsub/sns/internal/features/presentation/main/c;", "viewModel", "Lcom/sumsub/sns/core/widget/SNSProgressView;", "g", "Lcom/sumsub/sns/core/widget/SNSProgressView;", "vgProgress", "Lcom/sumsub/sns/internal/nfc/d;", "h", "Lcom/sumsub/sns/internal/nfc/d;", "nfcManager", "Lcom/sumsub/sns/internal/core/common/NetworkManager;", "i", "Lcom/sumsub/sns/internal/core/common/NetworkManager;", "networkManager", "Lcom/sumsub/sns/core/presentation/base/b;", "m", "()Lcom/sumsub/sns/core/presentation/base/b;", "currentFragment", "Lcom/sumsub/sns/core/data/model/SNSCompletionResult;", "n", "()Lcom/sumsub/sns/core/data/model/SNSCompletionResult;", "currentFragmentCompletionResult", "<init>", "()V", "idensic-mobile-sdk-aar_release"}, k = 1, mv = {1, 7, 1})
public final class SNSAppActivity extends com.sumsub.sns.core.presentation.base.a<c.d, com.sumsub.sns.internal.features.presentation.main.c> implements n0, o0 {
public static final String k = "instructions_request_key_internal";
public SNSProgressView vgProgress;
public final Lazy viewModel = new ViewModelLazy(Reflection.getOrCreateKotlinClass(com.sumsub.sns.internal.features.presentation.main.c.class), new d(this), new g(), new e(null, this));
public final com.sumsub.sns.internal.nfc.d nfcManager = new com.sumsub.sns.internal.nfc.d();
public final NetworkManager networkManager = new NetworkManager();
@DebugMetadata(c = "com.sumsub.sns.internal.features.presentation.main.SNSAppActivity$showFragment$1", f = "SNSAppActivity.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
public static final class b extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public int a;
public final String c;
public final Fragment d;
public b(String str, Fragment fragment, Continuation<? super b> continuation) {
super(2, continuation);
this.c = str;
this.d = fragment;
}
@Override
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((b) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return SNSAppActivity.this.new b(this.c, this.d, continuation);
}
@Override
public final java.lang.Object invokeSuspend(java.lang.Object r10) {
throw new UnsupportedOperationException("Method not decompiled: com.sumsub.sns.internal.features.presentation.main.SNSAppActivity.b.invokeSuspend(java.lang.Object):java.lang.Object");
}
}
public static final class c extends Lambda implements Function0<ViewModelProvider.Factory> {
public final ComponentActivity a;
public c(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelProvider.Factory invoke() {
return this.a.getDefaultViewModelProviderFactory();
}
}
public static final class d extends Lambda implements Function0<ViewModelStore> {
public final ComponentActivity a;
public d(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelStore invoke() {
return this.a.getViewModelStore();
}
}
public static final class e extends Lambda implements Function0<CreationExtras> {
public final Function0 a;
public final ComponentActivity b;
public e(Function0 function0, ComponentActivity componentActivity) {
super(0);
this.a = function0;
this.b = componentActivity;
}
@Override
public final CreationExtras invoke() {
CreationExtras creationExtras;
Function0 function0 = this.a;
return (function0 == null || (creationExtras = (CreationExtras) function0.invoke()) == null) ? this.b.getDefaultViewModelCreationExtras() : creationExtras;
}
}
public static final class f extends Lambda implements Function1<NetworkManager.NetworkType, Unit> {
public f() {
super(1);
}
public final void a(NetworkManager.NetworkType networkType) {
SNSAppActivity.this.h().b(networkType.getType());
}
@Override
public Unit invoke(NetworkManager.NetworkType networkType) {
a(networkType);
return Unit.INSTANCE;
}
}
public static final class g extends Lambda implements Function0<ViewModelProvider.Factory> {
public g() {
super(0);
}
@Override
public final ViewModelProvider.Factory invoke() {
SNSAppActivity sNSAppActivity = SNSAppActivity.this;
return new com.sumsub.sns.internal.features.presentation.main.d(sNSAppActivity, sNSAppActivity.f(), null, 4, null);
}
}
public static final void b(SNSAppActivity sNSAppActivity, String str, Bundle bundle) {
if (!com.sumsub.sns.core.presentation.base.b.INSTANCE.b(bundle)) {
sNSAppActivity.h().a(false);
return;
}
if ((sNSAppActivity.m() instanceof com.sumsub.sns.internal.features.presentation.intro.a) && !sNSAppActivity.p()) {
sNSAppActivity.getSupportFragmentManager().popBackStack();
}
sNSAppActivity.h().a(true);
}
public final void c(o error) {
for (Fragment fragment : getSupportFragmentManager().getFragments()) {
com.sumsub.sns.core.presentation.base.b bVar = fragment instanceof com.sumsub.sns.core.presentation.base.b ? (com.sumsub.sns.core.presentation.base.b) fragment : null;
if (bVar != null) {
bVar.onHandleError(error);
}
}
}
@Override
public int d() {
return R.layout.sns_activity_app;
}
@Override
public void j() {
h().a(n(), true);
}
public final void k() {
if (getSupportFragmentManager().getBackStackEntryCount() == 1) {
h().a(true, false);
}
}
public final void l() {
if (p()) {
return;
}
getSupportFragmentManager().popBackStack((String) null, 1);
}
public final com.sumsub.sns.core.presentation.base.b<?, ?> m() {
Fragment findFragmentById = getSupportFragmentManager().findFragmentById(R.id.sns_container);
if (findFragmentById instanceof com.sumsub.sns.core.presentation.base.b) {
return (com.sumsub.sns.core.presentation.base.b) findFragmentById;
}
return null;
}
public final SNSCompletionResult n() {
SNSCompletionResult onCancelResult;
com.sumsub.sns.core.presentation.base.b<?, ?> m = m();
return (m == null || (onCancelResult = m.onCancelResult()) == null) ? new SNSCompletionResult.SuccessTermination(null, 1, null) : onCancelResult;
}
@Override
public com.sumsub.sns.internal.features.presentation.main.c h() {
return (com.sumsub.sns.internal.features.presentation.main.c) this.viewModel.getValue();
}
public void onBackPressed() {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.b.a, "onBackPressed()", null, 4, null);
com.sumsub.sns.core.presentation.base.b<?, ?> m = m();
if (m == null) {
h().a(n(), false);
} else if (m.onFinishCalled(r.c.b)) {
k();
a(false);
super.onBackPressed();
}
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, SNSMobileSDK.INSTANCE.toString(), null, 4, null);
this.vgProgress = (SNSProgressView) findViewById(R.id.sns_progress);
getSupportFragmentManager().setFragmentResultListener(com.sumsub.sns.internal.features.presentation.geo.b.s, this, new FragmentResultListener() {
public final void onFragmentResult(String str, Bundle bundle) {
SNSAppActivity.a(SNSAppActivity.this, str, bundle);
}
});
getSupportFragmentManager().setFragmentResultListener(k, this, new FragmentResultListener() {
public final void onFragmentResult(String str, Bundle bundle) {
SNSAppActivity.b(SNSAppActivity.this, str, bundle);
}
});
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
Boolean onKeyDown;
Fragment m = m();
w0 w0Var = m instanceof w0 ? (w0) m : null;
return (w0Var == null || (onKeyDown = w0Var.onKeyDown(keyCode, event)) == null) ? super.onKeyDown(keyCode, event) : onKeyDown.booleanValue();
}
public void onNewIntent(Intent intent) {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "onNewIntent = " + intent, null, 4, null);
super.onNewIntent(intent);
this.nfcManager.a(intent);
}
@Override
public void onPause() {
super.onPause();
s();
}
@Override
public void onResume() {
super.onResume();
r();
}
public final boolean p() {
return isFinishing() || isDestroyed() || getSupportFragmentManager().isStateSaved();
}
public final void q() {
l();
com.sumsub.sns.internal.features.presentation.main.c.a(h(), false, 1, (Object) null);
}
public final void r() {
this.networkManager.a(getApplicationContext(), new f());
}
public final void s() {
this.networkManager.c();
}
@Override
public void a(c.d state) {
SNSProgressView sNSProgressView;
if (state.j() && (sNSProgressView = this.vgProgress) != null) {
sNSProgressView.setText(state.h());
}
if (state.f()) {
SNSProgressView sNSProgressView2 = this.vgProgress;
if (sNSProgressView2 == null) {
return;
}
sNSProgressView2.setText(state.g());
return;
}
if (state.i() != null) {
if (state.i().booleanValue()) {
ConstraintLayout constraintLayout = this.vgProgress;
if (constraintLayout != null) {
i.e((View) constraintLayout);
return;
}
return;
}
SNSProgressView sNSProgressView3 = this.vgProgress;
if (sNSProgressView3 != null) {
sNSProgressView3.setText(state.h());
}
ConstraintLayout constraintLayout2 = this.vgProgress;
if (constraintLayout2 != null) {
i.c((View) constraintLayout2);
}
}
}
public final void b(Fragment fragment, String tag) {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "ShowFragment, tag = " + tag, null, 4, null);
a(false);
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(this), Dispatchers.getMain().getImmediate(), null, new b(tag, fragment, null), 2, null);
}
@Override
public void b(o error) {
getSupportFragmentManager().popBackStack();
for (Fragment fragment : getSupportFragmentManager().getFragments()) {
com.sumsub.sns.core.presentation.base.b bVar = fragment instanceof com.sumsub.sns.core.presentation.base.b ? (com.sumsub.sns.core.presentation.base.b) fragment : null;
if (bVar != null) {
bVar.onErrorCancelled(error);
}
}
}
public final void a(com.sumsub.sns.internal.core.presentation.intro.f stepInfo, boolean cancelOnBackPressed, String countryCode) {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "showInstructions: " + stepInfo, null, 4, null);
a(this, com.sumsub.sns.internal.features.presentation.intro.a.INSTANCE.a(stepInfo.c(), stepInfo.b(), stepInfo.a(), cancelOnBackPressed, countryCode).forResult(k), com.sumsub.sns.internal.features.presentation.intro.a.e, false, false, 12, null);
}
@Override
public void a(o error, String idDocSetType, CharSequence buttonText) {
c();
if (error != null) {
if (error instanceof o.f) {
com.sumsub.sns.internal.features.presentation.error.a.INSTANCE.a(((o.f) error).d(), buttonText).show(getSupportFragmentManager(), com.sumsub.sns.internal.features.presentation.error.a.b);
} else {
b(com.sumsub.sns.internal.features.presentation.error.b.INSTANCE.a(error, idDocSetType), com.sumsub.sns.internal.features.presentation.error.b.k);
}
}
}
public final void a(a.d event) {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "Navigate to: " + event, null, 4, null);
if (event instanceof a.d.q) {
a(this, SNSVideoIdentFragment.INSTANCE.create(((a.d.q) event).e()), SNSVideoIdentFragment.TAG, false, false, 12, null);
return;
}
if (event instanceof a.d.k) {
a(this, com.sumsub.sns.internal.features.presentation.preview.photo.identity.a.INSTANCE.a(((a.d.k) event).e()), com.sumsub.sns.internal.features.presentation.preview.photo.identity.a.D, false, false, 12, null);
return;
}
if (event instanceof a.d.n) {
a(this, com.sumsub.sns.internal.features.presentation.preview.selfie.a.INSTANCE.a(((a.d.n) event).e()), com.sumsub.sns.internal.features.presentation.preview.selfie.a.o, false, false, 12, null);
return;
}
if (event instanceof a.d.b) {
a(this, com.sumsub.sns.internal.features.presentation.preview.applicantdata.b.INSTANCE.a(((a.d.b) event).e()), com.sumsub.sns.internal.features.presentation.preview.applicantdata.b.j, false, false, 12, null);
return;
}
if (event instanceof a.d.m) {
a(this, com.sumsub.sns.internal.features.presentation.preview.photo.common.a.INSTANCE.a(((a.d.m) event).e()), com.sumsub.sns.internal.features.presentation.preview.photo.common.a.B, false, false, 12, null);
return;
}
if (event instanceof a.d.l) {
a(this, com.sumsub.sns.internal.features.presentation.preview.photo.common.a.INSTANCE.a(((a.d.l) event).e()), com.sumsub.sns.internal.features.presentation.preview.photo.common.a.B, false, false, 12, null);
return;
}
if (event instanceof a.d.o) {
a(this, com.sumsub.sns.internal.features.presentation.preview.photo.poa.b.INSTANCE.a(((a.d.o) event).e()), com.sumsub.sns.internal.features.presentation.preview.photo.poa.b.E, false, false, 12, null);
return;
}
if (event instanceof a.d.i) {
a(this, com.sumsub.sns.internal.features.presentation.geo.b.INSTANCE.a(((a.d.i) event).e()), com.sumsub.sns.internal.features.presentation.geo.b.r, false, false, 12, null);
return;
}
if (event instanceof a.d.e) {
a(this, com.sumsub.sns.internal.features.presentation.verification.e.INSTANCE.a(ValidationIdentifierType.EMAIL), com.sumsub.sns.internal.features.presentation.verification.e.r, true, false, 8, null);
return;
}
if (event instanceof a.d.f) {
a(this, com.sumsub.sns.internal.features.presentation.verification.e.INSTANCE.a(ValidationIdentifierType.PHONE), com.sumsub.sns.internal.features.presentation.verification.e.r, true, false, 8, null);
return;
}
if (event instanceof a.d.p) {
a(this, SNSQuestionnaireFragment.Companion.newInstance$default(SNSQuestionnaireFragment.INSTANCE, ((a.d.p) event).e().getType().c(), null, null, null, 14, null), SNSQuestionnaireFragment.h, true, false, 8, null);
return;
}
if (event instanceof a.d.c) {
if (getSupportFragmentManager().findFragmentByTag(com.sumsub.sns.internal.features.presentation.status.b.l) != null) {
l();
return;
} else {
a(this, com.sumsub.sns.internal.features.presentation.status.b.INSTANCE.a(), com.sumsub.sns.internal.features.presentation.status.b.l, false, false, 4, null);
return;
}
}
if (event instanceof a.d.j) {
a(this, SNSLiveness3dFaceFragment.INSTANCE.newInstance(((a.d.j) event).e().getType()), null, false, false, 14, null);
return;
}
if (event instanceof a.d.h) {
a(this, com.sumsub.sns.internal.features.presentation.preview.ekyc.b.INSTANCE.a(((a.d.h) event).e()), com.sumsub.sns.internal.features.presentation.preview.ekyc.b.y, false, false, 12, null);
return;
}
if (event instanceof a.d.g) {
a(this, com.sumsub.sns.internal.features.presentation.preview.esign.b.INSTANCE.a(((a.d.g) event).e()), "SNSESignFragment", false, false, 12, null);
} else if (event instanceof a.d.C0151a) {
a(this, com.sumsub.sns.internal.features.presentation.consent.a.INSTANCE.a(), com.sumsub.sns.internal.features.presentation.consent.a.l, false, false, 12, null);
} else if (Intrinsics.areEqual(event, a.d.C0155d.c)) {
l();
}
}
public static void a(SNSAppActivity sNSAppActivity, Fragment fragment, String str, boolean z, boolean z2, int i, Object obj) {
if ((i & 2) != 0) {
str = null;
}
if ((i & 4) != 0) {
z = false;
}
if ((i & 8) != 0) {
z2 = true;
}
sNSAppActivity.a(fragment, str, z, z2);
}
public final void a(Fragment fragment, String tag, boolean allowStateLoss, boolean addToBackStack) {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "ReplaceFragment, tag = " + tag, null, 4, null);
FragmentTransaction beginTransaction = getSupportFragmentManager().beginTransaction();
beginTransaction.replace(R.id.sns_container, fragment, tag);
if (addToBackStack) {
beginTransaction.addToBackStack(tag);
}
if (allowStateLoss) {
beginTransaction.commitAllowingStateLoss();
} else {
beginTransaction.commit();
}
}
@Override
public void b() {
h().a((SNSCompletionResult) new SNSCompletionResult.SuccessTermination(null, 1, null), false);
}
public final void c(boolean isCancelled) {
h().g();
l();
com.sumsub.sns.internal.features.presentation.main.c.a(h(), isCancelled, false, 2, (Object) null);
}
@Override
public void c() {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "Stop listening NFC", null, 4, null);
this.nfcManager.a();
}
@Override
public void a() {
h().c(true);
}
@Override
public void a(c.i event) {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "event: " + event, null, 4, null);
super.a(event);
if (event instanceof a.d) {
a((a.d) event);
return;
}
if (event instanceof a.c) {
c(((a.c) event).b());
return;
}
if (event instanceof a.b) {
f().b();
finish();
return;
}
if (event instanceof a.e) {
a.e eVar = (a.e) event;
a(eVar.f(), eVar.d(), eVar.e());
return;
}
if (event instanceof c.b) {
o0.a(this, ((c.b) event).f(), (Long) null, 2, (Object) null);
return;
}
if (event instanceof a.C0150a) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
Bundle bundle = new Bundle();
a.C0150a c0150a = (a.C0150a) event;
bundle.putInt(com.sumsub.sns.core.presentation.base.b.FRAGMENT_RESULT_KEY, c0150a.d() ? -1 : 0);
bundle.putParcelable("payload", c0150a.c());
Unit unit = Unit.INSTANCE;
supportFragmentManager.setFragmentResult(q0.d, bundle);
}
}
@Override
public void a(DocumentType documentType) {
h().a(documentType);
q();
}
@Override
public void a(v mrtd) {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "NFC is enabled. Show MRTD reading screen " + mrtd, null, 4, null);
String k2 = mrtd.k();
String i = mrtd.i();
String n = mrtd.n();
if (k2 == null || i == null || n == null) {
return;
}
a(this, com.sumsub.sns.internal.features.presentation.preview.photo.mrtd.b.INSTANCE.a(mrtd.h(), mrtd.j().getType().c(), k2, i, n, mrtd.m(), mrtd.l()), com.sumsub.sns.internal.features.presentation.preview.photo.mrtd.b.s, false, false, 12, null);
}
@Override
public void a(Document document) {
h().b(document);
}
@Override
public void a(o error) {
getSupportFragmentManager().popBackStack();
h().onHandleError(error);
}
@Override
public void a(boolean show) {
h().e(show);
}
@Override
public void a(r reason, Long delay) {
if (delay != null) {
h().a(reason, delay.longValue());
return;
}
if (reason instanceof r.c) {
if (getSupportFragmentManager().getBackStackEntryCount() > 0 && !p()) {
k();
a(false);
getSupportFragmentManager().popBackStack();
return;
}
h().a(n(), false);
return;
}
if (reason instanceof r.a) {
c(true);
return;
}
if (reason instanceof r.b) {
if (((r.b) reason).b()) {
q();
return;
} else {
c(false);
return;
}
}
if (reason instanceof r.d) {
com.sumsub.sns.internal.features.presentation.main.c h = h();
SNSCompletionResult b2 = ((r.d) reason).b();
if (b2 == null) {
b2 = n();
}
h.a(b2, false);
}
}
@Override
public void a(String requestKey, String documentType) {
a(this, com.sumsub.sns.internal.features.presentation.camera.photo.a.INSTANCE.a(documentType).forResult(requestKey), com.sumsub.sns.internal.features.presentation.camera.photo.a.m, false, false, 12, null);
}
@Override
public void a(Function1<? super IsoDep, Unit> callback) {
com.sumsub.sns.core.c.b(com.sumsub.sns.core.c.a, com.sumsub.sns.internal.features.presentation.main.c.y, "Start listening NFC", null, 4, null);
this.nfcManager.a(this, callback);
}
@Override
public void a(Fragment fragment, String tag) {
a(this, fragment, tag, false, false, 12, null);
}
@Override
public void a(File file, int rotation, String idDocSetType, String requestKey, Screen analyticsScreen, Map<String, ? extends Object> analyticsPayload) {
Fragment forResult = com.sumsub.sns.internal.features.presentation.imageviewer.a.INSTANCE.a(file, rotation, idDocSetType, analyticsScreen, analyticsPayload).forResult(requestKey);
FragmentTransaction beginTransaction = getSupportFragmentManager().beginTransaction();
beginTransaction.replace(R.id.sns_container, forResult, com.sumsub.sns.internal.features.presentation.imageviewer.a.i);
beginTransaction.addToBackStack(com.sumsub.sns.internal.features.presentation.imageviewer.a.i);
beginTransaction.commit();
}
@Override
public void a(com.sumsub.sns.internal.features.data.model.common.r introParams, Parcelable payload) {
getSupportFragmentManager().clearFragmentResult(q0.d);
h().a(introParams, payload);
}
@Override
public void a(java.lang.String r9) {
throw new UnsupportedOperationException("Method not decompiled: com.sumsub.sns.internal.features.presentation.main.SNSAppActivity.a(java.lang.String):void");
}
public static final void a(SNSAppActivity sNSAppActivity, String str, Bundle bundle) {
Unit unit;
Document document = (Document) BundleCompat.getParcelable(bundle, com.sumsub.sns.internal.features.presentation.geo.b.t, Document.class);
if (document != null) {
a(sNSAppActivity, com.sumsub.sns.internal.features.presentation.preview.photo.poa.b.INSTANCE.a(document), com.sumsub.sns.internal.features.presentation.preview.photo.poa.b.E, false, false, 12, null);
unit = Unit.INSTANCE;
} else {
unit = null;
}
if (unit == null) {
sNSAppActivity.c(true);
}
}
}