CrackMe.apk

Download file
    package expo.modules.kotlin.views;

import android.content.Context;
import android.view.View;
import expo.modules.kotlin.AppContext;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.Reflection;
import kotlin.reflect.KClass;
import kotlin.reflect.KFunction;
import kotlin.reflect.KParameter;
import kotlin.reflect.full.KClasses;

@Metadata(d1 = {"\u0000\u0018\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u0002H\u0001\"\b\b\u0000\u0010\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\n¢\u0006\u0004\b\u0007\u0010\b"}, d2 = {"<anonymous>", "T", "Landroid/view/View;", "context", "Landroid/content/Context;", "appContext", "Lexpo/modules/kotlin/AppContext;", "invoke", "(Landroid/content/Context;Lexpo/modules/kotlin/AppContext;)Landroid/view/View;"}, k = 3, mv = {1, 6, 0}, xi = 48)
/* compiled from: ViewDefinitionBuilder.kt */
final class ViewDefinitionBuilder$createViewFactory$1 extends Lambda implements Function2<Context, AppContext, T> {
    final /* synthetic */ ViewDefinitionBuilder<T> this$0;

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    ViewDefinitionBuilder$createViewFactory$1(ViewDefinitionBuilder<T> viewDefinitionBuilder) {
        super(2);
        this.this$0 = viewDefinitionBuilder;
    }

    public final T invoke(Context context, AppContext appContext) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(appContext, "appContext");
        KFunction primaryConstructor = KClasses.getPrimaryConstructor(this.this$0.viewType);
        ViewDefinitionBuilder<T> viewDefinitionBuilder = this.this$0;
        if (primaryConstructor != null) {
            List<KParameter> parameters = primaryConstructor.getParameters();
            if (!parameters.isEmpty()) {
                if (!Intrinsics.areEqual((Object) Reflection.getOrCreateKotlinClass(Context.class), (Object) ((KParameter) CollectionsKt.first(parameters)).getType().getClassifier())) {
                    throw new IllegalStateException("The type of the first constructor argument has to be `android.content.Context`.");
                } else if (parameters.size() == 1) {
                    return (View) primaryConstructor.call(context);
                } else {
                    if (!Intrinsics.areEqual((Object) Reflection.getOrCreateKotlinClass(AppContext.class), (Object) parameters.get(1).getType().getClassifier())) {
                        throw new IllegalStateException("The type of the second constructor argument has to be `expo.modules.kotlin.AppContext`.");
                    } else if (parameters.size() == 2) {
                        return (View) primaryConstructor.call(context, appContext);
                    } else {
                        throw new IllegalStateException("Android view has more constructor arguments than expected.");
                    }
                }
            } else {
                throw new IllegalStateException("Android view has to have a constructor with at least one argument.");
            }
        } else {
            KClass access$getViewType$p = viewDefinitionBuilder.viewType;
            throw new IllegalArgumentException((access$getViewType$p + " doesn't have a primary constructor").toString());
        }
    }
}
    
Download file