导航菜单

页面标题

页面副标题

Oolka v2.4.42 - WorkflowLoadingActivity.java 源代码

正在查看: Oolka v2.4.42 应用的 WorkflowLoadingActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package co.hyperverge.hyperkyc.ui;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import co.hyperverge.hyperkyc.data.models.HyperKycConfig;
import co.hyperverge.hyperkyc.data.models.Properties;
import co.hyperverge.hyperkyc.data.models.result.HyperKycError;
import co.hyperverge.hyperkyc.data.models.result.HyperKycStatus;
import co.hyperverge.hyperkyc.databinding.HkActivityWorkflowLoadingBinding;
import co.hyperverge.hyperkyc.utils.extensions.ActivityExtsKt;
import co.hyperverge.hyperkyc.utils.extensions.CoreExtsKt;
import co.hyperverge.hyperkyc.utils.extensions.LogExtsKt;
import co.hyperverge.hyperlogger.HyperLogger;
import co.hyperverge.hyperlogger.data.models.HyperLoggerConfig;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.textview.MaterialTextView;
import java.util.regex.Matcher;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.ArraysKt;
import kotlin.coroutines.CoroutineContext;
import kotlin.g;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.text.StringsKt;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.j0;
import org.jetbrains.annotations.NotNull;

@Metadata
@SourceDebugExtension({"SMAP\nWorkflowLoadingActivity.kt\nKotlin\n*S Kotlin\n*F\n+ 1 WorkflowLoadingActivity.kt\nco/hyperverge/hyperkyc/ui/WorkflowLoadingActivity\n+ 2 LogExts.kt\nco/hyperverge/hyperkyc/utils/extensions/LogExtsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,195:1\n14#2:196\n28#2,10:197\n62#2,12:207\n40#2,12:220\n62#2,12:232\n52#2:244\n50#2,6:245\n14#2:251\n28#2,10:252\n62#2,12:262\n40#2,12:275\n62#2,12:287\n52#2:299\n50#2,6:300\n14#2:306\n28#2,10:307\n62#2,12:317\n40#2,12:330\n62#2,12:342\n52#2:354\n50#2,6:355\n14#2:361\n28#2,10:362\n62#2,12:372\n40#2,12:385\n62#2,12:397\n52#2:409\n50#2,6:410\n14#2:416\n28#2,10:417\n62#2,12:427\n40#2,12:440\n62#2,12:452\n52#2:464\n50#2,6:465\n14#2:471\n28#2,10:472\n62#2,12:482\n40#2,12:495\n62#2,12:507\n52#2:519\n50#2,6:520\n14#2:527\n28#2,10:528\n62#2,12:538\n40#2,12:551\n62#2,12:563\n52#2:575\n50#2,6:576\n14#2:582\n28#2,10:583\n62#2,12:593\n40#2,12:606\n62#2,12:618\n52#2:630\n50#2,6:631\n14#2:638\n28#2,10:639\n62#2,12:649\n40#2,12:662\n62#2,12:674\n52#2:686\n50#2,6:687\n14#2:693\n28#2,10:694\n62#2,12:704\n40#2,12:717\n62#2,12:729\n52#2:741\n50#2,6:742\n1#3:219\n1#3:274\n1#3:329\n1#3:384\n1#3:439\n1#3:494\n1#3:526\n1#3:550\n1#3:605\n1#3:637\n1#3:661\n1#3:716\n*S KotlinDebug\n*F\n+ 1 WorkflowLoadingActivity.kt\nco/hyperverge/hyperkyc/ui/WorkflowLoadingActivity\n*L\n42#1:196\n42#1:197,10\n42#1:207,12\n42#1:220,12\n42#1:232,12\n42#1:244\n42#1:245,6\n53#1:251\n53#1:252,10\n53#1:262,12\n53#1:275,12\n53#1:287,12\n53#1:299\n53#1:300,6\n60#1:306\n60#1:307,10\n60#1:317,12\n60#1:330,12\n60#1:342,12\n60#1:354\n60#1:355,6\n104#1:361\n104#1:362,10\n104#1:372,12\n104#1:385,12\n104#1:397,12\n104#1:409\n104#1:410,6\n115#1:416\n115#1:417,10\n115#1:427,12\n115#1:440,12\n115#1:452,12\n115#1:464\n115#1:465,6\n129#1:471\n129#1:472,10\n129#1:482,12\n129#1:495,12\n129#1:507,12\n129#1:519\n129#1:520,6\n157#1:527\n157#1:528,10\n157#1:538,12\n157#1:551,12\n157#1:563,12\n157#1:575\n157#1:576,6\n174#1:582\n174#1:583,10\n174#1:593,12\n174#1:606,12\n174#1:618,12\n174#1:630\n174#1:631,6\n187#1:638\n187#1:639,10\n187#1:649,12\n187#1:662,12\n187#1:674,12\n187#1:686\n187#1:687,6\n117#1:693\n117#1:694,10\n117#1:704,12\n117#1:717,12\n117#1:729,12\n117#1:741\n117#1:742,6\n42#1:219\n53#1:274\n60#1:329\n104#1:384\n115#1:439\n129#1:494\n157#1:550\n174#1:605\n187#1:661\n117#1:716\n*E\n"})
public final class WorkflowLoadingActivity extends BaseActivity {

    @NotNull
    private final kotlin.e binding$delegate = LazyKt.lazy(new Function0<HkActivityWorkflowLoadingBinding>() {
        {
            super(0);
        }

        @NotNull
        public final HkActivityWorkflowLoadingBinding m110invoke() {
            return HkActivityWorkflowLoadingBinding.inflate(WorkflowLoadingActivity.this.getLayoutInflater());
        }
    });

    @NotNull
    private final ActivityResultLauncher<Intent> mainActivityLauncher;

    public WorkflowLoadingActivity() {
        ActivityResultLauncher<Intent> registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new androidx.activity.result.a() {
            public final void a(Object obj) {
                WorkflowLoadingActivity.mainActivityLauncher$lambda$0(WorkflowLoadingActivity.this, (ActivityResult) obj);
            }
        });
        Intrinsics.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul…       finish()\n        }");
        this.mainActivityLauncher = registerForActivityResult;
    }

    private final HkActivityWorkflowLoadingBinding getBinding() {
        return (HkActivityWorkflowLoadingBinding) this.binding$delegate.getValue();
    }

    private final void initViews() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = WorkflowLoadingActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("initViews() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = WorkflowLoadingActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "initViews() called ");
                }
            }
        }
        getBinding().btnRetry.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WorkflowLoadingActivity.initViews$lambda$4$lambda$3(WorkflowLoadingActivity.this, view);
            }
        });
    }

    public static final void initViews$lambda$4$lambda$3(WorkflowLoadingActivity workflowLoadingActivity, View view) {
        Intrinsics.checkNotNullParameter(workflowLoadingActivity, "this$0");
        BuildersKt.launch$default(androidx.lifecycle.o.a(workflowLoadingActivity), (CoroutineContext) null, (j0) null, new WorkflowLoadingActivity$initViews$2$1$1(workflowLoadingActivity, null), 3, (Object) null);
    }

    public final void loadWorkflowConfig() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = WorkflowLoadingActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("loadWorkflowConfig() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = WorkflowLoadingActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "loadWorkflowConfig() called ");
                }
            }
        }
        BuildersKt.launch$default(androidx.lifecycle.o.a(this), (CoroutineContext) null, (j0) null, new WorkflowLoadingActivity$loadWorkflowConfig$2$1(this, getBinding(), null), 3, (Object) null);
    }

    public static final void mainActivityLauncher$lambda$0(WorkflowLoadingActivity workflowLoadingActivity, ActivityResult activityResult) {
        Intrinsics.checkNotNullParameter(workflowLoadingActivity, "this$0");
        workflowLoadingActivity.setResult(activityResult.b(), activityResult.a());
        workflowLoadingActivity.finish();
    }

    public final void proceedToMainActivity() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = WorkflowLoadingActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("proceedToMainActivity() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = WorkflowLoadingActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "proceedToMainActivity() called ");
                }
            }
        }
        Intent intent = new Intent((Context) this, (Class<?>) MainActivity.class);
        intent.putExtra(HyperKycConfig.ARG_KEY, getHyperKycConfig());
        this.mainActivityLauncher.b(intent);
        overridePendingTransition(0, 0);
    }

    public final void setupSecureCheck() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = WorkflowLoadingActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        boolean z = false;
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("setupSecureCheck() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = WorkflowLoadingActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "setupSecureCheck() called ");
                }
            }
        }
        Properties properties = getHyperKycConfig().getWorkflowConfig$hyperkyc_release().getProperties();
        if (properties != null && properties.getSecure()) {
            z = true;
        }
        if (z) {
            ActivityExtsKt.registerActivityCreatedCallback(this, new Function1<Activity, Unit>() {
                {
                    super(1);
                }

                public Object invoke(Object obj) {
                    invoke((Activity) obj);
                    return Unit.a;
                }

                public final void invoke(@NotNull Activity activity) {
                    String canonicalName3;
                    Object b2;
                    String className3;
                    String substringAfterLast$default;
                    String className4;
                    Intrinsics.checkNotNullParameter(activity, "it");
                    WorkflowLoadingActivity workflowLoadingActivity = WorkflowLoadingActivity.this;
                    HyperLogger.Level level2 = HyperLogger.Level.DEBUG;
                    HyperLogger companion2 = HyperLogger.Companion.getInstance();
                    StringBuilder sb2 = new StringBuilder();
                    StackTraceElement[] stackTrace3 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace3, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement3 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace3);
                    String str3 = "N/A";
                    if (stackTraceElement3 == null || (className4 = stackTraceElement3.getClassName()) == null || (canonicalName3 = StringsKt.substringAfterLast$default(className4, '.', (String) null, 2, (Object) null)) == null) {
                        canonicalName3 = workflowLoadingActivity != null ? WorkflowLoadingActivity.class.getCanonicalName() : null;
                        if (canonicalName3 == null) {
                            canonicalName3 = "N/A";
                        }
                    }
                    Matcher matcher3 = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName3);
                    if (matcher3.find()) {
                        canonicalName3 = matcher3.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(canonicalName3, "replaceAll(\"\")");
                    }
                    if (canonicalName3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        canonicalName3 = canonicalName3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(canonicalName3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    sb2.append(canonicalName3);
                    sb2.append(" - ");
                    String str4 = "setupSecureCheck() setting secure flag for " + activity.getLocalClassName();
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    companion2.log(level2, sb2.toString());
                    if (!CoreExtsKt.isRelease()) {
                        try {
                            g.a aVar3 = kotlin.g.b;
                            Object invoke2 = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                            Intrinsics.checkNotNull(invoke2, "null cannot be cast to non-null type android.app.Application");
                            b2 = kotlin.g.b(((Application) invoke2).getPackageName());
                        } catch (Throwable th2) {
                            g.a aVar4 = kotlin.g.b;
                            b2 = kotlin.g.b(kotlin.h.a(th2));
                        }
                        if (kotlin.g.f(b2)) {
                            b2 = "";
                        }
                        String str5 = (String) b2;
                        if (CoreExtsKt.isDebug()) {
                            Intrinsics.checkNotNullExpressionValue(str5, "packageName");
                            if (StringsKt.contains$default(str5, "co.hyperverge", false, 2, (Object) null)) {
                                StackTraceElement[] stackTrace4 = new Throwable().getStackTrace();
                                Intrinsics.checkNotNullExpressionValue(stackTrace4, "Throwable().stackTrace");
                                StackTraceElement stackTraceElement4 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace4);
                                if (stackTraceElement4 == null || (className3 = stackTraceElement4.getClassName()) == null || (substringAfterLast$default = StringsKt.substringAfterLast$default(className3, '.', (String) null, 2, (Object) null)) == null) {
                                    String canonicalName4 = workflowLoadingActivity != null ? WorkflowLoadingActivity.class.getCanonicalName() : null;
                                    if (canonicalName4 != null) {
                                        str3 = canonicalName4;
                                    }
                                } else {
                                    str3 = substringAfterLast$default;
                                }
                                Matcher matcher4 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                                if (matcher4.find()) {
                                    str3 = matcher4.replaceAll("");
                                    Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                                }
                                if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                                    str3 = str3.substring(0, 23);
                                    Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                                }
                                StringBuilder sb3 = new StringBuilder();
                                String str6 = "setupSecureCheck() setting secure flag for " + activity.getLocalClassName();
                                sb3.append(str6 != null ? str6 : "null ");
                                sb3.append(' ');
                                sb3.append("");
                                Log.println(3, str3, sb3.toString());
                            }
                        }
                    }
                    ActivityExtsKt.makeSecure$default(activity, false, 1, null);
                }
            });
        }
    }

    private final void showRetry(final boolean z, Integer num, String str) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = WorkflowLoadingActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str2 = "showRetry() called with: show = " + z + ", retryTitleRes = " + num + ", retryError = " + str;
        if (str2 == null) {
            str2 = "null ";
        }
        sb.append(str2);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str3 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str3, "packageName");
                if (StringsKt.contains$default(str3, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str4 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = WorkflowLoadingActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str4);
                    if (matcher2.find()) {
                        str4 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str4, "replaceAll(\"\")");
                    }
                    if (str4.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str4 = str4.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str4, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str5 = "showRetry() called with: show = " + z + ", retryTitleRes = " + num + ", retryError = " + str;
                    if (str5 == null) {
                        str5 = "null ";
                    }
                    sb2.append(str5);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str4, sb2.toString());
                }
            }
        }
        HkActivityWorkflowLoadingBinding binding = getBinding();
        if (num != null) {
            binding.tvRetryTitle.setText(num.intValue());
        }
        if (str != null) {
            binding.tvRetryTitle.append('\n' + str);
        }
        MaterialTextView materialTextView = binding.tvRetryTitle;
        Intrinsics.checkNotNullExpressionValue(materialTextView, "tvRetryTitle");
        MaterialButton materialButton = binding.btnRetry;
        Intrinsics.checkNotNullExpressionValue(materialButton, "btnRetry");
        CoreExtsKt.withViews(new View[]{materialTextView, materialButton}, new Function1<View, Unit>() {
            {
                super(1);
            }

            public Object invoke(Object obj) {
                invoke((View) obj);
                return Unit.a;
            }

            public final void invoke(@NotNull View view) {
                Intrinsics.checkNotNullParameter(view, "$this$withViews");
                view.setVisibility(z ? 0 : 8);
            }
        });
    }

    public static void showRetry$default(WorkflowLoadingActivity workflowLoadingActivity, boolean z, Integer num, String str, int i, Object obj) {
        if ((i & 2) != 0) {
            num = null;
        }
        if ((i & 4) != 0) {
            str = null;
        }
        workflowLoadingActivity.showRetry(z, num, str);
    }

    private final boolean validateSdkConfig() {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.WorkflowLoadingActivity.validateSdkConfig():boolean");
    }

    private static final boolean validateSdkConfig$finishWithError(WorkflowLoadingActivity workflowLoadingActivity, String str) {
        String canonicalName;
        Object b;
        String str2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if (stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) {
            canonicalName = workflowLoadingActivity != null ? WorkflowLoadingActivity.class.getCanonicalName() : null;
            if (canonicalName == null) {
                canonicalName = "N/A";
            }
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str3 = "finishWithError() called with: errorMsg = " + str;
        if (str3 == null) {
            str3 = "null ";
        }
        sb.append(str3);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str4 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str4, "packageName");
                if (StringsKt.contains$default(str4, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    if (stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (str2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) {
                        String canonicalName2 = workflowLoadingActivity != null ? WorkflowLoadingActivity.class.getCanonicalName() : null;
                        str2 = canonicalName2 == null ? "N/A" : canonicalName2;
                    }
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str5 = "finishWithError() called with: errorMsg = " + str;
                    if (str5 == null) {
                        str5 = "null ";
                    }
                    sb2.append(str5);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str2, sb2.toString());
                }
            }
        }
        BaseActivity.finishWithResult$default(workflowLoadingActivity, HyperKycStatus.ERROR, null, Integer.valueOf(HyperKycError.SDK_CONFIG_ERROR), str, false, false, 32, null);
        return false;
    }

    public void onBackPressed() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = WorkflowLoadingActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("onBackPressed() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = WorkflowLoadingActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "onBackPressed() called ");
                }
            }
        }
        BaseActivity.finishWithResult$default(this, HyperKycStatus.USER_CANCELLED, null, Integer.valueOf(HyperKycError.USER_CANCELLED_ERROR), null, false, false, 42, null);
    }

    public void onCreate(Bundle bundle) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
        setContentView(getBinding().getRoot());
        HyperLogger.Companion companion = HyperLogger.Companion;
        companion.getInstance().setup(new HyperLoggerConfig(getHyperKycConfig().getAppId$hyperkyc_release() + '_' + getHyperKycConfig().getTransactionId$hyperkyc_release(), null, 2, null));
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion2 = companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = WorkflowLoadingActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "onCreate() called with: savedInstanceState = " + bundle;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion2.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = WorkflowLoadingActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "onCreate() called with: savedInstanceState = " + bundle;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        initViews();
        if (validateSdkConfig() && bundle == null) {
            loadWorkflowConfig();
        }
    }
}