package com.example.mobile02;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.example.mobile02.databinding.ActivityMainBinding;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: MainActivity.kt */
@Metadata(d1 = {"\u0000F\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\u0018\u0000 &2\u00020\u0001:\u0002%&B\u0005¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u001aH\u0002J\u0010\u0010\u001b\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u001aH\u0002J\u0012\u0010\u001c\u001a\u00020\u001d2\b\u0010\u001e\u001a\u0004\u0018\u00010\u001fH\u0014J\t\u0010 \u001a\u00020\u001aH\u0086 J\u0011\u0010!\u001a\u00020\u001a2\u0006\u0010\u0019\u001a\u00020\u001aH\u0086 J\u0019\u0010\"\u001a\u00020\u001a2\u0006\u0010#\u001a\u00020\u001a2\u0006\u0010$\u001a\u00020\u001aH\u0086 R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082.¢\u0006\u0002\n\u0000R\u001c\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR\u001c\u0010\u000b\u001a\u0004\u0018\u00010\fX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\r\u0010\u000e\"\u0004\b\u000f\u0010\u0010R\u001c\u0010\u0011\u001a\u0004\u0018\u00010\u0012X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0013\u0010\u0014\"\u0004\b\u0015\u0010\u0016¨\u0006'"}, d2 = {"Lcom/example/mobile02/MainActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "()V", "binding", "Lcom/example/mobile02/databinding/ActivityMainBinding;", "button1", "Landroid/widget/Button;", "getButton1", "()Landroid/widget/Button;", "setButton1", "(Landroid/widget/Button;)V", "edit1", "Landroid/widget/EditText;", "getEdit1", "()Landroid/widget/EditText;", "setEdit1", "(Landroid/widget/EditText;)V", "tv1", "Landroid/widget/TextView;", "getTv1", "()Landroid/widget/TextView;", "setTv1", "(Landroid/widget/TextView;)V", "CHECK1", "", "str1", "", "CHECK2", "onCreate", "", "savedInstanceState", "Landroid/os/Bundle;", "stringFromJN1", "stringFromJNI", "stringFromJNl", "key", "input", "CHECK0", "Companion", "app_release"}, k = 1, mv = {1, 9, 0}, xi = ConstraintLayout.LayoutParams.Table.LAYOUT_CONSTRAINT_VERTICAL_CHAINSTYLE)
/* loaded from: classes.dex */
public final class MainActivity extends AppCompatActivity {
    public static final Companion Companion = new Companion(null);
    private ActivityMainBinding binding;
    private Button button1;
    private EditText edit1;
    private TextView tv1;

    public final native String stringFromJN1();

    public final native String stringFromJNI(String str);

    public final native String stringFromJNl(String str, String str2);

    public final Button getButton1() {
        return this.button1;
    }

    public final void setButton1(Button button) {
        this.button1 = button;
    }

    public final EditText getEdit1() {
        return this.edit1;
    }

    public final void setEdit1(EditText editText) {
        this.edit1 = editText;
    }

    public final TextView getTv1() {
        return this.tv1;
    }

    public final void setTv1(TextView textView) {
        this.tv1 = textView;
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        ActivityMainBinding inflate = ActivityMainBinding.inflate(getLayoutInflater());
        Intrinsics.checkNotNullExpressionValue(inflate, "inflate(...)");
        this.binding = inflate;
        if (inflate == null) {
            Intrinsics.throwUninitializedPropertyAccessException("binding");
            inflate = null;
        }
        setContentView(inflate.getRoot());
        setContentView(R.layout.activity_main);
        View findViewById = findViewById(R.id.submit);
        Intrinsics.checkNotNull(findViewById, "null cannot be cast to non-null type android.widget.Button");
        this.button1 = (Button) findViewById;
        View findViewById2 = findViewById(R.id.input);
        Intrinsics.checkNotNull(findViewById2, "null cannot be cast to non-null type android.widget.EditText");
        this.edit1 = (EditText) findViewById2;
        View findViewById3 = findViewById(R.id.out);
        Intrinsics.checkNotNull(findViewById3, "null cannot be cast to non-null type android.widget.TextView");
        this.tv1 = (TextView) findViewById3;
        Button button = this.button1;
        Intrinsics.checkNotNull(button);
        button.setOnClickListener(new CHECK0());
    }

    /* compiled from: MainActivity.kt */
    @Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0080\u0004\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0016¨\u0006\u0007"}, d2 = {"Lcom/example/mobile02/MainActivity$CHECK0;", "Landroid/view/View$OnClickListener;", "(Lcom/example/mobile02/MainActivity;)V", "onClick", "", "view", "Landroid/view/View;", "app_release"}, k = 1, mv = {1, 9, 0}, xi = ConstraintLayout.LayoutParams.Table.LAYOUT_CONSTRAINT_VERTICAL_CHAINSTYLE)
    /* loaded from: classes.dex */
    public final class CHECK0 implements View.OnClickListener {
        public CHECK0() {
        }

        @Override // android.view.View.OnClickListener
        public void onClick(View view) {
            Intrinsics.checkNotNullParameter(view, "view");
            EditText edit1 = MainActivity.this.getEdit1();
            Intrinsics.checkNotNull(edit1);
            if (MainActivity.this.CHECK1(edit1.getText().toString())) {
                TextView tv1 = MainActivity.this.getTv1();
                Intrinsics.checkNotNull(tv1);
                tv1.setText("Right");
                return;
            }
            TextView tv12 = MainActivity.this.getTv1();
            Intrinsics.checkNotNull(tv12);
            tv12.setText("Wrong");
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final boolean CHECK1(String str) {
        if (str.length() <= 13) {
            return false;
        }
        String substring = str.substring(0, 5);
        Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
        if (Intrinsics.areEqual(substring, "ISCC{") && str.charAt(str.length() - 1) == '}') {
            String stringFromJN1 = stringFromJN1();
            String substring2 = str.substring(11, str.length() - 1);
            Intrinsics.checkNotNullExpressionValue(substring2, "substring(...)");
            String stringFromJNl = stringFromJNl(stringFromJN1, substring2);
            String substring3 = str.substring(5, 11);
            Intrinsics.checkNotNullExpressionValue(substring3, "substring(...)");
            if (Intrinsics.areEqual(substring3, stringFromJNI("0uV250")) && CHECK2(stringFromJNl)) {
                return true;
            }
        }
        return false;
    }

    private final boolean CHECK2(String str) {
        return Intrinsics.areEqual(str, "001002011002020212011011012110002002");
    }

    /* compiled from: MainActivity.kt */
    @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lcom/example/mobile02/MainActivity$Companion;", "", "()V", "app_release"}, k = 1, mv = {1, 9, 0}, xi = ConstraintLayout.LayoutParams.Table.LAYOUT_CONSTRAINT_VERTICAL_CHAINSTYLE)
    /* loaded from: classes.dex */
    public static final class Companion {
        public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private Companion() {
        }
    }

    static {
        System.loadLibrary("mobile02");
    }
}
