Luсky+Рatcher v11.3.3版本的 MD5 值为:fcc08dfa98a57a21951c5463e292fdaf

以下内容为反编译后的 C3549.java 源代码,内容仅作参考


package p086;

import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.ClipboardManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.Signature;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Environment;
import android.text.Editable;
import android.text.InputFilter;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.util.Linkify;
import android.util.Base64;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.Filter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.android.apksig.ApkVerifier;
import com.android.apksig.apk.ApkFormatException;
import com.ui.EditTextFix;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.security.MessageDigest;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.zip.CRC32;
import javaroot.utils.C1563;
import javaroot.utils.C1600;
import javaroot.utils.C1623;
import javaroot.utils.C1635;
import javaroot.utils.C1644;
import javaroot.utils.C1658;
import net.lingala.zip4j.util.InternalZipConstants;
import org.jf.dexlib2.dexbacked.raw.ItemType;
import org.json.JSONException;
import p037.C2500;
import p038.C2597;
import p040.C2607;
import p040.C2608;
import p040.C2624;
import p040.C2628;
import p040.C2635;
import p041.C2637;
import p041.C2640;
import p085.C2913;
import p085.C2931;
import p085.C2939;
import p085.C2942;
import p085.C2943;
import p085.C2975;
import p085.C3477;
import p085.C3478;
import ru.aaaaabbt.installer.R;
import ru.sxbuIDfx.pFSOyagrF.MainActivity;

public class C3549 {

    public static boolean f10205 = false;

    public static String f10206;

    public static TextView f10207;

    public static ListView f10208;

    public static String f10209;

    public class C3550 implements InputFilter {
        C3550() {
        }

        @Override
        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
            while (i < i2) {
                if (!Character.isDigit(charSequence.charAt(i))) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
                try {
                    Integer.valueOf(spanned.toString() + charSequence.toString());
                    i++;
                } catch (Throwable unused) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
            }
            return null;
        }
    }

    public class C3551 implements CompoundButton.OnCheckedChangeListener {

        final C2913 f10210;

        final boolean[] f10211;

        final boolean[] f10212;

        C3551(C2913 c2913, boolean[] zArr, boolean[] zArr2) {
            this.f10210 = c2913;
            this.f10211 = zArr;
            this.f10212 = zArr2;
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                this.f10210.m7855().setChecked(false);
                this.f10211[0] = false;
                this.f10212[0] = true;
                return;
            }
            this.f10212[0] = false;
        }
    }

    public class RunnableC3552 implements Runnable {
        RunnableC3552() {
        }

        @Override
        public void run() {
            if (C3549.f10208 != null) {
                if (C2975.f9365 == 0) {
                    ((ArrayAdapter) C3549.f10208.getAdapter()).sort(new C2975.C3366());
                }
                if (C2975.f9365 == 1) {
                    ((ArrayAdapter) C3549.f10208.getAdapter()).sort(new C2975.C3371());
                }
                ((ArrayAdapter) C3549.f10208.getAdapter()).notifyDataSetChanged();
                ((ArrayAdapter) C3549.f10208.getAdapter()).setNotifyOnChange(true);
            }
        }
    }

    public class ViewOnClickListenerC3553 implements View.OnClickListener {

        class C3554 implements CompoundButton.OnCheckedChangeListener {
            C3554() {
            }

            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                C2975.m7928().edit().putBoolean("file_browser_only_used_files", z).commit();
                C2975.f9364 = z;
                C3549.m8188();
            }
        }

        class C3555 implements CompoundButton.OnCheckedChangeListener {
            C3555() {
            }

            @Override
            public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                C2975.m7928().edit().putBoolean("file_browser_folders_first", z).commit();
                C2975.f9363 = z;
                C3549.m8190();
            }
        }

        class C3556 implements RadioGroup.OnCheckedChangeListener {
            C3556() {
            }

            @Override
            public void onCheckedChanged(RadioGroup radioGroup, int i) {
                switch (i) {
                    case R.id.radioButtonName:
                        C2975.m7928().edit().putInt("file_browser_file_sorting", 0).commit();
                        C2975.f9365 = 0;
                        break;
                    case R.id.radioButtonTime:
                        C2975.m7928().edit().putInt("file_browser_file_sorting", 1).commit();
                        C2975.f9365 = 1;
                        break;
                }
                C3549.m8190();
            }
        }

        ViewOnClickListenerC3553() {
        }

        @Override
        public void onClick(View view) {
            LinearLayout linearLayout = (LinearLayout) View.inflate(view.getContext(), R.layout.file_browser_settings, null);
            TextView textView = (TextView) linearLayout.findViewById(R.id.zagolovok);
            textView.setText(C2500.m7007(R.string.settings));
            textView.setTextAppearance(view.getContext(), C2975.m7934());
            textView.setTextColor(Color.parseColor("#FFFFFFFF"));
            textView.setTypeface(null, 1);
            TextView textView2 = (TextView) linearLayout.findViewById(R.id.sort_setting_text);
            textView2.setText(C2500.m7007(R.string.settings_sort_order_of_files));
            textView2.setTextAppearance(view.getContext(), C2975.m7934());
            textView2.setTextColor(Color.parseColor("#feeb9c"));
            textView2.setTypeface(null, 1);
            Dialog m7851 = new C2913(view.getContext(), true).m7858(linearLayout).m7878(C2500.m7007(R.string.exit), null).m7851();
            CheckBox checkBox = (CheckBox) linearLayout.findViewById(R.id.showOnlyUsedFiles);
            checkBox.setText(C2500.m7007(R.string.settings_show_only_used_files));
            checkBox.setTextAppearance(view.getContext(), C2975.m7934());
            checkBox.setTextColor(Color.parseColor("#FFFFFFFF"));
            if (C2975.m7928().getBoolean("file_browser_only_used_files", true)) {
                checkBox.setChecked(true);
            }
            checkBox.setOnCheckedChangeListener(new C3554());
            CheckBox checkBox2 = (CheckBox) linearLayout.findViewById(R.id.showFolderFirst);
            checkBox2.setText(C2500.m7007(R.string.settings_show_folder_first));
            checkBox2.setTextAppearance(view.getContext(), C2975.m7934());
            checkBox2.setTextColor(Color.parseColor("#FFFFFFFF"));
            if (C2975.m7928().getBoolean("file_browser_folders_first", true)) {
                checkBox2.setChecked(true);
            }
            checkBox2.setOnCheckedChangeListener(new C3555());
            RadioGroup radioGroup = (RadioGroup) linearLayout.findViewById(R.id.radioGroup);
            RadioButton radioButton = (RadioButton) linearLayout.findViewById(R.id.radioButtonName);
            radioButton.setText(C2500.m7007(R.string.settings_sort_order_of_files_name));
            radioButton.setTextAppearance(view.getContext(), C2975.m7934());
            radioButton.setTextColor(Color.parseColor("#FFFFFFFF"));
            RadioButton radioButton2 = (RadioButton) linearLayout.findViewById(R.id.radioButtonTime);
            radioButton2.setText(C2500.m7007(R.string.settings_sort_order_of_files_time));
            radioButton2.setTextAppearance(view.getContext(), C2975.m7934());
            radioButton2.setTextColor(Color.parseColor("#FFFFFFFF"));
            int i = C2975.m7928().getInt("file_browser_file_sorting", 0);
            if (i != 0) {
                if (i == 1) {
                    radioGroup.check(R.id.radioButtonTime);
                }
            } else {
                radioGroup.check(R.id.radioButtonName);
            }
            radioGroup.setOnCheckedChangeListener(new C3556());
            m7851.setCancelable(true);
            m7851.show();
        }
    }

    public class DialogInterfaceOnClickListenerC3557 implements DialogInterface.OnClickListener {
        DialogInterfaceOnClickListenerC3557() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C3549.m8182(C3549.f10206, C3549.f10208, C3549.f10205, false, "");
        }
    }

    public class C3558 implements AdapterView.OnItemClickListener {

        final ArrayAdapter f10216;

        C3558(ArrayAdapter arrayAdapter) {
            this.f10216 = arrayAdapter;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3727 c3727 = (C3727) this.f10216.getItem(i);
            if (c3727.f10499) {
                c3727.f10499 = false;
            } else {
                c3727.f10499 = true;
            }
            if (c3727.f10494 == R.string.contextfulloffline && c3727.f10499) {
                C3549.m8186(R.string.contextpattads6, this.f10216).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattads6 && c3727.f10499) {
                C3549.m8186(R.string.contextfulloffline, this.f10216).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl4 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl5, this.f10216).f10499 = true;
                C3549.m8186(R.string.contextpattlvl6, this.f10216).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl6 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl5, this.f10216).f10499 = true;
                C3549.m8186(R.string.contextpattlvl4, this.f10216).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_dex_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_signature_verification_kill_option, this.f10216).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_signature_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_dex_verification_kill_option, this.f10216).f10499 = false;
            }
            this.f10216.notifyDataSetChanged();
        }
    }

    public class DialogInterfaceOnClickListenerC3559 implements DialogInterface.OnClickListener {
        DialogInterfaceOnClickListenerC3559() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            dialogInterface.dismiss();
        }
    }

    public class DialogInterfaceOnKeyListenerC3560 implements DialogInterface.OnKeyListener {
        DialogInterfaceOnKeyListenerC3560() {
        }

        @Override
        public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) {
            System.out.println(keyEvent);
            if (i == 4 && keyEvent.getAction() == 1) {
                try {
                    if (((C2624) C3549.f10208.getAdapter().getItem(0)).f7519.equals("../")) {
                        C3549.m8182(((C2624) C3549.f10208.getAdapter().getItem(0)).f7518, C3549.f10208, C3549.f10205, false, "");
                    } else {
                        C2975.f9282 = "";
                        dialogInterface.dismiss();
                    }
                } catch (IndexOutOfBoundsException unused) {
                    dialogInterface.dismiss();
                } catch (Exception unused2) {
                    dialogInterface.dismiss();
                }
            }
            return false;
        }
    }

    public class C3561 implements AdapterView.OnItemClickListener {
        C3561() {
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C2624 c2624 = (C2624) adapterView.getAdapter().getItem(i);
            File file = new File(c2624.f7520);
            if (file.isDirectory()) {
                if (file.canRead() && file.listFiles() != null) {
                    ListView listView = (ListView) adapterView;
                    C3549.f10208 = listView;
                    C3549.m8182(new File(c2624.f7520).getPath(), listView, C3549.f10205, false, "");
                    return;
                }
                C2500.m7117(new C2913(C2975.f9245.mo1874()).m7872(android.R.drawable.ic_dialog_info).m7860("[" + file.getName() + "] " + C2500.m7007(R.string.error_read_folder)).m7875("OK", null).m7851());
                return;
            }
            C2975.f9366 = c2624;
            C3549.m8187(new File(C2975.f9366.f7520));
        }
    }

    public class C3562 extends ArrayAdapter<C2624> {
        C3562(Context context, int i, List list) {
            super(context, i, list);
        }

        @Override
        public View getView(int i, View view, ViewGroup viewGroup) {
            C2624 c2624 = (C2624) getItem(i);
            if (view == null) {
                view = ((LayoutInflater) C2975.m7929().getSystemService("layout_inflater")).inflate(R.layout.file_browser_row, viewGroup, false);
            }
            TextView textView = (TextView) view.findViewById(R.id.rowtext);
            textView.setTextAppearance(getContext(), C2975.m7934());
            textView.setText(c2624.f7519);
            ImageView imageView = (ImageView) view.findViewById(R.id.image);
            if (i == 0 || i == 1) {
                try {
                } catch (Exception e) {
                    e.printStackTrace();
                } catch (OutOfMemoryError e2) {
                    e2.printStackTrace();
                    System.gc();
                }
                if (getCount() > 1 && ((C2624) getItem(1)).f7519.equals("../")) {
                    imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.fb_back));
                    return view;
                }
            }
            if (new File(c2624.f7520).isDirectory()) {
                imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.fb_folder));
            } else {
                imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.file_icon));
            }
            return view;
        }
    }

    public class RunnableC3563 implements Runnable {

        final String f10217;

        final File f10218;

        final ArrayList f10219;

        class C3564 extends ArrayAdapter<Integer> {
            C3564(Context context, int i, List list) {
                super(context, i, list);
            }

            @Override
            public View getView(int i, View view, ViewGroup viewGroup) {
                View view2;
                if (view == null) {
                    view2 = ((LayoutInflater) C2975.m7929().getSystemService("layout_inflater")).inflate(R.layout.icon_context_menu, viewGroup, false);
                } else {
                    view2 = view;
                }
                TextView textView = (TextView) view2.findViewById(R.id.conttext);
                ImageView imageView = (ImageView) view2.findViewById(R.id.imgIcon);
                imageView.setImageDrawable(null);
                textView.setTextAppearance(getContext(), C2975.m7934());
                textView.setTextColor(-1);
                try {
                    switch (((Integer) getItem(i)).intValue()) {
                        case R.string.app_info:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.info_app));
                            imageView.setColorFilter(Color.parseColor("#cccccc"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#cccccc"));
                            break;
                        case R.string.context_install:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.context_custom_patch));
                            imageView.setColorFilter(Color.parseColor("#ffff99"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#ffff99"));
                            break;
                        case R.string.context_install_as_system:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.move_to));
                            imageView.setColorFilter(Color.parseColor("#ffcc66"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#ffcc66"));
                            break;
                        case R.string.context_integrate_dalvik:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.context_permissions));
                            imageView.setColorFilter(Color.parseColor("#9999cc"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#9999cc"));
                            break;
                        case R.string.context_original_resign_app:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.mipmap.clone));
                            imageView.setColorFilter(Color.parseColor("#ffcc66"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#ffcc66"));
                            break;
                        case R.string.context_patch_framework:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.context_permissions));
                            imageView.setColorFilter(Color.parseColor("#9999cc"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#9999cc"));
                            break;
                        case R.string.context_rebuild:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.context_create_apk));
                            imageView.setColorFilter(Color.parseColor("#c2f055"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#c2f055"));
                            break;
                        case R.string.context_resign_app:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.mipmap.clone));
                            imageView.setColorFilter(Color.parseColor("#ffcc66"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#ffcc66"));
                            break;
                        case R.string.context_uninstall_if_installed:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.context_custom_patch));
                            imageView.setColorFilter(Color.parseColor("#ffff99"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#ffff99"));
                            break;
                        case R.string.delete_file:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.context_recycle));
                            imageView.setColorFilter(Color.parseColor("#fe6c00"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#fe6c00"));
                            break;
                        case R.string.import_to_lucky_patcher:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.context_custom_patch));
                            imageView.setColorFilter(Color.parseColor("#ffff99"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#ffff99"));
                            break;
                        case R.string.share_this_app:
                            imageView.setImageDrawable(C2975.m7933().getDrawable(R.drawable.context_share));
                            imageView.setColorFilter(Color.parseColor("#cccccc"), PorterDuff.Mode.MULTIPLY);
                            textView.setTextColor(Color.parseColor("#cccccc"));
                            break;
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                } catch (OutOfMemoryError e2) {
                    e2.printStackTrace();
                    System.gc();
                }
                textView.setCompoundDrawablePadding((int) ((C2975.m7933().getDisplayMetrics().density * 5.0f) + 0.5f));
                if (((Integer) getItem(i)).intValue() != R.string.context_original_resign_app) {
                    textView.setText(C2500.m7007(((Integer) getItem(i)).intValue()));
                } else {
                    textView.setText(C2500.m7009(((Integer) getItem(i)).intValue(), C2500.m7007(R.string.contextcorepatch2)));
                }
                textView.setTypeface(null, 1);
                return view2;
            }
        }

        RunnableC3563(String str, File file, ArrayList arrayList) {
            this.f10217 = str;
            this.f10218 = file;
            this.f10219 = arrayList;
        }

        @Override
        public void run() {
            if (this.f10217.equals("core.jar") || this.f10217.equals("core.odex") || this.f10217.equals("core-libart.odex") || this.f10217.equals("services.jar") || this.f10217.equals("services.odex") || this.f10217.equals("core-libart.jar") || this.f10217.equals("core-oj.jar") || this.f10217.equals("conscrypt.jar") || this.f10217.equals("boot.oat") || this.f10217.endsWith("conscrypt.oat") || this.f10217.endsWith("core-oj.oat") || this.f10217.endsWith("framework.oat")) {
                if (this.f10217.endsWith(".jar")) {
                    if (C2500.m7173(this.f10218)) {
                        this.f10219.add(Integer.valueOf(R.string.context_patch_framework));
                    } else {
                        String str = C2975.f9234;
                        C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.error_classes_not_found));
                    }
                } else {
                    this.f10219.add(Integer.valueOf(R.string.context_patch_framework));
                }
            }
            if (this.f10217.toLowerCase().endsWith(".lpzip")) {
                this.f10219.add(Integer.valueOf(R.string.import_to_lucky_patcher));
            }
            if (this.f10217.endsWith(".apk") || C2500.m7027(this.f10217)) {
                System.out.println("integrate dalvik code...");
                boolean z = false;
                try {
                    String str2 = "";
                    if (this.f10217.endsWith(".apk")) {
                        str2 = C2500.m6922(this.f10218.getAbsolutePath(), 1).packageName;
                    }
                    if (C2500.m7027(this.f10217)) {
                        str2 = C2500.m6924(this.f10218);
                    }
                    if (C2500.m6974(str2, 0) != null) {
                        z = true;
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (C2975.f9283 && z) {
                    this.f10219.add(Integer.valueOf(R.string.context_integrate_dalvik));
                }
                this.f10219.add(Integer.valueOf(R.string.context_install));
                if (!C2975.f9283 && !C2975.f9348.booleanValue() && z) {
                    this.f10219.add(Integer.valueOf(R.string.context_uninstall_if_installed));
                }
                this.f10219.add(Integer.valueOf(R.string.context_rebuild));
                this.f10219.add(Integer.valueOf(R.string.app_info));
            }
            if (this.f10217.endsWith(".apk") && C2975.f9283) {
                this.f10219.add(Integer.valueOf(R.string.context_install_as_system));
            }
            this.f10219.add(Integer.valueOf(R.string.delete_file));
            if (C2500.m7027(this.f10217) || this.f10217.endsWith(".apk")) {
                this.f10219.add(Integer.valueOf(R.string.share_this_app));
            }
            if (this.f10219.size() != 0) {
                C2975.f9264 = new C3564(C2975.f9245.mo1874(), R.layout.icon_context_menu, this.f10219);
                C2975.m7951(7);
                C2975.m7960(7);
            }
        }
    }

    public class ViewOnClickListenerC3565 implements View.OnClickListener {

        final View f10221;

        final ScrollView f10222;

        ViewOnClickListenerC3565(View view, ScrollView scrollView) {
            this.f10221 = view;
            this.f10222 = scrollView;
        }

        @Override
        public void onClick(View view) {
            LinearLayout linearLayout = (LinearLayout) this.f10221.findViewById(R.id.text);
            ScrollView scrollView = (ScrollView) linearLayout.findViewWithTag("custom_help_tag");
            if (scrollView != null) {
                scrollView.setVisibility(8);
            }
            if (linearLayout.findViewWithTag("common_help_tag") == null) {
                linearLayout.addView(this.f10222);
            } else {
                this.f10222.setVisibility(0);
            }
        }
    }

    public class ViewOnClickListenerC3566 implements View.OnClickListener {

        final View f10223;

        final ScrollView f10224;

        ViewOnClickListenerC3566(View view, ScrollView scrollView) {
            this.f10223 = view;
            this.f10224 = scrollView;
        }

        @Override
        public void onClick(View view) {
            LinearLayout linearLayout = (LinearLayout) this.f10223.findViewById(R.id.text);
            ScrollView scrollView = (ScrollView) linearLayout.findViewWithTag("common_help_tag");
            if (scrollView != null) {
                scrollView.setVisibility(8);
            }
            if (linearLayout.findViewWithTag("custom_help_tag") == null) {
                linearLayout.addView(this.f10224);
            } else {
                this.f10224.setVisibility(0);
            }
        }
    }

    public class DialogInterfaceOnClickListenerC3567 implements DialogInterface.OnClickListener {

        class RunnableC3568 implements Runnable {
            RunnableC3568() {
            }

            @Override
            public void run() {
                C2975.m7928().edit().putBoolean("warning_magisk", true).commit();
                C2975.m7928().edit().putBoolean("warning_new_support_patch_dex", true).commit();
                C2975.m7928().edit().putBoolean("warning_magisk_module", true).commit();
                C2975.m7928().edit().putBoolean("warning_system_apps", true).commit();
                C2975.m7928().edit().putBoolean("warning_play_protect", true).commit();
                C2975.m7928().edit().putBoolean("warning_china_muiu_phone", true).commit();
                C2975.m7928().edit().putBoolean("warning_supersu", true).commit();
                C2975.m7962(C2500.m7007(R.string.information), C2500.m7007(R.string.message_reset_dialog_settings_done));
            }
        }

        DialogInterfaceOnClickListenerC3567() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2975.m7956(new RunnableC3568());
        }
    }

    public class DialogInterfaceOnClickListenerC3569 implements DialogInterface.OnClickListener {

        final File[] f10226;

        final Runnable f10227;

        DialogInterfaceOnClickListenerC3569(File[] fileArr, Runnable runnable) {
            this.f10226 = fileArr;
            this.f10227 = runnable;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            this.f10226[0] = new File(C3549.f10209);
            this.f10227.run();
        }
    }

    public class DialogInterfaceOnKeyListenerC3570 implements DialogInterface.OnKeyListener {

        final Dialog f10228;

        DialogInterfaceOnKeyListenerC3570(Dialog dialog) {
            this.f10228 = dialog;
        }

        @Override
        public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) {
            System.out.println(keyEvent);
            if (i == 4 && keyEvent.getAction() == 1) {
                try {
                    if (((C2624) C3549.f10208.getAdapter().getItem(0)).f7519.equals("../")) {
                        C3549.m8182(((C2624) C3549.f10208.getAdapter().getItem(0)).f7518, C3549.f10208, C3549.f10205, true, "");
                        if (!((C2624) C3549.f10208.getAdapter().getItem(0)).f7519.equals("../")) {
                            ((Button) this.f10228.findViewById(R.id.button_settings)).setText(C2500.m7007(R.string.enter_manual_path));
                        }
                    } else {
                        dialogInterface.dismiss();
                    }
                } catch (IndexOutOfBoundsException unused) {
                    dialogInterface.dismiss();
                } catch (Exception unused2) {
                    dialogInterface.dismiss();
                }
            }
            return false;
        }
    }

    public class DialogInterfaceOnClickListenerC3571 implements DialogInterface.OnClickListener {

        final C2597 f10229;

        final ArrayAdapter f10230;

        final boolean f10231;

        final File f10232;

        DialogInterfaceOnClickListenerC3571(C2597 c2597, ArrayAdapter arrayAdapter, boolean z, File file) {
            this.f10229 = c2597;
            this.f10230 = arrayAdapter;
            this.f10231 = z;
            this.f10232 = file;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2597 c2597 = new C2597();
            C2597 c25972 = this.f10229;
            if (c25972 != null) {
                c2597 = c25972;
            }
            int count = this.f10230.getCount();
            String str = "1";
            for (int i2 = 0; i2 < count; i2++) {
                C3727 c3727 = (C3727) this.f10230.getItem(i2);
                if (c3727.f10499) {
                    switch (c3727.f10494) {
                        case R.string.context_dependencies:
                            str = str + "dependencies_";
                            break;
                        case R.string.context_dex_verification_kill_option:
                            c2597.f7292 = true;
                            break;
                        case R.string.context_original_resign_app:
                            c2597.f7302 = true;
                            break;
                        case R.string.context_signature_verification_kill_option:
                            c2597.f7290 = true;
                            break;
                        case R.string.context_use_zip_crc_image:
                            c2597.f7304 = true;
                            break;
                        case R.string.contextblockfileads:
                            str = str + "pattern0_";
                            break;
                        case R.string.contextfulloffline:
                            str = str + "fulloffline_";
                            break;
                        case R.string.contextpattads3:
                            str = str + "pattern3_";
                            break;
                        case R.string.contextpattads4:
                            str = str + "pattern6_";
                            break;
                        case R.string.contextpattads6:
                            str = str + "pattern5_";
                            break;
                        case R.string.contextpattlvl4:
                            c2597.f7344 = true;
                            break;
                        case R.string.contextpattlvl5:
                            c2597.f7330 = true;
                            break;
                        case R.string.contextpattlvl6:
                            c2597.f7332 = true;
                            break;
                    }
                }
            }
            c2597.f7320 = str;
            c2597.f7305 = true;
            boolean z = this.f10231;
            c2597.f7342 = z;
            c2597.f7329 = this.f10232;
            if (this.f10229 == null) {
                C2975.m7953(C2975.f9253, c2597);
            } else {
                C2975.f9245.m8067(c2597, z);
            }
        }
    }

    public class ViewOnClickListenerC3572 implements View.OnClickListener {

        final Button f10233;

        final ListView f10234;

        final View f10235;

        class DialogInterfaceOnClickListenerC3573 implements DialogInterface.OnClickListener {

            final EditTextFix f10236;

            DialogInterfaceOnClickListenerC3573(EditTextFix editTextFix) {
                this.f10236 = editTextFix;
            }

            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                Editable text = this.f10236.getText();
                if (text.toString().contains(InternalZipConstants.ZIP_FILE_SEPARATOR) && !text.toString().equals(InternalZipConstants.ZIP_FILE_SEPARATOR)) {
                    String str = "";
                    for (String str2 : text.toString().trim().replaceAll("\\s+", ".").split("\\/+")) {
                        if (!str2.equals("")) {
                            str = str + InternalZipConstants.ZIP_FILE_SEPARATOR + str2;
                        }
                    }
                    if (new File(str).exists()) {
                        if (C2975.f9245.m8071(true, str)) {
                            ViewOnClickListenerC3572.this.f10233.setText(C2500.m7007(R.string.binder_browser_create_dir));
                            C3549.m8182(new File(str).getPath(), ViewOnClickListenerC3572.this.f10234, C3549.f10205, true, "");
                            return;
                        } else {
                            C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.error_read_folder));
                            return;
                        }
                    }
                    C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.error_path));
                    return;
                }
                C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.error_path));
            }
        }

        class ViewOnClickListenerC3574 implements View.OnClickListener {

            final EditTextFix f10238;

            final Dialog f10239;

            ViewOnClickListenerC3574(EditTextFix editTextFix, Dialog dialog) {
                this.f10238 = editTextFix;
                this.f10239 = dialog;
            }

            @Override
            public void onClick(View view) {
                String str;
                C2975.m7942(this.f10238.getText());
                String str2 = this.f10238.getText().toString().trim().replaceAll(InternalZipConstants.ZIP_FILE_SEPARATOR, "") + InternalZipConstants.ZIP_FILE_SEPARATOR;
                if (str2.replaceAll(" ", "").equals("")) {
                    Toast.makeText(C2975.m7929(), C2500.m7007(R.string.create_dir_error), 1).show();
                    return;
                }
                if (C3549.f10209.endsWith(InternalZipConstants.ZIP_FILE_SEPARATOR)) {
                    str = C3549.f10209 + str2;
                } else {
                    str = C3549.f10209 + InternalZipConstants.ZIP_FILE_SEPARATOR + str2;
                }
                C2975.m7942(str);
                new File(str).mkdirs();
                if (!C2500.m6898(str) && !new File(str).exists()) {
                    Toast.makeText(C2975.m7929(), C2500.m7007(R.string.create_dir_error_2), 1).show();
                } else {
                    this.f10239.cancel();
                    C3549.m8182(C3549.f10209, (ListView) ViewOnClickListenerC3572.this.f10235.findViewById(R.id.list), C3549.f10205, true, "");
                }
            }
        }

        ViewOnClickListenerC3572(Button button, ListView listView, View view) {
            this.f10233 = button;
            this.f10234 = listView;
            this.f10235 = view;
        }

        @Override
        public void onClick(View view) {
            if (this.f10233.getText().equals(C2500.m7007(R.string.enter_manual_path))) {
                C2913 c2913 = new C2913(C2975.f9245.mo1874());
                c2913.m7854(R.string.please_enter_path_to_open);
                LinearLayout linearLayout = (LinearLayout) View.inflate(C2975.f9245.mo1874(), R.layout.child_change_dir_pref_view, null);
                EditTextFix editTextFix = (EditTextFix) linearLayout.findViewById(R.id.editTextDir);
                editTextFix.setText(C2975.m7928().getString("basepath", InternalZipConstants.ZIP_FILE_SEPARATOR));
                c2913.m7858(linearLayout);
                c2913.m7877(R.string.cancel, null).m7873(R.string.ok, new DialogInterfaceOnClickListenerC3573(editTextFix)).m7851().show();
                return;
            }
            Dialog dialog = new Dialog(C2975.f9259);
            dialog.setTitle(C2500.m7007(R.string.enter_name_dir));
            RelativeLayout relativeLayout = (RelativeLayout) View.inflate(C2975.f9259, R.layout.binder_create_dir, null);
            dialog.setContentView(relativeLayout);
            ((Button) dialog.findViewById(R.id.buttonCreate)).setOnClickListener(new ViewOnClickListenerC3574((EditTextFix) relativeLayout.findViewById(R.id.new_dir), dialog));
            C2500.m7117(dialog);
        }
    }

    public class C3575 implements AdapterView.OnItemClickListener {

        final Button f10241;

        C3575(Button button) {
            this.f10241 = button;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            this.f10241.setText(C2500.m7007(R.string.binder_browser_create_dir));
            C2624 c2624 = (C2624) adapterView.getAdapter().getItem(i);
            File file = new File(c2624.f7520);
            if (file.isDirectory()) {
                if (file.canRead() && file.listFiles() != null) {
                    ListView listView = (ListView) adapterView;
                    C3549.f10208 = listView;
                    C3549.m8182(new File(c2624.f7520).getPath(), listView, C3549.f10205, true, "");
                    if (!((C2624) C3549.f10208.getAdapter().getItem(0)).f7519.equals("../")) {
                        this.f10241.setText(C2500.m7007(R.string.enter_manual_path));
                        return;
                    }
                    return;
                }
                C2500.m7117(new C2913(C2975.f9245.mo1874()).m7872(android.R.drawable.ic_dialog_info).m7860("[" + file.getName() + "] " + C2500.m7007(R.string.error_read_folder)).m7875("OK", null).m7851());
            }
        }
    }

    public class DialogInterfaceOnClickListenerC3576 implements DialogInterface.OnClickListener {
        DialogInterfaceOnClickListenerC3576() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            dialogInterface.dismiss();
        }
    }

    public class DialogInterfaceOnKeyListenerC3577 implements DialogInterface.OnKeyListener {

        final String f10242;

        DialogInterfaceOnKeyListenerC3577(String str) {
            this.f10242 = str;
        }

        @Override
        public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) {
            System.out.println(keyEvent);
            if (i == 4 && keyEvent.getAction() == 1) {
                try {
                    if (((C2624) C3549.f10208.getAdapter().getItem(0)).f7519.equals("../")) {
                        C3549.m8182(((C2624) C3549.f10208.getAdapter().getItem(0)).f7518, C3549.f10208, C3549.f10205, false, this.f10242);
                    } else {
                        dialogInterface.dismiss();
                    }
                } catch (IndexOutOfBoundsException unused) {
                    dialogInterface.dismiss();
                } catch (Exception unused2) {
                    dialogInterface.dismiss();
                }
            }
            return false;
        }
    }

    public class C3578 implements AdapterView.OnItemClickListener {

        final String f10243;

        final File[] f10244;

        final Runnable f10245;

        final Dialog f10246;

        class DialogInterfaceOnClickListenerC3579 implements DialogInterface.OnClickListener {

            final File f10247;

            DialogInterfaceOnClickListenerC3579(File file) {
                this.f10247 = file;
            }

            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                C3578 c3578 = C3578.this;
                c3578.f10244[0] = this.f10247;
                c3578.f10245.run();
                C3578.this.f10246.dismiss();
            }
        }

        C3578(String str, File[] fileArr, Runnable runnable, Dialog dialog) {
            this.f10243 = str;
            this.f10244 = fileArr;
            this.f10245 = runnable;
            this.f10246 = dialog;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C2624 c2624 = (C2624) adapterView.getAdapter().getItem(i);
            File file = new File(c2624.f7520);
            if (file.isDirectory()) {
                if (file.canRead() && file.listFiles() != null) {
                    ListView listView = (ListView) adapterView;
                    C3549.f10208 = listView;
                    C3549.m8182(new File(c2624.f7520).getPath(), listView, C3549.f10205, false, this.f10243);
                } else {
                    C2500.m7117(new C2913(C2975.f9245.mo1874()).m7872(android.R.drawable.ic_dialog_info).m7860("[" + file.getName() + "] " + C2500.m7007(R.string.error_read_folder)).m7875("OK", null).m7851());
                }
            }
            if (file.isFile()) {
                if (file.canRead() && (file.getName().toLowerCase().endsWith(".apk") || C2500.m7027(file.getName().toLowerCase()) || (!this.f10243.equals("") && file.getName().toLowerCase().endsWith(this.f10243)))) {
                    C2500.m7125(C2500.m7007(R.string.information), C2500.m7009(R.string.message_file_selector, file.getName()), new DialogInterfaceOnClickListenerC3579(file), null, null);
                    return;
                }
                C2500.m7117(new C2913(C2975.f9245.mo1874()).m7872(android.R.drawable.ic_dialog_info).m7860("[" + file.getName() + "] " + C2500.m7007(R.string.error_read_folder)).m7875("OK", null).m7851());
            }
        }
    }

    public class RunnableC3580 implements Runnable {

        final ArrayList[] f10249;

        class C3581 implements Comparator<C2628> {
            C3581() {
            }

            @Override
            public int compare(C2628 c2628, C2628 c26282) {
                if (!c2628.f7534.equals("") && !c26282.f7534.equals("")) {
                    return c2628.f7534.compareTo(c26282.f7534);
                }
                if (!c2628.f7534.equals("")) {
                    return -1;
                }
                if (!c26282.f7534.equals("")) {
                    return 1;
                }
                if (c2628.f7534.equals("") && c26282.f7534.equals("")) {
                    if (!c2628.f7533.equals("") && !c26282.f7533.equals("")) {
                        return c2628.f7533.compareTo(c26282.f7533);
                    }
                    if (!c2628.f7533.equals("")) {
                        return -1;
                    }
                    if (!c26282.f7533.equals("")) {
                        return 1;
                    }
                    if (c2628.f7533.equals("") && c26282.f7533.equals("")) {
                        File file = c2628.f7541;
                        if (file != null && c26282.f7541 != null) {
                            boolean z = c2628.f7535;
                            boolean z2 = c26282.f7535;
                            if (z == z2) {
                                return file.getName().compareTo(c26282.f7541.getName());
                            }
                            if (z) {
                                return 1;
                            }
                            if (z2) {
                                return -1;
                            }
                            boolean z3 = c2628.f7537;
                            if (z3 != c26282.f7537) {
                                return Boolean.valueOf(z3).compareTo(Boolean.valueOf(c26282.f7537));
                            }
                            boolean z4 = c2628.f7536;
                            if (z4 != c26282.f7536) {
                                return Boolean.valueOf(z4).compareTo(Boolean.valueOf(c26282.f7536));
                            }
                            return file.getName().compareTo(c26282.f7541.getName());
                        }
                        if (file != null) {
                            return -1;
                        }
                        if (c26282.f7541 != null) {
                            return 1;
                        }
                    }
                }
                return 0;
            }
        }

        class RunnableC3582 implements Runnable {

            class C3583 extends C2931<C2628> {

                class C3584 extends Filter {
                    C3584() {
                    }

                    @Override
                    protected Filter.FilterResults performFiltering(CharSequence charSequence) {
                        Filter.FilterResults filterResults = new Filter.FilterResults();
                        ArrayList arrayList = new ArrayList();
                        C3583 c3583 = C3583.this;
                        if (c3583.f9124 == null) {
                            c3583.f9124 = c3583.f9122;
                        }
                        if (charSequence != null) {
                            List<Object> list = c3583.f9124;
                            if (list != 0 && list.size() > 0) {
                                for (Object object : C3583.this.f9124) {
                                    if (object.f7534.toLowerCase().contains(charSequence.toString().toLowerCase())) {
                                        arrayList.add(object);
                                    } else if (object.f7533.toLowerCase().contains(charSequence.toString().toLowerCase())) {
                                        arrayList.add(object);
                                    } else if (object.f7541.getName().toLowerCase().contains(charSequence.toString().toLowerCase())) {
                                        arrayList.add(object);
                                    }
                                }
                            }
                            arrayList.toArray(new C2628[arrayList.size()]);
                            filterResults.values = arrayList;
                        }
                        return filterResults;
                    }

                    @Override
                    protected void publishResults(CharSequence charSequence, Filter.FilterResults filterResults) {
                        C3583 c3583 = C3583.this;
                        c3583.f9122 = (List) filterResults.values;
                        c3583.notifyDataSetChanged();
                    }
                }

                C3583(Context context, int i, List list) {
                    super(context, i, list);
                }

                @Override
                public Filter getFilter() {
                    return new C3584();
                }

                @Override
                public View getView(int i, View view, ViewGroup viewGroup) {
                    String name;
                    View inflate = ((LayoutInflater) C2975.m7929().getSystemService("layout_inflater")).inflate(R.layout.magiskitem, viewGroup, false);
                    TextView textView = (TextView) inflate.findViewById(R.id.txtTitle);
                    TextView textView2 = (TextView) inflate.findViewById(R.id.txtStatus);
                    textView.setTextAppearance(getContext(), C2975.m7934());
                    textView2.setTextAppearance(getContext(), C2975.m7934());
                    int i2 = (int) ((C2975.m7933().getDisplayMetrics().density * 5.0f) + 0.5f);
                    textView.setCompoundDrawablePadding(i2);
                    textView2.setCompoundDrawablePadding(i2);
                    if (getItem(i).f7535) {
                        textView.setText(C2500.m6934(getItem(i).f7541.getName(), "#ffff0000", "bold"));
                        textView2.setText(C2500.m6934(C2500.m7007(R.string.magisk_module_apps_descr_deleted), "#AAAAAAAA", ""));
                    } else if (!getItem(i).f7537) {
                        textView.setText(C2500.m6934(getItem(i).f7541.getName(), "#ffffFF00", "bold"));
                        textView2.setText(C2500.m6934(C2500.m7007(R.string.magisk_module_apps_descr_not_mounted), "#AAAAAAAA", ""));
                    } else if (getItem(i).f7536) {
                        textView.setText(C2500.m6934(getItem(i).f7541.getName(), "#ffffFF00", "bold"));
                        textView2.setText(C2500.m6934(C2500.m7007(R.string.magisk_module_apps_descr_not_installed), "#AAAAAAAA", ""));
                    } else {
                        if (!getItem(i).f7533.equals("")) {
                            name = getItem(i).f7533;
                            if (!getItem(i).f7534.equals("")) {
                                name = getItem(i).f7534;
                            }
                            textView2.setText(C2500.m6934(C2500.m7007(R.string.restore_version) + ":" + getItem(i).f7538 + " " + C2500.m7007(R.string.restore_build) + ":" + getItem(i).f7539, "#AAAAAAAA", ""));
                        } else {
                            name = getItem(i).f7541.getName();
                        }
                        textView.setText(C2500.m6934(name, "#ff00FF00", "bold"));
                    }
                    return inflate;
                }
            }

            class C3585 implements AdapterView.OnItemClickListener {

                final C2931 f10254;

                class DialogInterfaceOnClickListenerC3586 implements DialogInterface.OnClickListener {

                    final C2628 f10256;

                    class RunnableC3587 implements Runnable {

                        class RunnableC3588 implements Runnable {
                            RunnableC3588() {
                            }

                            @Override
                            public void run() {
                                DialogInterfaceOnClickListenerC3586 dialogInterfaceOnClickListenerC3586 = DialogInterfaceOnClickListenerC3586.this;
                                C3585.this.f10254.remove(dialogInterfaceOnClickListenerC3586.f10256);
                                C3585.this.f10254.notifyDataSetChanged();
                                C3585.this.f10254.getFilter().filter("");
                            }
                        }

                        RunnableC3587() {
                        }

                        @Override
                        public void run() {
                            C2500.m7092(C1623.class, DialogInterfaceOnClickListenerC3586.this.f10256.f7541.getAbsolutePath());
                            C2975.m7954(new RunnableC3588());
                        }
                    }

                    DialogInterfaceOnClickListenerC3586(C2628 c2628) {
                        this.f10256 = c2628;
                    }

                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        C2975.m7956(new RunnableC3587());
                    }
                }

                C3585(C2931 c2931) {
                    this.f10254 = c2931;
                }

                @Override
                public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
                    String m7009;
                    C2628 c2628 = (C2628) this.f10254.getItem(i);
                    if (!c2628.f7534.equals("")) {
                        m7009 = C2500.m7009(R.string.message_magisk_module_apps_delete_folder_apps, c2628.f7541.getName(), c2628.f7534);
                    } else if (!c2628.f7533.equals("")) {
                        m7009 = C2500.m7009(R.string.message_magisk_module_apps_delete_folder_apps, c2628.f7541.getName(), c2628.f7533);
                    } else {
                        m7009 = C2500.m7009(R.string.message_magisk_module_apps_delete_folder, c2628.f7541.getName());
                    }
                    C2500.m7120(C2500.m7007(R.string.warning), m7009, C2500.m7007(R.string.binder_delete), new DialogInterfaceOnClickListenerC3586(c2628), null, null, false);
                }
            }

            class DialogInterfaceOnClickListenerC3589 implements DialogInterface.OnClickListener {

                class DialogInterfaceOnClickListenerC3590 implements DialogInterface.OnClickListener {
                    DialogInterfaceOnClickListenerC3590() {
                    }

                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        C2500.m7073();
                    }
                }

                DialogInterfaceOnClickListenerC3589() {
                }

                @Override
                public void onClick(DialogInterface dialogInterface, int i) {
                    C2500.m7125(C2500.m7007(R.string.warning), C2500.m7007(R.string.system_app_change), new DialogInterfaceOnClickListenerC3590(), null, null);
                }
            }

            RunnableC3582() {
            }

            @Override
            public void run() {
                C3583 c3583;
                if (RunnableC3580.this.f10249[0].size() <= 0) {
                    C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.message_manage_magisk_module_apps_empty));
                    c3583 = null;
                } else {
                    c3583 = new C3583(C2975.f9245.mo1874(), R.layout.magiskitem, RunnableC3580.this.f10249[0]);
                }
                C2913 c2913 = new C2913(C2975.f9245.mo1874());
                if (c3583 != null) {
                    c3583.setNotifyOnChange(true);
                    c2913.m7863(true);
                    c2913.m7864(c3583, new C3585(c3583));
                    c2913.m7875(C2500.m7007(R.string.reboot), new DialogInterfaceOnClickListenerC3589());
                    c2913.m7878(C2500.m7007(R.string.close), null);
                    c2913.m7851().show();
                }
            }
        }

        RunnableC3580(ArrayList[] arrayListArr) {
            this.f10249 = arrayListArr;
        }

        @Override
        public void run() {
            boolean z;
            String replaceAll = C2500.m7092(C1635.class, "all").replaceAll("\n", "");
            C2975.m7942("magisk:" + replaceAll);
            Iterator<File> it = C2500.m7191(replaceAll).iterator();
            while (it.hasNext()) {
                File next = it.next();
                C2975.m7942("add to magisk list:" + next.getAbsolutePath());
                File m6942 = C2500.m6942(next);
                Iterator it2 = this.f10249[0].iterator();
                while (true) {
                    if (it2.hasNext()) {
                        C2628 c2628 = (C2628) it2.next();
                        if (c2628.f7541.getAbsolutePath().equals(m6942.getAbsolutePath())) {
                            c2628.f7540.add(next);
                            if (next.getName().toLowerCase().endsWith(".replace")) {
                                c2628.f7535 = true;
                            }
                            z = true;
                        }
                    } else {
                        z = false;
                        break;
                    }
                }
                if (!z) {
                    C2628 c26282 = new C2628();
                    c26282.f7541 = m6942;
                    c26282.f7540.add(next);
                    if (next.getName().toLowerCase().endsWith(".replace")) {
                        c26282.f7535 = true;
                    }
                    this.f10249[0].add(c26282);
                }
            }
            Iterator it3 = this.f10249[0].iterator();
            while (it3.hasNext()) {
                C2628 c26283 = (C2628) it3.next();
                if (!c26283.f7535) {
                    Iterator<File> it4 = c26283.f7540.iterator();
                    while (it4.hasNext()) {
                        File next2 = it4.next();
                        if (next2.getName().endsWith(".apk")) {
                            if (C2500.m7175(next2).exists()) {
                                try {
                                    c26283.f7533 = C2500.m6968(C2500.m7175(next2));
                                    c26283.f7538 = C2500.m7014(C2500.m7175(next2));
                                    c26283.f7539 = C2500.m7013(C2500.m7175(next2));
                                    break;
                                } catch (ApkFormatException e) {
                                    e.printStackTrace();
                                } catch (IOException e2) {
                                    e2.printStackTrace();
                                }
                            } else {
                                c26283.f7537 = false;
                            }
                        }
                    }
                    if (!c26283.f7533.equals("")) {
                        try {
                            c26283.f7534 = C2975.m7932().getPackageInfo(c26283.f7533, 0).applicationInfo.loadLabel(C2975.m7932()).toString();
                        } catch (PackageManager.NameNotFoundException unused) {
                            c26283.f7536 = true;
                        }
                    }
                }
            }
            Collections.sort(this.f10249[0], new C3581());
            C2975.m7954(new RunnableC3582());
        }
    }

    public class ViewOnClickListenerC3591 implements View.OnClickListener {

        final File f10262;

        final File[] f10263;

        ViewOnClickListenerC3591(File file, File[] fileArr) {
            this.f10262 = file;
            this.f10263 = fileArr;
        }

        @Override
        public void onClick(View view) {
            try {
                MainActivity mainActivity = C2975.f9259;
                if (mainActivity != null) {
                    if (this.f10262 == null) {
                        mainActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + C2975.f9253.f10046)));
                    } else {
                        mainActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + C2975.m7932().getPackageArchiveInfo(this.f10263[0].getAbsolutePath(), 0).packageName)));
                    }
                }
            } catch (ActivityNotFoundException unused) {
                MainActivity mainActivity2 = C2975.f9259;
                if (mainActivity2 != null) {
                    if (this.f10262 == null) {
                        mainActivity2.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + C2975.f9253.f10046)));
                        return;
                    }
                    mainActivity2.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + C2975.m7932().getPackageArchiveInfo(this.f10263[0].getAbsolutePath(), 0).packageName)));
                }
            }
        }
    }

    public class ViewOnClickListenerC3592 implements View.OnClickListener {

        final TextView f10264;

        ViewOnClickListenerC3592(TextView textView) {
            this.f10264 = textView;
        }

        @Override
        public void onClick(View view) {
            try {
                ((ClipboardManager) C2975.m7929().getSystemService("clipboard")).setText(this.f10264.getText());
                Toast.makeText(C2975.m7929(), C2500.m7007(R.string.clipboard_message_for_app_dilaog_app_additional_info), 0).show();
            } catch (NoClassDefFoundError unused) {
            }
        }
    }

    public class ViewOnClickListenerC3593 implements View.OnClickListener {

        final TextView f10265;

        ViewOnClickListenerC3593(TextView textView) {
            this.f10265 = textView;
        }

        @Override
        public void onClick(View view) {
            try {
                ((ClipboardManager) C2975.m7929().getSystemService("clipboard")).setText(this.f10265.getText());
                Toast.makeText(C2975.m7929(), C2500.m7007(R.string.clipboard_message_for_app_dilaog_app_info), 0).show();
            } catch (NoClassDefFoundError unused) {
            }
        }
    }

    public class C3594 implements InputFilter {
        C3594() {
        }

        @Override
        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
            while (i < i2) {
                if (!Character.isDigit(charSequence.charAt(i))) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
                try {
                    Integer.valueOf(spanned.toString() + charSequence.toString());
                    i++;
                } catch (Throwable unused) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
            }
            return null;
        }
    }

    public class ViewOnClickListenerC3595 implements View.OnClickListener {

        final TextView f10266;

        ViewOnClickListenerC3595(TextView textView) {
            this.f10266 = textView;
        }

        @Override
        public void onClick(View view) {
            try {
                ((ClipboardManager) C2975.m7929().getSystemService("clipboard")).setText(this.f10266.getText());
                Toast.makeText(C2975.m7929(), C2500.m7007(R.string.clipboard_message_for_app_dilaog_app_permissions), 0).show();
            } catch (NoClassDefFoundError unused) {
            }
        }
    }

    public class C3596 implements CompoundButton.OnCheckedChangeListener {

        final C2913 f10267;

        final boolean[] f10268;

        final boolean[] f10269;

        C3596(C2913 c2913, boolean[] zArr, boolean[] zArr2) {
            this.f10267 = c2913;
            this.f10268 = zArr;
            this.f10269 = zArr2;
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                this.f10267.m7855().setChecked(false);
                this.f10268[0] = false;
                this.f10269[0] = true;
                return;
            }
            this.f10269[0] = false;
        }
    }

    public class C3597 implements AdapterView.OnItemClickListener {

        final ArrayAdapter f10270;

        C3597(ArrayAdapter arrayAdapter) {
            this.f10270 = arrayAdapter;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3727 c3727 = (C3727) this.f10270.getItem(i);
            if (c3727.f10499) {
                c3727.f10499 = false;
            } else {
                c3727.f10499 = true;
            }
            if (c3727.f10494 == R.string.support_patch_billing_redirect_to_proxy && c3727.f10499) {
                C3549.m8186(R.string.support_patch_billing_rebuild_dex, this.f10270).f10499 = false;
            }
            if (c3727.f10494 == R.string.support_patch_billing_rebuild_dex && c3727.f10499) {
                C3549.m8186(R.string.support_patch_billing_redirect_to_proxy, this.f10270).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl4 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl5, this.f10270).f10499 = true;
                C3549.m8186(R.string.contextpattlvl6, this.f10270).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl6 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl5, this.f10270).f10499 = true;
                C3549.m8186(R.string.contextpattlvl4, this.f10270).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_dex_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_signature_verification_kill_option, this.f10270).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_signature_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_dex_verification_kill_option, this.f10270).f10499 = false;
            }
            this.f10270.notifyDataSetChanged();
        }
    }

    public class RunnableC3598 implements Runnable {

        final TextView f10271;

        final TextView f10272;

        final SpannableStringBuilder f10273;

        final SpannableStringBuilder f10274;

        final TextView f10275;

        final SpannableStringBuilder f10276;

        final File[] f10277;

        final TextView f10278;

        final ProgressBar f10279;

        class RunnableC3599 implements Runnable {

            final SpannableString f10280;

            RunnableC3599(SpannableString spannableString) {
                this.f10280 = spannableString;
            }

            @Override
            public void run() {
                RunnableC3598.this.f10271.setText(this.f10280);
                RunnableC3598.this.f10272.setText("");
            }
        }

        class RunnableC3600 implements Runnable {
            RunnableC3600() {
            }

            @Override
            public void run() {
                RunnableC3598 runnableC3598 = RunnableC3598.this;
                runnableC3598.f10272.setText(runnableC3598.f10273, TextView.BufferType.SPANNABLE);
            }
        }

        class RunnableC3601 implements Runnable {
            RunnableC3601() {
            }

            @Override
            public void run() {
                RunnableC3598 runnableC3598 = RunnableC3598.this;
                runnableC3598.f10275.setText(runnableC3598.f10274, TextView.BufferType.SPANNABLE);
            }
        }

        class RunnableC3602 implements Runnable {
            RunnableC3602() {
            }

            @Override
            public void run() {
                RunnableC3598 runnableC3598 = RunnableC3598.this;
                runnableC3598.f10278.setText(runnableC3598.f10276, TextView.BufferType.SPANNABLE);
                RunnableC3598.this.f10279.setVisibility(8);
            }
        }

        RunnableC3598(TextView textView, TextView textView2, SpannableStringBuilder spannableStringBuilder, SpannableStringBuilder spannableStringBuilder2, TextView textView3, SpannableStringBuilder spannableStringBuilder3, File[] fileArr, TextView textView4, ProgressBar progressBar) {
            this.f10271 = textView;
            this.f10272 = textView2;
            this.f10273 = spannableStringBuilder;
            this.f10274 = spannableStringBuilder2;
            this.f10275 = textView3;
            this.f10276 = spannableStringBuilder3;
            this.f10277 = fileArr;
            this.f10278 = textView4;
            this.f10279 = progressBar;
        }

        @Override
        public void run() {
            Exception exc;
            String str;
            long j;
            int i;
            int i2;
            String str2;
            String str3;
            try {
                C2975.f9312.post(new RunnableC3599(C2500.m6934(C2975.f9253.f10047, "#be6e17", "bold")));
                if (C2500.m7047(C2975.f9253.f10046)) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.app_info_apk_is_splitted) + "\n", -16728876, ""));
                }
                if (C2975.f9253.f10064) {
                    this.f10273.append((CharSequence) C2500.m6934(C2500.m7007(R.string.enabled_package) + "\n", "#AAAAAA", ""));
                } else {
                    this.f10273.append((CharSequence) C2500.m6934(C2500.m7007(R.string.disabled_package) + "\n", "#AAAAAA", ""));
                }
                if (C2975.f9253.f10056) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statcustom) + "\n", -990142, ""));
                }
                if (C2975.f9253.f10057) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statlvl) + "\n", -16711821, ""));
                }
                if (C2975.f9253.f10058) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statads) + "\n", -990142, ""));
                }
                if (C2975.f9253.f10059) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statbilling) + "\n", -3820033, ""));
                }
                C3478 c3478 = C2975.f9253;
                if (!c3478.f10058 && !c3478.f10057 && !c3478.f10056 && !c3478.f10059) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statnull) + "\n", -65451, ""));
                }
                if (C2975.f9253.f10060) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statmodified) + "\n", -16711821, ""));
                } else {
                    this.f10273.append((CharSequence) C2500.m6934(C2500.m7007(R.string.statnotmodified) + "\n", "#AAAAAA", ""));
                }
                C3478 c34782 = C2975.f9253;
                if (C2500.m7156(c34782.f10062, c34782.f10061)) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statfix) + "\n", -990142, ""));
                } else {
                    this.f10273.append((CharSequence) C2500.m6934(C2500.m7007(R.string.statnotfix) + "\n", "#AAAAAA", ""));
                }
                if (C2975.f9253.f10061) {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statsys), -162281, ""));
                } else {
                    this.f10273.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statnotsys), -16711821, ""));
                }
                if (C2975.f9253.f10069) {
                    this.f10273.append((CharSequence) C2500.m6933("\n" + C2500.m7007(R.string.uninstalled_package_for_user), -65451, ""));
                }
                C2975.f9312.post(new RunnableC3600());
                PackageManager m7932 = C2975.m7932();
                this.f10274.clear();
                try {
                    String[] strArr = m7932.getPackageInfo(C2975.f9253.f10046, 12288).requestedPermissions;
                    if (strArr != null && strArr.length > 0) {
                        String[] strArr2 = new String[strArr.length];
                        for (int i3 = 0; i3 < strArr.length; i3++) {
                            this.f10274.append((CharSequence) C2500.m6934(strArr[i3] + "\n", "#6699cc", "bold"));
                            try {
                                str2 = m7932.getPermissionInfo(strArr[i3], 0).loadDescription(m7932).toString();
                            } catch (PackageManager.NameNotFoundException | Exception unused) {
                                str2 = null;
                            }
                            if (str2 == null) {
                                str3 = C2500.m7007(R.string.permission_not_descr) + "\n\n";
                            } else {
                                str3 = str2 + "\n\n";
                            }
                            this.f10274.append((CharSequence) C2500.m6934(str3, "#AAAAAA", ""));
                        }
                    }
                } catch (PackageManager.NameNotFoundException e) {
                    e.printStackTrace();
                }
                C2975.f9312.post(new RunnableC3601());
                String str4 = C2500.m7007(R.string.package_name) + ":\n";
                this.f10276.clear();
                this.f10276.append((CharSequence) C2500.m6934(str4, "#6699cc", "bold"));
                this.f10276.append((CharSequence) C2500.m6934(C2975.f9253.f10046 + "\n", "#AAAAAA", ""));
                this.f10276.append((CharSequence) C2500.m6934(C2500.m7007(R.string.stat_launch_activity) + "\n", "#6699cc", "bold"));
                try {
                    this.f10276.append((CharSequence) C2500.m6934(C2975.m7932().getLaunchIntentForPackage(C2975.f9253.f10046).getComponent().getClassName() + "\n", "#AAAAAA", ""));
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
                this.f10276.append((CharSequence) C2500.m6934(C2500.m7007(R.string.signature) + " SHA-1:", "#6699cc", "bold"));
                String str5 = "unknown";
                try {
                    Signature[] signatureArr = C2975.m7932().getPackageInfo(C2975.f9253.f10046, 8256).signatures;
                    if (signatureArr != null && signatureArr.length >= 1) {
                        byte[] encoded = CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(signatureArr[0].toByteArray())).getEncoded();
                        str5 = C2500.m7050(encoded) ? " test signature" : "\n" + C2500.m7147(MessageDigest.getInstance("SHA-1").digest(encoded));
                    }
                } catch (Throwable th) {
                    th.printStackTrace();
                }
                this.f10276.append((CharSequence) C2500.m6934("" + str5, "#AAAAAA", ""));
                this.f10276.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statappplace) + "\n", "#6699cc", "bold"));
                try {
                    this.f10277[0] = new File(C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.sourceDir);
                    this.f10276.append((CharSequence) C2500.m6934(this.f10277[0].getAbsolutePath(), "#AAAAAA", ""));
                    this.f10276.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statdataplace) + "\n", "#6699cc", "bold"));
                    StringBuilder sb = new StringBuilder();
                    sb.append(C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.dataDir);
                    sb.append(InternalZipConstants.ZIP_FILE_SEPARATOR);
                    this.f10276.append((CharSequence) C2500.m6934(sb.toString(), "#AAAAAA", ""));
                    this.f10276.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statversion) + " ", "#6699cc", "bold"));
                    this.f10276.append((CharSequence) C2500.m6934(C2500.m6975(C2975.f9253.f10046), "#AAAAAA", ""));
                    this.f10276.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statbuild) + " ", "#6699cc", "bold"));
                    StringBuilder sb2 = new StringBuilder();
                    sb2.append("");
                    sb2.append(C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).versionCode);
                    this.f10276.append((CharSequence) C2500.m6934(sb2.toString(), "#AAAAAA", ""));
                    this.f10276.append((CharSequence) C2500.m6934("\nminSDK: ", "#6699cc", "bold"));
                } catch (PackageManager.NameNotFoundException e3) {
                    e3.printStackTrace();
                }
                try {
                    try {
                        i2 = C2975.m7932().getApplicationInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).minSdkVersion;
                        i = C2975.m7932().getApplicationInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).targetSdkVersion;
                    } catch (Throwable unused2) {
                        C2635 m6994 = C2500.m6994(new File(C2975.m7932().getApplicationInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).publicSourceDir));
                        int i4 = m6994.f7645;
                        i = m6994.f7643;
                        i2 = i4;
                    }
                    this.f10276.append((CharSequence) C2500.m6934("" + i2, "#AAAAAA", ""));
                    this.f10276.append((CharSequence) C2500.m6934("\nTargetSDK: ", "#6699cc", "bold"));
                    this.f10276.append((CharSequence) C2500.m6934("" + i, "#AAAAAA", ""));
                    this.f10276.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statuserid) + " ", "#6699cc", "bold"));
                    this.f10276.append((CharSequence) C2500.m6934("" + C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.uid, "#AAAAAA", ""));
                    this.f10276.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.install_date) + " ", "#6699cc", "bold"));
                    String str6 = "" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date(((long) C2975.f9253.f10063) * 1000));
                    C2975.m7942(Integer.valueOf(C2975.f9253.f10063));
                    C2975.m7942(Long.valueOf(C2975.f9253.f10063 * 1000));
                    this.f10276.append((CharSequence) C2500.m6934(str6, "#AAAAAA", ""));
                    this.f10276.append((CharSequence) C2500.m6934("\n\n" + C2500.m7007(R.string.apk_size) + " ", "#6699cc", "bold"));
                    float length = ((float) new File(C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.sourceDir).length()) / 1048576.0f;
                    if (C2500.m7047(C2975.f9253.f10046)) {
                        Iterator<File> it = C2500.m7000(C2975.f9253.f10046).iterator();
                        while (it.hasNext()) {
                            length += ((float) it.next().length()) / 1048576.0f;
                        }
                    }
                    this.f10276.append((CharSequence) C2500.m6934(String.format("%.3f", Float.valueOf(length)) + " Mb", "#AAAAAA", ""));
                    try {
                        this.f10276.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.dalvik_cache_size) + " ", "#6699cc", "bold"));
                        try {
                            j = C2500.m6947(C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.sourceDir).length();
                        } catch (Exception unused3) {
                            j = 0;
                        }
                        this.f10276.append((CharSequence) C2500.m6934(String.format("%.3f", Float.valueOf(((float) j) / 1048576.0f)) + " Mb", "#AAAAAA", ""));
                    } catch (Exception unused4) {
                    }
                    if (C2975.f9283) {
                        try {
                            this.f10276.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.data_dir_size) + " ", "#6699cc", "bold"));
                            try {
                                str = new C2500("").m7211(C2975.f9284 + C1644.class.getName() + " " + C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.dataDir);
                            } catch (Exception e4) {
                                exc = e4;
                                str = "";
                            }
                        } catch (Throwable th2) {
                            th2.printStackTrace();
                        }
                        try {
                            str = str.replace("SU Java-Code Running!\n", "");
                            C2975.m7942(str);
                        } catch (Exception e5) {
                            exc = e5;
                            exc.printStackTrace();
                            this.f10276.append((CharSequence) C2500.m6934(str.substring(0, str.indexOf("\n")).replace("\n", "").replace("\r", "") + " Mb", "#AAAAAA", ""));
                            C2975.m7954(new RunnableC3602());
                        }
                        this.f10276.append((CharSequence) C2500.m6934(str.substring(0, str.indexOf("\n")).replace("\n", "").replace("\r", "") + " Mb", "#AAAAAA", ""));
                    }
                    C2975.m7954(new RunnableC3602());
                } catch (ApkFormatException e6) {
                    throw new RuntimeException(e6);
                } catch (IOException e7) {
                    throw new RuntimeException(e7);
                }
            } catch (NullPointerException e8) {
                e8.printStackTrace();
            }
        }
    }

    public class RunnableC3603 implements Runnable {

        final SpannableStringBuilder f10285;

        final File f10286;

        final File[] f10287;

        final ImageView f10288;

        final TextView f10289;

        final TextView f10290;

        final SpannableStringBuilder f10291;

        final TextView f10292;

        final SpannableStringBuilder f10293;

        final TextView f10294;

        final ProgressBar f10295;

        class RunnableC3604 implements Runnable {

            final Drawable f10296;

            RunnableC3604(Drawable drawable) {
                this.f10296 = drawable;
            }

            @Override
            public void run() {
                RunnableC3603.this.f10288.setImageDrawable(this.f10296);
            }
        }

        class RunnableC3605 implements Runnable {

            final SpannableString f10298;

            RunnableC3605(SpannableString spannableString) {
                this.f10298 = spannableString;
            }

            @Override
            public void run() {
                RunnableC3603.this.f10289.setText(this.f10298);
                RunnableC3603.this.f10290.setText("");
            }
        }

        class RunnableC3606 implements Runnable {
            RunnableC3606() {
            }

            @Override
            public void run() {
                RunnableC3603 runnableC3603 = RunnableC3603.this;
                runnableC3603.f10290.setText(runnableC3603.f10291, TextView.BufferType.SPANNABLE);
            }
        }

        class RunnableC3607 implements Runnable {
            RunnableC3607() {
            }

            @Override
            public void run() {
                RunnableC3603 runnableC3603 = RunnableC3603.this;
                runnableC3603.f10292.setText(runnableC3603.f10285, TextView.BufferType.SPANNABLE);
            }
        }

        class RunnableC3608 implements Runnable {
            RunnableC3608() {
            }

            @Override
            public void run() {
                RunnableC3603 runnableC3603 = RunnableC3603.this;
                runnableC3603.f10294.setText(runnableC3603.f10293, TextView.BufferType.SPANNABLE);
                RunnableC3603.this.f10295.setVisibility(8);
            }
        }

        class RunnableC3609 implements Runnable {
            RunnableC3609() {
            }

            @Override
            public void run() {
                RunnableC3603 runnableC3603 = RunnableC3603.this;
                runnableC3603.f10294.setText(runnableC3603.f10293, TextView.BufferType.SPANNABLE);
                RunnableC3603.this.f10295.setVisibility(8);
            }
        }

        RunnableC3603(SpannableStringBuilder spannableStringBuilder, File file, File[] fileArr, ImageView imageView, TextView textView, TextView textView2, SpannableStringBuilder spannableStringBuilder2, TextView textView3, SpannableStringBuilder spannableStringBuilder3, TextView textView4, ProgressBar progressBar) {
            this.f10285 = spannableStringBuilder;
            this.f10286 = file;
            this.f10287 = fileArr;
            this.f10288 = imageView;
            this.f10289 = textView;
            this.f10290 = textView2;
            this.f10291 = spannableStringBuilder2;
            this.f10292 = textView3;
            this.f10293 = spannableStringBuilder3;
            this.f10294 = textView4;
            this.f10295 = progressBar;
        }

        @Override
        public void run() {
            PackageInfo packageArchiveInfo;
            boolean z;
            boolean z2;
            String str;
            int i;
            Signature[] signatureArr;
            String str2;
            String str3;
            String str4;
            byte[] encoded;
            Iterator<X509Certificate> it;
            String str5;
            String[] strArr;
            String[] strArr2;
            this.f10285.clear();
            try {
                if (C2500.m7027(this.f10286.getName())) {
                    this.f10287[0] = C2500.m6928(this.f10286);
                    packageArchiveInfo = C2975.m7932().getPackageArchiveInfo(this.f10287[0].getAbsolutePath(), 4161);
                } else {
                    this.f10287[0] = this.f10286;
                    packageArchiveInfo = C2975.m7932().getPackageArchiveInfo(this.f10287[0].getAbsolutePath(), ItemType.TYPE_LIST);
                }
                PackageInfo packageInfo = packageArchiveInfo;
                if (packageInfo != null) {
                    try {
                        C2975.m7954(new RunnableC3604(C2500.m6919(this.f10287[0].getAbsolutePath())));
                    } catch (Exception e) {
                        e.printStackTrace();
                    } catch (OutOfMemoryError e2) {
                        e2.printStackTrace();
                    }
                    String[] strArr3 = packageInfo.requestedPermissions;
                    C2975.f9312.post(new RunnableC3605(C2500.m6934(packageInfo.applicationInfo.loadLabel(C2975.m7932()).toString(), "#be6e17", "bold")));
                    try {
                        strArr = packageInfo.splitNames;
                        if (strArr != null) {
                            strArr2 = packageInfo.splitNames;
                        }
                        this.f10291.append((CharSequence) C2500.m6933(C2500.m7007(R.string.app_info_apk_is_splitted) + "\n", -16728876, ""));
                    } catch (Throwable th) {
                        th.printStackTrace();
                    }
                    if (strArr3 != null && strArr3.length != 0) {
                        z = false;
                        for (String str6 : strArr3) {
                            if (str6.contains("CHECK_LICENSE")) {
                                z = true;
                            }
                        }
                    } else {
                        z = false;
                    }
                    if (z) {
                        this.f10291.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statlvl) + "\n", -16711821, ""));
                    }
                    if (strArr3 != null && strArr3.length != 0) {
                        z2 = false;
                        for (String str7 : strArr3) {
                            if (str7.toUpperCase().contains("BILLING")) {
                                z2 = true;
                            }
                        }
                    } else {
                        z2 = false;
                    }
                    if (z2) {
                        this.f10291.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statbilling) + "\n", 12957183, ""));
                    }
                    if (!z && !z2) {
                        this.f10291.append((CharSequence) C2500.m6933(C2500.m7007(R.string.statnull) + "\n", -65451, ""));
                    }
                    C2975.f9312.post(new RunnableC3606());
                    if (strArr3 != null && strArr3.length > 0) {
                        String[] strArr4 = new String[strArr3.length];
                        for (int i2 = 0; i2 < strArr3.length; i2++) {
                            this.f10285.append((CharSequence) C2500.m6934(strArr3[i2] + "\n", "#6699cc", "bold"));
                            String str8 = null;
                            try {
                                str8 = C2975.m7932().getPermissionInfo(strArr3[i2], 0).loadDescription(C2975.m7932()).toString();
                            } catch (PackageManager.NameNotFoundException | Exception unused) {
                            }
                            if (str8 == null) {
                                str5 = C2500.m7007(R.string.permission_not_descr) + "\n\n";
                            } else {
                                str5 = str8 + "\n\n";
                            }
                            this.f10285.append((CharSequence) C2500.m6934(str5, "#AAAAAA", ""));
                        }
                    }
                    C2975.f9312.post(new RunnableC3607());
                    String str9 = C2500.m7007(R.string.package_name) + ":\n";
                    this.f10293.clear();
                    this.f10293.append((CharSequence) C2500.m6934(str9, "#6699cc", "bold"));
                    this.f10293.append((CharSequence) C2500.m6934(packageInfo.packageName + "\n", "#AAAAAA", ""));
                    this.f10293.append((CharSequence) C2500.m6934(C2500.m7007(R.string.signature) + " SHA-1:", "#6699cc", "bold"));
                    String str10 = "unknown";
                    try {
                        signatureArr = packageInfo.signatures;
                        str2 = " testkey";
                    } catch (Throwable th2) {
                        th = th2;
                    }
                    try {
                        if (signatureArr != null) {
                            try {
                            } catch (Throwable th3) {
                                th = th3;
                                th.printStackTrace();
                                str = str10;
                                this.f10293.append((CharSequence) C2500.m6934("" + str, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statversion) + " ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934(packageInfo.versionName, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statbuild) + " ", "#6699cc", "bold"));
                                StringBuilder sb = new StringBuilder();
                                sb.append("");
                                sb.append(packageInfo.versionCode);
                                this.f10293.append((CharSequence) C2500.m6934(sb.toString(), "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\nminSDK: ", "#6699cc", "bold"));
                                i = packageInfo.applicationInfo.minSdkVersion;
                                int i3 = packageInfo.applicationInfo.targetSdkVersion;
                                this.f10293.append((CharSequence) C2500.m6934("" + i, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\nTargetSDK: ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934("" + i3, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n\n" + C2500.m7007(R.string.apk_size) + " ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934(String.format("%.3f", Float.valueOf(((float) this.f10286.length()) / 1048576.0f)) + " Mb", "#AAAAAA", ""));
                                C2975.m7954(new RunnableC3608());
                                return;
                            }
                            if (signatureArr.length != 0) {
                                str3 = "unknown";
                                str4 = " testkey";
                                str10 = str3;
                                if (signatureArr != null && signatureArr.length >= 1) {
                                    encoded = CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(signatureArr[0].toByteArray())).getEncoded();
                                    if (!C2500.m7050(encoded)) {
                                        str = str4;
                                    } else {
                                        str = "\n" + C2500.m7147(MessageDigest.getInstance("SHA-1").digest(encoded));
                                    }
                                    this.f10293.append((CharSequence) C2500.m6934("" + str, "#AAAAAA", ""));
                                    this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statversion) + " ", "#6699cc", "bold"));
                                    this.f10293.append((CharSequence) C2500.m6934(packageInfo.versionName, "#AAAAAA", ""));
                                    this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statbuild) + " ", "#6699cc", "bold"));
                                    StringBuilder sb2 = new StringBuilder();
                                    sb2.append("");
                                    sb2.append(packageInfo.versionCode);
                                    this.f10293.append((CharSequence) C2500.m6934(sb2.toString(), "#AAAAAA", ""));
                                    this.f10293.append((CharSequence) C2500.m6934("\nminSDK: ", "#6699cc", "bold"));
                                    i = packageInfo.applicationInfo.minSdkVersion;
                                    int i32 = packageInfo.applicationInfo.targetSdkVersion;
                                    this.f10293.append((CharSequence) C2500.m6934("" + i, "#AAAAAA", ""));
                                    this.f10293.append((CharSequence) C2500.m6934("\nTargetSDK: ", "#6699cc", "bold"));
                                    this.f10293.append((CharSequence) C2500.m6934("" + i32, "#AAAAAA", ""));
                                    this.f10293.append((CharSequence) C2500.m6934("\n\n" + C2500.m7007(R.string.apk_size) + " ", "#6699cc", "bold"));
                                    this.f10293.append((CharSequence) C2500.m6934(String.format("%.3f", Float.valueOf(((float) this.f10286.length()) / 1048576.0f)) + " Mb", "#AAAAAA", ""));
                                    C2975.m7954(new RunnableC3608());
                                    return;
                                }
                                str = str10;
                                this.f10293.append((CharSequence) C2500.m6934("" + str, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statversion) + " ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934(packageInfo.versionName, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statbuild) + " ", "#6699cc", "bold"));
                                StringBuilder sb22 = new StringBuilder();
                                sb22.append("");
                                sb22.append(packageInfo.versionCode);
                                this.f10293.append((CharSequence) C2500.m6934(sb22.toString(), "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\nminSDK: ", "#6699cc", "bold"));
                                i = packageInfo.applicationInfo.minSdkVersion;
                                int i322 = packageInfo.applicationInfo.targetSdkVersion;
                                this.f10293.append((CharSequence) C2500.m6934("" + i, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\nTargetSDK: ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934("" + i322, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n\n" + C2500.m7007(R.string.apk_size) + " ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934(String.format("%.3f", Float.valueOf(((float) this.f10286.length()) / 1048576.0f)) + " Mb", "#AAAAAA", ""));
                                C2975.m7954(new RunnableC3608());
                                return;
                            }
                        }
                        if (it.hasNext()) {
                            byte[] encoded2 = it.next().getEncoded();
                            if (C2500.m7050(encoded2)) {
                                str10 = str4;
                            } else {
                                str10 = "\n" + C2500.m7147(MessageDigest.getInstance("SHA-1").digest(encoded2));
                            }
                            if (signatureArr != null) {
                                encoded = CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(signatureArr[0].toByteArray())).getEncoded();
                                if (!C2500.m7050(encoded)) {
                                }
                                this.f10293.append((CharSequence) C2500.m6934("" + str, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statversion) + " ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934(packageInfo.versionName, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statbuild) + " ", "#6699cc", "bold"));
                                StringBuilder sb222 = new StringBuilder();
                                sb222.append("");
                                sb222.append(packageInfo.versionCode);
                                this.f10293.append((CharSequence) C2500.m6934(sb222.toString(), "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\nminSDK: ", "#6699cc", "bold"));
                                i = packageInfo.applicationInfo.minSdkVersion;
                                int i3222 = packageInfo.applicationInfo.targetSdkVersion;
                                this.f10293.append((CharSequence) C2500.m6934("" + i, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\nTargetSDK: ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934("" + i3222, "#AAAAAA", ""));
                                this.f10293.append((CharSequence) C2500.m6934("\n\n" + C2500.m7007(R.string.apk_size) + " ", "#6699cc", "bold"));
                                this.f10293.append((CharSequence) C2500.m6934(String.format("%.3f", Float.valueOf(((float) this.f10286.length()) / 1048576.0f)) + " Mb", "#AAAAAA", ""));
                                C2975.m7954(new RunnableC3608());
                                return;
                            }
                            str = str10;
                            this.f10293.append((CharSequence) C2500.m6934("" + str, "#AAAAAA", ""));
                            this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statversion) + " ", "#6699cc", "bold"));
                            this.f10293.append((CharSequence) C2500.m6934(packageInfo.versionName, "#AAAAAA", ""));
                            this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statbuild) + " ", "#6699cc", "bold"));
                            StringBuilder sb2222 = new StringBuilder();
                            sb2222.append("");
                            sb2222.append(packageInfo.versionCode);
                            this.f10293.append((CharSequence) C2500.m6934(sb2222.toString(), "#AAAAAA", ""));
                            this.f10293.append((CharSequence) C2500.m6934("\nminSDK: ", "#6699cc", "bold"));
                            i = packageInfo.applicationInfo.minSdkVersion;
                            int i32222 = packageInfo.applicationInfo.targetSdkVersion;
                            this.f10293.append((CharSequence) C2500.m6934("" + i, "#AAAAAA", ""));
                            this.f10293.append((CharSequence) C2500.m6934("\nTargetSDK: ", "#6699cc", "bold"));
                            this.f10293.append((CharSequence) C2500.m6934("" + i32222, "#AAAAAA", ""));
                            this.f10293.append((CharSequence) C2500.m6934("\n\n" + C2500.m7007(R.string.apk_size) + " ", "#6699cc", "bold"));
                            this.f10293.append((CharSequence) C2500.m6934(String.format("%.3f", Float.valueOf(((float) this.f10286.length()) / 1048576.0f)) + " Mb", "#AAAAAA", ""));
                            C2975.m7954(new RunnableC3608());
                            return;
                        }
                        i = packageInfo.applicationInfo.minSdkVersion;
                        int i322222 = packageInfo.applicationInfo.targetSdkVersion;
                        this.f10293.append((CharSequence) C2500.m6934("" + i, "#AAAAAA", ""));
                        this.f10293.append((CharSequence) C2500.m6934("\nTargetSDK: ", "#6699cc", "bold"));
                        this.f10293.append((CharSequence) C2500.m6934("" + i322222, "#AAAAAA", ""));
                        this.f10293.append((CharSequence) C2500.m6934("\n\n" + C2500.m7007(R.string.apk_size) + " ", "#6699cc", "bold"));
                        this.f10293.append((CharSequence) C2500.m6934(String.format("%.3f", Float.valueOf(((float) this.f10286.length()) / 1048576.0f)) + " Mb", "#AAAAAA", ""));
                        C2975.m7954(new RunnableC3608());
                        return;
                    } catch (ApkFormatException e3) {
                        throw new RuntimeException(e3);
                    } catch (IOException e4) {
                        throw new RuntimeException(e4);
                    }
                    int i4 = C2975.f9299;
                    if (i4 <= 21) {
                        i4 = 21;
                    }
                    str3 = "unknown";
                    ApkVerifier.Result verify = new ApkVerifier.Builder(this.f10287[0]).setMinCheckedPlatformVersion(i4).setMaxCheckedPlatformVersion(34).build().verify();
                    Iterator<ApkVerifier.IssueWithParams> it2 = verify.getErrors().iterator();
                    while (it2.hasNext()) {
                        System.err.println("ERROR: " + it2.next());
                        it2 = it2;
                        str2 = str2;
                    }
                    str4 = str2;
                    verify.isVerified();
                    it = verify.getSignerCertificates().iterator();
                    str10 = str3;
                    if (signatureArr != null) {
                    }
                    str = str10;
                    this.f10293.append((CharSequence) C2500.m6934("" + str, "#AAAAAA", ""));
                    this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statversion) + " ", "#6699cc", "bold"));
                    this.f10293.append((CharSequence) C2500.m6934(packageInfo.versionName, "#AAAAAA", ""));
                    this.f10293.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.statbuild) + " ", "#6699cc", "bold"));
                    StringBuilder sb22222 = new StringBuilder();
                    sb22222.append("");
                    sb22222.append(packageInfo.versionCode);
                    this.f10293.append((CharSequence) C2500.m6934(sb22222.toString(), "#AAAAAA", ""));
                    this.f10293.append((CharSequence) C2500.m6934("\nminSDK: ", "#6699cc", "bold"));
                } else {
                    this.f10293.append((CharSequence) C2500.m6934(C2500.m7007(R.string.damadged_apk), "#FFFF0000", ""));
                    C2975.m7954(new RunnableC3609());
                }
            } catch (NullPointerException e5) {
                e5.printStackTrace();
            }
        }
    }

    public class DialogInterfaceOnClickListenerC3610 implements DialogInterface.OnClickListener {
        DialogInterfaceOnClickListenerC3610() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
        }
    }

    public class DialogInterfaceOnClickListenerC3611 implements DialogInterface.OnClickListener {

        final File[] f10304;

        final File f10305;

        class RunnableC3612 implements Runnable {

            class RunnableC3613 implements Runnable {

                final SpannableStringBuilder f10307;

                RunnableC3613(SpannableStringBuilder spannableStringBuilder) {
                    this.f10307 = spannableStringBuilder;
                }

                @Override
                public void run() {
                    C2913 c2913 = new C2913(C2975.f9259);
                    c2913.m7860(C2500.m7007(R.string.jadx_deobf_0x00000fab));
                    c2913.m7874(this.f10307);
                    c2913.m7856(16);
                    c2913.m7870(true);
                    c2913.m7873(R.string.ok, null);
                    try {
                        C2500.m7117(c2913.m7851());
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }

            RunnableC3612() {
            }

            @Override
            public void run() {
                MainActivity mainActivity;
                DialogInterfaceOnClickListenerC3611 dialogInterfaceOnClickListenerC3611;
                File[] fileArr;
                String str;
                String str2;
                int i;
                ApkVerifier.Result verify;
                Iterator<ApkVerifier.IssueWithParams> it;
                ArrayList arrayList;
                String str3;
                Iterator it2;
                String str4;
                String str5;
                String str6;
                String str7;
                String str8;
                String str9;
                String str10;
                String str11;
                String str12;
                String str13;
                String str14;
                String str15;
                boolean z;
                boolean z2;
                boolean z3;
                boolean z4;
                String str16 = ")";
                String str17 = " (";
                String str18 = "0x";
                SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder("");
                try {
                    dialogInterfaceOnClickListenerC3611 = DialogInterfaceOnClickListenerC3611.this;
                    fileArr = dialogInterfaceOnClickListenerC3611.f10304;
                } catch (Throwable th) {
                    th.printStackTrace();
                }
                if (fileArr[0] == null) {
                    File file = dialogInterfaceOnClickListenerC3611.f10305;
                    if (file != null) {
                        if (C2500.m7027(file.getName())) {
                            DialogInterfaceOnClickListenerC3611 dialogInterfaceOnClickListenerC36112 = DialogInterfaceOnClickListenerC3611.this;
                            dialogInterfaceOnClickListenerC36112.f10304[0] = C2500.m6928(dialogInterfaceOnClickListenerC36112.f10305);
                        } else {
                            DialogInterfaceOnClickListenerC3611 dialogInterfaceOnClickListenerC36113 = DialogInterfaceOnClickListenerC3611.this;
                            dialogInterfaceOnClickListenerC36113.f10304[0] = dialogInterfaceOnClickListenerC36113.f10305;
                        }
                    } else if (C2975.f9253 != null) {
                        str = ": \n";
                        str2 = "#CCCCCCCC";
                        fileArr[0] = new File(C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.sourceDir);
                        i = C2975.f9299;
                        if (i > 21) {
                            i = 21;
                        }
                        verify = new ApkVerifier.Builder(DialogInterfaceOnClickListenerC3611.this.f10304[0]).setMinCheckedPlatformVersion(i).setMaxCheckedPlatformVersion(34).build().verify();
                        verify.isVerified();
                        for (it = verify.getErrors().iterator(); it.hasNext(); it = it) {
                            ApkVerifier.IssueWithParams next = it.next();
                            System.err.println("ERROR: " + next);
                        }
                        arrayList = new ArrayList();
                        if (arrayList.size() == 0 && verify.getV1SchemeSigners() != null && verify.getV1SchemeSigners().size() > 0) {
                            C2975.m7942("get cert scheme v1");
                            z4 = false;
                            for (ApkVerifier.Result.V1SchemeSignerInfo v1SchemeSignerInfo : verify.getV1SchemeSigners()) {
                                if (v1SchemeSignerInfo != null && v1SchemeSignerInfo.getCertificate() != null) {
                                    arrayList.add(v1SchemeSignerInfo.getCertificate());
                                    z4 = true;
                                } else {
                                    arrayList.clear();
                                }
                            }
                            if (z4) {
                                str3 = "v1+";
                                if (arrayList.size() == 0 && verify.getV2SchemeSigners() != null && verify.getV2SchemeSigners().size() > 0) {
                                    C2975.m7942("get cert scheme v2");
                                    z3 = false;
                                    for (ApkVerifier.Result.V2SchemeSignerInfo v2SchemeSignerInfo : verify.getV2SchemeSigners()) {
                                        if (v2SchemeSignerInfo != null) {
                                            arrayList.add(v2SchemeSignerInfo.getCertificate());
                                            z3 = true;
                                        } else {
                                            arrayList.clear();
                                        }
                                    }
                                    if (z3) {
                                        str3 = str3 + "v2+";
                                    }
                                }
                                if (arrayList.size() == 0 && verify.getV3SchemeSigners() != null && verify.getV3SchemeSigners().size() > 0) {
                                    C2975.m7942("get cert scheme v3");
                                    z2 = false;
                                    for (ApkVerifier.Result.V3SchemeSignerInfo v3SchemeSignerInfo : verify.getV3SchemeSigners()) {
                                        if (v3SchemeSignerInfo != null) {
                                            arrayList.add(v3SchemeSignerInfo.getCertificate());
                                            z2 = true;
                                        } else {
                                            arrayList.clear();
                                        }
                                    }
                                    if (z2) {
                                        str3 = str3 + "v3+";
                                    }
                                }
                                if (arrayList.size() == 0 && verify.getV4SchemeSigners() != null && verify.getV4SchemeSigners().size() > 0) {
                                    C2975.m7942("get cert scheme v4");
                                    z = false;
                                    for (ApkVerifier.Result.V4SchemeSignerInfo v4SchemeSignerInfo : verify.getV4SchemeSigners()) {
                                        if (v4SchemeSignerInfo != null) {
                                            arrayList.add(v4SchemeSignerInfo.getCertificate());
                                            z = true;
                                        } else {
                                            arrayList.clear();
                                        }
                                    }
                                    if (z) {
                                        str3 = str3 + "v4+";
                                    }
                                }
                                it2 = arrayList.iterator();
                                String str19 = "unknown";
                                String str20 = str19;
                                String str21 = str20;
                                String str22 = str21;
                                String str23 = str22;
                                String str24 = str23;
                                String str25 = str24;
                                int i2 = 0;
                                String str26 = str3;
                                String str27 = str25;
                                while (it2.hasNext()) {
                                    X509Certificate x509Certificate = (X509Certificate) it2.next();
                                    Iterator it3 = it2;
                                    StringBuilder sb = new StringBuilder();
                                    String str28 = str27;
                                    sb.append(C2500.m7007(R.string.certificate));
                                    sb.append(" #");
                                    String str29 = str19;
                                    int i3 = i2 + 1;
                                    sb.append(i3);
                                    String sb2 = sb.toString();
                                    if (C2500.m7050(x509Certificate.getEncoded())) {
                                        sb2 = sb2 + " (testkey)";
                                    }
                                    StringBuilder sb3 = new StringBuilder();
                                    sb3.append("");
                                    i2 = i3;
                                    sb3.append(x509Certificate.getSerialNumber());
                                    String sb4 = sb3.toString();
                                    String type = x509Certificate.getType();
                                    String str30 = str20;
                                    String str31 = "" + x509Certificate.getVersion();
                                    String principal = x509Certificate.getSubjectDN().toString();
                                    String sigAlgName = x509Certificate.getSigAlgName();
                                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
                                    String str32 = simpleDateFormat.format(x509Certificate.getNotBefore()) + " ~ " + simpleDateFormat.format(x509Certificate.getNotAfter());
                                    if (str26.endsWith("+")) {
                                        str26 = str26.substring(0, str26.length() - 1);
                                    }
                                    String str33 = str26;
                                    byte[] encoded = x509Certificate.getEncoded();
                                    String str34 = str18 + Integer.toHexString(x509Certificate.hashCode()) + str17 + x509Certificate.hashCode() + str16;
                                    CRC32 crc32 = new CRC32();
                                    crc32.update(encoded);
                                    try {
                                        StringBuilder sb5 = new StringBuilder();
                                        sb5.append(str18);
                                        str5 = str18;
                                        try {
                                            sb5.append(Long.toHexString(crc32.getValue()));
                                            sb5.append(str17);
                                            str4 = str17;
                                            try {
                                                sb5.append(crc32.getValue());
                                                sb5.append(str16);
                                                str6 = sb5.toString();
                                            } catch (Throwable th2) {
                                                th = th2;
                                                th.printStackTrace();
                                                str6 = str28;
                                                str7 = C2500.m7147(MessageDigest.getInstance("MD5").digest(encoded));
                                                str8 = C2500.m7147(MessageDigest.getInstance("SHA-1").digest(encoded));
                                                str9 = str16;
                                                str10 = C2500.m7147(MessageDigest.getInstance("SHA-224").digest(encoded));
                                                str11 = C2500.m7147(MessageDigest.getInstance("SHA-256").digest(encoded));
                                                str12 = C2500.m7147(MessageDigest.getInstance("SHA-384").digest(encoded));
                                                str14 = C2500.m7147(MessageDigest.getInstance("SHA-512").digest(encoded));
                                                str13 = str10;
                                                str15 = Base64.encodeToString(encoded, 0).replace("\n", "");
                                                String m7161 = C2500.m7161(x509Certificate.getEncoded());
                                                String obj = x509Certificate.getPublicKey().toString();
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(sb2 + "\n\n", "#ff00ff73", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.scheme_versions) + ": ", "#6699cc", "bold"));
                                                String str35 = str2;
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(str33 + "\n\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.type) + ": ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(type + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.version) + ": ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(str31 + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.serial) + ": ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(sb4 + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.subject) + ": ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(principal + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.signature_algorithm) + ": ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(sigAlgName + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.validity) + ": ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(str32 + "\n\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.hash_code) + ": ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(str34 + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934("crc32: ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(str6 + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934("md5: ", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(str7 + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-1: \n", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(str8 + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-224: \n", "#6699cc", "bold"));
                                                StringBuilder sb6 = new StringBuilder();
                                                String str36 = str13;
                                                sb6.append(str36);
                                                sb6.append("\n");
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(sb6.toString(), str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-256: \n", "#6699cc", "bold"));
                                                StringBuilder sb7 = new StringBuilder();
                                                String str37 = str11;
                                                sb7.append(str37);
                                                sb7.append("\n");
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(sb7.toString(), str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-384: \n", "#6699cc", "bold"));
                                                StringBuilder sb8 = new StringBuilder();
                                                String str38 = str6;
                                                String str39 = str12;
                                                sb8.append(str39);
                                                sb8.append("\n");
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(sb8.toString(), str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-512: \n", "#6699cc", "bold"));
                                                StringBuilder sb9 = new StringBuilder();
                                                String str40 = str14;
                                                sb9.append(str40);
                                                sb9.append("\n");
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(sb9.toString(), str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934("base64: \n", "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(str15 + "\n", str35, ""));
                                                StringBuilder sb10 = new StringBuilder();
                                                str25 = str15;
                                                sb10.append(C2500.m7007(R.string.jadx_deobf_0x00000faa));
                                                str24 = str40;
                                                String str41 = str;
                                                sb10.append(str41);
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(sb10.toString(), "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(m7161 + "\n", str35, ""));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.public_key) + str41, "#6699cc", "bold"));
                                                spannableStringBuilder.append((CharSequence) C2500.m6934(obj + "\n\n", str35, ""));
                                                str = str41;
                                                str20 = str8;
                                                str21 = str36;
                                                str22 = str37;
                                                str27 = str38;
                                                str26 = str33;
                                                it2 = it3;
                                                str18 = str5;
                                                str19 = str7;
                                                str23 = str39;
                                                str17 = str4;
                                                str2 = str35;
                                                str16 = str9;
                                            }
                                        } catch (Throwable th3) {
                                            th = th3;
                                            str4 = str17;
                                        }
                                    } catch (Throwable th4) {
                                        th = th4;
                                        str4 = str17;
                                        str5 = str18;
                                    }
                                    try {
                                        str7 = C2500.m7147(MessageDigest.getInstance("MD5").digest(encoded));
                                    } catch (Throwable th5) {
                                        th5.printStackTrace();
                                        str7 = str29;
                                    }
                                    try {
                                        str8 = C2500.m7147(MessageDigest.getInstance("SHA-1").digest(encoded));
                                    } catch (Throwable th6) {
                                        th6.printStackTrace();
                                        str8 = str30;
                                    }
                                    try {
                                        str9 = str16;
                                        str10 = C2500.m7147(MessageDigest.getInstance("SHA-224").digest(encoded));
                                    } catch (Throwable th7) {
                                        th7.printStackTrace();
                                        str9 = str16;
                                        str10 = str21;
                                    }
                                    try {
                                        str11 = C2500.m7147(MessageDigest.getInstance("SHA-256").digest(encoded));
                                    } catch (Throwable th8) {
                                        th8.printStackTrace();
                                        str11 = str22;
                                    }
                                    try {
                                        str12 = C2500.m7147(MessageDigest.getInstance("SHA-384").digest(encoded));
                                    } catch (Throwable th9) {
                                        th9.printStackTrace();
                                        str12 = str23;
                                    }
                                    try {
                                        str14 = C2500.m7147(MessageDigest.getInstance("SHA-512").digest(encoded));
                                        str13 = str10;
                                    } catch (Throwable th10) {
                                        th10.printStackTrace();
                                        str13 = str10;
                                        str14 = str24;
                                    }
                                    try {
                                        str15 = Base64.encodeToString(encoded, 0).replace("\n", "");
                                    } catch (Throwable th11) {
                                        th11.printStackTrace();
                                        str15 = str25;
                                    }
                                    String m71612 = C2500.m7161(x509Certificate.getEncoded());
                                    String obj2 = x509Certificate.getPublicKey().toString();
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb2 + "\n\n", "#ff00ff73", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.scheme_versions) + ": ", "#6699cc", "bold"));
                                    String str352 = str2;
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(str33 + "\n\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.type) + ": ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(type + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.version) + ": ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(str31 + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.serial) + ": ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb4 + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.subject) + ": ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(principal + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.signature_algorithm) + ": ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sigAlgName + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.validity) + ": ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(str32 + "\n\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.hash_code) + ": ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(str34 + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("crc32: ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(str6 + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("md5: ", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(str7 + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-1: \n", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(str8 + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-224: \n", "#6699cc", "bold"));
                                    StringBuilder sb62 = new StringBuilder();
                                    String str362 = str13;
                                    sb62.append(str362);
                                    sb62.append("\n");
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb62.toString(), str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-256: \n", "#6699cc", "bold"));
                                    StringBuilder sb72 = new StringBuilder();
                                    String str372 = str11;
                                    sb72.append(str372);
                                    sb72.append("\n");
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb72.toString(), str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-384: \n", "#6699cc", "bold"));
                                    StringBuilder sb82 = new StringBuilder();
                                    String str382 = str6;
                                    String str392 = str12;
                                    sb82.append(str392);
                                    sb82.append("\n");
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb82.toString(), str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("SHA-512: \n", "#6699cc", "bold"));
                                    StringBuilder sb92 = new StringBuilder();
                                    String str402 = str14;
                                    sb92.append(str402);
                                    sb92.append("\n");
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb92.toString(), str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("base64: \n", "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(str15 + "\n", str352, ""));
                                    StringBuilder sb102 = new StringBuilder();
                                    str25 = str15;
                                    sb102.append(C2500.m7007(R.string.jadx_deobf_0x00000faa));
                                    str24 = str402;
                                    String str412 = str;
                                    sb102.append(str412);
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb102.toString(), "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(m71612 + "\n", str352, ""));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.public_key) + str412, "#6699cc", "bold"));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(obj2 + "\n\n", str352, ""));
                                    str = str412;
                                    str20 = str8;
                                    str21 = str362;
                                    str22 = str372;
                                    str27 = str382;
                                    str26 = str33;
                                    it2 = it3;
                                    str18 = str5;
                                    str19 = str7;
                                    str23 = str392;
                                    str17 = str4;
                                    str2 = str352;
                                    str16 = str9;
                                }
                                mainActivity = C2975.f9259;
                                if (mainActivity != null) {
                                    mainActivity.runOnUiThread(new RunnableC3613(spannableStringBuilder));
                                    return;
                                }
                                return;
                            }
                        }
                        str3 = "";
                        if (arrayList.size() == 0) {
                            C2975.m7942("get cert scheme v2");
                            z3 = false;
                            while (r15.hasNext()) {
                            }
                            if (z3) {
                            }
                        }
                        if (arrayList.size() == 0) {
                            C2975.m7942("get cert scheme v3");
                            z2 = false;
                            while (r14.hasNext()) {
                            }
                            if (z2) {
                            }
                        }
                        if (arrayList.size() == 0) {
                            C2975.m7942("get cert scheme v4");
                            z = false;
                            while (r0.hasNext()) {
                            }
                            if (z) {
                            }
                        }
                        it2 = arrayList.iterator();
                        String str192 = "unknown";
                        String str202 = str192;
                        String str212 = str202;
                        String str222 = str212;
                        String str232 = str222;
                        String str242 = str232;
                        String str252 = str242;
                        int i22 = 0;
                        String str262 = str3;
                        String str272 = str252;
                        while (it2.hasNext()) {
                        }
                        mainActivity = C2975.f9259;
                        if (mainActivity != null) {
                        }
                    }
                }
                str = ": \n";
                str2 = "#CCCCCCCC";
                i = C2975.f9299;
                if (i > 21) {
                }
                verify = new ApkVerifier.Builder(DialogInterfaceOnClickListenerC3611.this.f10304[0]).setMinCheckedPlatformVersion(i).setMaxCheckedPlatformVersion(34).build().verify();
                verify.isVerified();
                while (it.hasNext()) {
                }
                arrayList = new ArrayList();
                if (arrayList.size() == 0) {
                    C2975.m7942("get cert scheme v1");
                    z4 = false;
                    while (r9.hasNext()) {
                    }
                    if (z4) {
                    }
                }
                str3 = "";
                if (arrayList.size() == 0) {
                }
                if (arrayList.size() == 0) {
                }
                if (arrayList.size() == 0) {
                }
                it2 = arrayList.iterator();
                String str1922 = "unknown";
                String str2022 = str1922;
                String str2122 = str2022;
                String str2222 = str2122;
                String str2322 = str2222;
                String str2422 = str2322;
                String str2522 = str2422;
                int i222 = 0;
                String str2622 = str3;
                String str2722 = str2522;
                while (it2.hasNext()) {
                }
                mainActivity = C2975.f9259;
                if (mainActivity != null) {
                }
            }
        }

        DialogInterfaceOnClickListenerC3611(File[] fileArr, File file) {
            this.f10304 = fileArr;
            this.f10305 = file;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2975.m7956(new RunnableC3612());
        }
    }

    public class DialogInterfaceOnCancelListenerC3614 implements DialogInterface.OnCancelListener {
        DialogInterfaceOnCancelListenerC3614() {
        }

        @Override
        public void onCancel(DialogInterface dialogInterface) {
        }
    }

    public class DialogInterfaceOnClickListenerC3615 implements DialogInterface.OnClickListener {

        final C2597 f10309;

        final ArrayAdapter f10310;

        final boolean f10311;

        final File f10312;

        DialogInterfaceOnClickListenerC3615(C2597 c2597, ArrayAdapter arrayAdapter, boolean z, File file) {
            this.f10309 = c2597;
            this.f10310 = arrayAdapter;
            this.f10311 = z;
            this.f10312 = file;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2597 c2597 = new C2597();
            C2597 c25972 = this.f10309;
            if (c25972 != null) {
                c2597 = c25972;
            }
            int count = this.f10310.getCount();
            String str = "1";
            for (int i2 = 0; i2 < count; i2++) {
                C3727 c3727 = (C3727) this.f10310.getItem(i2);
                if (c3727.f10499) {
                    switch (c3727.f10494) {
                        case R.string.context_dex_verification_kill_option:
                            c2597.f7292 = true;
                            break;
                        case R.string.context_original_resign_app:
                            c2597.f7302 = true;
                            break;
                        case R.string.context_signature_verification_kill_option:
                            c2597.f7290 = true;
                            break;
                        case R.string.context_use_zip_crc_image:
                            c2597.f7304 = true;
                            break;
                        case R.string.contextpattlvl4:
                            c2597.f7344 = true;
                            break;
                        case R.string.contextpattlvl5:
                            c2597.f7330 = true;
                            break;
                        case R.string.contextpattlvl6:
                            c2597.f7332 = true;
                            break;
                        case R.string.support_patch_billing_rebuild_dex:
                            str = str + "newInappPatch_";
                            break;
                        case R.string.support_patch_billing_redirect_to_proxy:
                            str = str + "pattern1_";
                            break;
                        case R.string.support_patch_billing_repatch_patched_app:
                            str = str + "updatePatch_";
                            break;
                        case R.string.support_patch_lvl_inapp:
                            c2597.f7294 = true;
                            str = str + "use_emulation_integration_";
                            break;
                    }
                }
            }
            c2597.f7324 = str;
            c2597.f7311 = true;
            boolean z = this.f10311;
            c2597.f7342 = z;
            c2597.f7329 = this.f10312;
            if (this.f10309 == null) {
                C2975.m7953(C2975.f9253, c2597);
            } else {
                C2975.f9245.m8067(c2597, z);
            }
        }
    }

    public class DialogInterfaceOnClickListenerC3616 implements DialogInterface.OnClickListener {

        class RunnableC3617 implements Runnable {
            RunnableC3617() {
            }

            @Override
            public void run() {
                try {
                    Intent launchIntentForPackage = C2975.m7932().getLaunchIntentForPackage(C2975.f9253.f10046);
                    if (C2975.f9253.f10046 == null) {
                        C2975.m7942("Error LP: pkgname is null");
                    }
                    if (launchIntentForPackage == null) {
                        C2975.m7942("Error LP: launch intent is null");
                    }
                    if (launchIntentForPackage == null) {
                        Intent intent = new Intent("android.intent.action.MAIN", (Uri) null);
                        intent.addCategory("android.intent.category.LAUNCHER");
                        List<ResolveInfo> queryIntentActivities = C2975.m7932().queryIntentActivities(intent, 0);
                        if (queryIntentActivities != null) {
                            Iterator<ResolveInfo> it = queryIntentActivities.iterator();
                            while (true) {
                                if (!it.hasNext()) {
                                    break;
                                }
                                ResolveInfo next = it.next();
                                if (next.activityInfo.packageName.equals(C2975.f9253.f10046)) {
                                    ActivityInfo activityInfo = next.activityInfo;
                                    ComponentName componentName = new ComponentName(activityInfo.applicationInfo.packageName, activityInfo.name);
                                    launchIntentForPackage = new Intent("android.intent.action.MAIN");
                                    launchIntentForPackage.addCategory("android.intent.category.LAUNCHER");
                                    launchIntentForPackage.setComponent(componentName);
                                    break;
                                }
                            }
                        }
                    }
                    C2975.m7962(C2500.m7007(R.string.information), C2500.m7092(C1600.class, C2975.m7932().getApplicationInfo(C2975.f9253.f10046, 0).dataDir, Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath() + InternalZipConstants.ZIP_FILE_SEPARATOR + C2975.f9253.f10046 + InternalZipConstants.ZIP_FILE_SEPARATOR, C2975.f9253.f10046, C2975.f9253.f10046 + InternalZipConstants.ZIP_FILE_SEPARATOR + launchIntentForPackage.getComponent().getClassName()));
                } catch (PackageManager.NameNotFoundException e) {
                    e.printStackTrace();
                }
            }
        }

        DialogInterfaceOnClickListenerC3616() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2975.m7956(new RunnableC3617());
        }
    }

    public class C3618 implements InputFilter {
        C3618() {
        }

        @Override
        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
            while (i < i2) {
                if (!Character.isDigit(charSequence.charAt(i))) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
                try {
                    Integer.valueOf(spanned.toString() + charSequence.toString());
                    i++;
                } catch (Throwable unused) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
            }
            return null;
        }
    }

    public class C3619 implements CompoundButton.OnCheckedChangeListener {

        final boolean[] f10314;

        C3619(boolean[] zArr) {
            this.f10314 = zArr;
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                this.f10314[0] = true;
            } else {
                this.f10314[0] = false;
            }
        }
    }

    public class C3620 implements InputFilter {
        C3620() {
        }

        @Override
        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
            while (i < i2) {
                if (!Character.isDigit(charSequence.charAt(i))) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
                try {
                    Integer.valueOf(spanned.toString() + charSequence.toString());
                    i++;
                } catch (Throwable unused) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
            }
            return null;
        }
    }

    public class C3621 implements AdapterView.OnItemClickListener {

        final ArrayAdapter f10315;

        C3621(ArrayAdapter arrayAdapter) {
            this.f10315 = arrayAdapter;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3727 c3727 = (C3727) this.f10315.getItem(i);
            if (c3727.f10499) {
                c3727.f10499 = false;
            } else {
                c3727.f10499 = true;
            }
            this.f10315.notifyDataSetChanged();
        }
    }

    public class ViewOnClickListenerC3622 implements View.OnClickListener {

        final C3727[] f10316;

        final ArrayAdapter[] f10317;

        class RunnableC3623 implements Runnable {

            final File[] f10318;

            RunnableC3623(File[] fileArr) {
                this.f10318 = fileArr;
            }

            @Override
            public void run() {
                ViewOnClickListenerC3622 viewOnClickListenerC3622 = ViewOnClickListenerC3622.this;
                C3727 c3727 = viewOnClickListenerC3622.f10316[0];
                if (c3727 != null) {
                    c3727.f10504 = this.f10318[0];
                }
                ArrayAdapter arrayAdapter = viewOnClickListenerC3622.f10317[0];
                if (arrayAdapter != null) {
                    arrayAdapter.notifyDataSetChanged();
                }
            }
        }

        ViewOnClickListenerC3622(C3727[] c3727Arr, ArrayAdapter[] arrayAdapterArr) {
            this.f10316 = c3727Arr;
            this.f10317 = arrayAdapterArr;
        }

        @Override
        public void onClick(View view) {
            this.f10316[0].f10504 = null;
            File[] fileArr = {null};
            C3549.m8176(fileArr, new RunnableC3623(fileArr), "");
        }
    }

    public class C3624 implements AdapterView.OnItemClickListener {

        final ArrayAdapter f10320;

        C3624(ArrayAdapter arrayAdapter) {
            this.f10320 = arrayAdapter;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3727 c3727 = (C3727) this.f10320.getItem(i);
            if (c3727.f10499) {
                c3727.f10499 = false;
            } else {
                c3727.f10499 = true;
            }
            if (c3727.f10494 == R.string.contextpatt5 && c3727.f10499) {
                C3549.m8186(R.string.contextpatt6, this.f10320).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpatt6 && c3727.f10499) {
                C3549.m8186(R.string.contextpatt5, this.f10320).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl4 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl5, this.f10320).f10499 = true;
                C3549.m8186(R.string.contextpattlvl6, this.f10320).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl6 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl5, this.f10320).f10499 = true;
                C3549.m8186(R.string.contextpattlvl4, this.f10320).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_dex_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_signature_verification_kill_option, this.f10320).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_signature_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_dex_verification_kill_option, this.f10320).f10499 = false;
            }
            this.f10320.notifyDataSetChanged();
        }
    }

    public class C3625 implements AdapterView.OnItemClickListener {

        final ArrayAdapter f10321;

        C3625(ArrayAdapter arrayAdapter) {
            this.f10321 = arrayAdapter;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3727 c3727 = (C3727) this.f10321.getItem(i);
            if (c3727.f10499) {
                c3727.f10499 = false;
            } else {
                c3727.f10499 = true;
                c3727.f10504 = null;
            }
            if (c3727.f10494 == R.string.context_dex_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_signature_verification_kill_option, this.f10321).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_signature_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_dex_verification_kill_option, this.f10321).f10499 = false;
            }
            this.f10321.notifyDataSetChanged();
        }
    }

    public class RunnableC3626 implements Runnable {

        final ArrayList f10322;

        final boolean f10323;

        class C3627 implements AdapterView.OnItemClickListener {
            C3627() {
            }

            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
                C2975 c2975 = C2975.f9245;
                if (c2975 != null) {
                    c2975.m8049(((C3727) RunnableC3626.this.f10322.get(i)).f10494);
                }
            }
        }

        RunnableC3626(ArrayList arrayList, boolean z) {
            this.f10322 = arrayList;
            this.f10323 = z;
        }

        @Override
        public void run() {
            C2975 c2975 = C2975.f9245;
            if (c2975 != null) {
                C2913 c2913 = new C2913(c2975.mo1874());
                ArrayAdapter m8184 = C3549.m8184(this.f10322, this.f10323);
                if (m8184 != null) {
                    m8184.setNotifyOnChange(true);
                    c2913.m7863(false);
                    c2913.m7862(m8184, new C3627());
                }
                c2913.m7851().show();
            }
        }
    }

    public class DialogInterfaceOnClickListenerC3628 implements DialogInterface.OnClickListener {

        final ArrayAdapter f10325;

        final File f10326;

        DialogInterfaceOnClickListenerC3628(ArrayAdapter arrayAdapter, File file) {
            this.f10325 = arrayAdapter;
            this.f10326 = file;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2597 c2597 = new C2597();
            int count = this.f10325.getCount();
            for (int i2 = 0; i2 < count; i2++) {
                C3727 c3727 = (C3727) this.f10325.getItem(i2);
                if (c3727.f10499) {
                    switch (c3727.f10494) {
                        case R.string.change_compileSDK:
                            if (c3727.f10508) {
                                c2597.f7281 = Integer.valueOf(c3727.f10507).intValue();
                                break;
                            } else {
                                break;
                            }
                        case R.string.change_minimumSDK:
                            if (c3727.f10508) {
                                c2597.f7352 = Integer.valueOf(c3727.f10507).intValue();
                                break;
                            } else {
                                break;
                            }
                        case R.string.change_sharedUserId:
                            c2597.f7283 = true;
                            break;
                        case R.string.change_targetSDK:
                            if (c3727.f10508) {
                                c2597.f7282 = Integer.valueOf(c3727.f10507).intValue();
                                break;
                            } else {
                                break;
                            }
                        case R.string.change_version_code:
                            if (c3727.f10508) {
                                try {
                                    c2597.f7336 = Integer.valueOf(c3727.f10507).intValue();
                                    break;
                                } catch (Throwable unused) {
                                    break;
                                }
                            } else {
                                break;
                            }
                        case R.string.context_dex_verification_kill_option:
                            c2597.f7292 = true;
                            break;
                        case R.string.context_signature_verification_kill_option:
                            c2597.f7290 = true;
                            break;
                        case R.string.context_use_zip_crc_image:
                            c2597.f7304 = true;
                            File file = c3727.f10504;
                            if (file != null) {
                                c2597.f7306 = file;
                                break;
                            } else {
                                break;
                            }
                        case R.string.create_clone_new_app_name:
                            if (c3727.f10508) {
                                c2597.f7350 = c3727.f10507;
                                break;
                            } else {
                                break;
                            }
                    }
                }
            }
            c2597.f7323 = true;
            c2597.f7342 = true;
            c2597.f7329 = this.f10326;
            C2975.m7953(C2975.f9253, c2597);
        }
    }

    public class C3629 extends ArrayAdapter<C3727> {

        class ViewOnClickListenerC3630 implements View.OnClickListener {

            final EditText f10327;

            final Integer f10328;

            ViewOnClickListenerC3630(EditText editText, Integer num) {
                this.f10327 = editText;
                this.f10328 = num;
            }

            @Override
            public void onClick(View view) {
                this.f10327.setText("" + this.f10328);
            }
        }

        C3629(Context context, int i, List list) {
            super(context, i, list);
        }

        @Override
        public View getView(int i, View view, ViewGroup viewGroup) {
            C3727 c3727 = (C3727) getItem(i);
            View inflate = ((LayoutInflater) C2975.m7929().getSystemService("layout_inflater")).inflate(R.layout.selectpatch, viewGroup, false);
            TextView textView = (TextView) inflate.findViewById(R.id.txtTitle);
            TextView textView2 = (TextView) inflate.findViewById(R.id.txtStatus);
            CheckBox checkBox = (CheckBox) inflate.findViewById(R.id.CheckBox1);
            Button button = (Button) inflate.findViewById(R.id.button_browse);
            TextView textView3 = (TextView) inflate.findViewById(R.id.file_name);
            EditText editText = (EditText) inflate.findViewById(R.id.text_editor);
            Button button2 = (Button) inflate.findViewById(R.id.button_max);
            if (((C3727) getItem(i)).f10500) {
                textView.setTextAppearance(getContext(), C2975.m7934());
                textView.setTextColor(-1);
                textView.setText(C2500.m6934(c3727.f10495, c3727.f10498, "bold"));
                textView.setTypeface(null, 1);
                LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) textView.getLayoutParams();
                layoutParams.setMargins(10, 5, 0, 5);
                textView.setLayoutParams(layoutParams);
                inflate.setBackgroundColor(-12303292);
                checkBox.setVisibility(8);
                textView2.setVisibility(8);
            } else {
                textView.setTextAppearance(getContext(), C2975.m7934());
                textView2.setTextAppearance(getContext(), C2975.m7934());
                checkBox.setChecked(c3727.f10499);
                checkBox.setClickable(false);
                textView2.setTextAppearance(getContext(), android.R.style.TextAppearance.Small);
                textView2.setTextColor(-7829368);
                textView.setTextColor(-1);
                textView.setText(C2500.m6934(c3727.f10495, c3727.f10498, "bold"));
                textView.setTypeface(null, 1);
                int i2 = c3727.f10496;
                if (i2 != 0) {
                    textView2.append(C2500.m6934(C2500.m7007(i2), "#ff888888", "italic"));
                    textView2.setVisibility(0);
                }
                if (((C3727) getItem(i)).f10499 && !((C3727) getItem(i)).f10507.equals("")) {
                    if (((C3727) getItem(i)).f10510 != null) {
                        editText.setFilters(new InputFilter[]{((C3727) getItem(i)).f10510});
                    }
                    if (((C3727) getItem(i)).f10511 != -1) {
                        button2.setVisibility(0);
                        button2.setOnClickListener(new ViewOnClickListenerC3630(editText, Integer.valueOf(((C3727) getItem(i)).f10511)));
                    }
                    editText.setVisibility(0);
                    editText.setText(((C3727) getItem(i)).f10507);
                    editText.setSelection(editText.getText().length());
                    editText.requestFocus();
                    editText.addTextChangedListener(((C3727) getItem(i)).f10509);
                }
                if (c3727.f10499 && c3727.f10505 != 0) {
                    File file = c3727.f10504;
                    if (file != null) {
                        textView3.setText(file.getName());
                        textView3.setVisibility(0);
                        button.setVisibility(8);
                    } else {
                        button.setVisibility(0);
                        button.setText(C2500.m7007(c3727.f10505));
                        button.setOnClickListener(c3727.f10506);
                    }
                } else {
                    button.setVisibility(8);
                }
            }
            return inflate;
        }
    }

    public class ViewOnClickListenerC3631 implements View.OnClickListener {

        final C3727[] f10330;

        final ArrayAdapter[] f10331;

        class RunnableC3632 implements Runnable {

            final File[] f10332;

            RunnableC3632(File[] fileArr) {
                this.f10332 = fileArr;
            }

            @Override
            public void run() {
                ViewOnClickListenerC3631 viewOnClickListenerC3631 = ViewOnClickListenerC3631.this;
                C3727 c3727 = viewOnClickListenerC3631.f10330[0];
                if (c3727 != null) {
                    c3727.f10504 = this.f10332[0];
                }
                ArrayAdapter arrayAdapter = viewOnClickListenerC3631.f10331[0];
                if (arrayAdapter != null) {
                    arrayAdapter.notifyDataSetChanged();
                }
            }
        }

        ViewOnClickListenerC3631(C3727[] c3727Arr, ArrayAdapter[] arrayAdapterArr) {
            this.f10330 = c3727Arr;
            this.f10331 = arrayAdapterArr;
        }

        @Override
        public void onClick(View view) {
            this.f10330[0].f10504 = null;
            File[] fileArr = {null};
            C3549.m8176(fileArr, new RunnableC3632(fileArr), "");
        }
    }

    public class RunnableC3633 implements Runnable {

        final ArrayList f10334;

        final boolean f10335;

        final String f10336;

        class C3634 implements AdapterView.OnItemClickListener {
            C3634() {
            }

            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
                C2975 c2975 = C2975.f9245;
                if (c2975 != null) {
                    c2975.m8049(((C3727) RunnableC3633.this.f10334.get(i)).f10494);
                }
            }
        }

        RunnableC3633(ArrayList arrayList, boolean z, String str) {
            this.f10334 = arrayList;
            this.f10335 = z;
            this.f10336 = str;
        }

        @Override
        public void run() {
            C2975 c2975 = C2975.f9245;
            if (c2975 != null) {
                C2913 c2913 = new C2913(c2975.mo1874());
                ArrayAdapter m8184 = C3549.m8184(this.f10334, this.f10335);
                if (m8184 != null) {
                    m8184.setNotifyOnChange(true);
                    c2913.m7860(this.f10336);
                    c2913.m7863(false);
                    c2913.m7862(m8184, new C3634());
                }
                c2913.m7851().show();
            }
        }
    }

    public class C3635 implements InputFilter {
        C3635() {
        }

        @Override
        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
            while (i < i2) {
                if (!Character.isDigit(charSequence.charAt(i))) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
                try {
                    Integer.valueOf(spanned.toString() + charSequence.toString());
                    i++;
                } catch (Throwable unused) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
            }
            return null;
        }
    }

    public class RunnableC3636 implements Runnable {

        final boolean f10338;

        final String f10339;

        final boolean f10340;

        final int f10341;

        final String f10342;

        RunnableC3636(boolean z, String str, boolean z2, int i, String str2) {
            this.f10338 = z;
            this.f10339 = str;
            this.f10340 = z2;
            this.f10341 = i;
            this.f10342 = str2;
        }

        @Override
        public void run() {
            if (this.f10338) {
                C2975.m7960(25);
            } else {
                C2975.m7960(23);
            }
            C2975.f9277.m8248(this.f10339);
            C2975.f9277.m8245(this.f10340);
            C2975.f9277.m8247(this.f10341);
            C2975.f9277.m8251(this.f10342);
            C2975.f9277.m8246(false, C2975.f9245.mo1874());
        }
    }

    public class C3637 implements AdapterView.OnItemClickListener {

        final ArrayAdapter f10343;

        C3637(ArrayAdapter arrayAdapter) {
            this.f10343 = arrayAdapter;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3727 c3727 = (C3727) this.f10343.getItem(i);
            if (c3727.f10499) {
                c3727.f10499 = false;
            } else {
                c3727.f10499 = true;
            }
            if (c3727.f10494 == R.string.contextpattlvl1 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl2, this.f10343).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl2 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl1, this.f10343).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattamazon && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl1, this.f10343).f10499 = false;
                C3549.m8186(R.string.contextpattlvl2, this.f10343).f10499 = false;
                C3549.m8186(R.string.contextpattlvl3, this.f10343).f10499 = false;
                C3549.m8186(R.string.contextpattsamsung, this.f10343).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattsamsung && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl1, this.f10343).f10499 = false;
                C3549.m8186(R.string.contextpattlvl2, this.f10343).f10499 = false;
                C3549.m8186(R.string.contextpattlvl3, this.f10343).f10499 = false;
                C3549.m8186(R.string.contextpattamazon, this.f10343).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl4 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl5, this.f10343).f10499 = true;
                C3549.m8186(R.string.contextpattlvl6, this.f10343).f10499 = false;
            }
            if (c3727.f10494 == R.string.contextpattlvl6 && c3727.f10499) {
                C3549.m8186(R.string.contextpattlvl5, this.f10343).f10499 = true;
                C3549.m8186(R.string.contextpattlvl4, this.f10343).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_dex_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_signature_verification_kill_option, this.f10343).f10499 = false;
            }
            if (c3727.f10494 == R.string.context_signature_verification_kill_option && c3727.f10499) {
                C3549.m8186(R.string.context_dex_verification_kill_option, this.f10343).f10499 = false;
            }
            this.f10343.notifyDataSetChanged();
        }
    }

    public class C3638 extends ArrayAdapter<C3727> {

        final boolean f10344;

        C3638(Context context, int i, List list, boolean z) {
            super(context, i, list);
            this.f10344 = z;
        }

        @Override
        public View getView(int i, View view, ViewGroup viewGroup) {
            if (view == null) {
                view = ((LayoutInflater) C2975.m7929().getSystemService("layout_inflater")).inflate(R.layout.icon_context_menu, viewGroup, false);
            }
            C3727 c3727 = (C3727) getItem(i);
            TextView textView = (TextView) view.findViewById(R.id.conttext);
            ImageView imageView = (ImageView) view.findViewById(R.id.imgIcon);
            imageView.setImageDrawable(null);
            textView.setTextAppearance(getContext(), C2975.m7934());
            textView.setTextColor(-1);
            Drawable drawable = c3727.f10501;
            if (drawable != null) {
                imageView.setImageDrawable(drawable);
                if (c3727.f10498.equals("")) {
                    imageView.setColorFilter(-1, PorterDuff.Mode.MULTIPLY);
                } else {
                    imageView.setColorFilter(Color.parseColor(c3727.f10498), PorterDuff.Mode.MULTIPLY);
                }
            } else {
                imageView.setVisibility(8);
                textView.setGravity(17);
            }
            if (this.f10344) {
                CheckBox checkBox = (CheckBox) view.findViewById(R.id.CheckBox1);
                checkBox.setVisibility(0);
                checkBox.setChecked(c3727.f10499);
                checkBox.setClickable(false);
            }
            textView.setCompoundDrawablePadding((int) ((C2975.m7933().getDisplayMetrics().density * 5.0f) + 0.5f));
            if (c3727.f10498.equals("")) {
                textView.setTextColor(-1);
            } else {
                textView.setTextColor(Color.parseColor(c3727.f10498));
            }
            textView.setText(c3727.f10495);
            if (c3727.f10496 != 0) {
                textView.append(C2500.m6934("\n" + C2500.m7007(c3727.f10496), "#CCCCCC", ""));
            }
            textView.setTypeface(null, 1);
            return view;
        }
    }

    public class C3639 implements InputFilter {
        C3639() {
        }

        @Override
        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
            while (i < i2) {
                if (!Character.isDigit(charSequence.charAt(i))) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
                try {
                    Integer.valueOf(spanned.toString() + charSequence.toString());
                    i++;
                } catch (Throwable unused) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
            }
            return null;
        }
    }

    class RunnableC3640 implements Runnable {
        RunnableC3640() {
        }

        @Override
        public void run() {
            C2975.m7951(23);
        }
    }

    public class C3641 implements InputFilter {
        C3641() {
        }

        @Override
        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
            while (i < i2) {
                if (!Character.isDigit(charSequence.charAt(i))) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
                try {
                    Integer.valueOf(spanned.toString() + charSequence.toString());
                    i++;
                } catch (Throwable unused) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
            }
            return null;
        }
    }

    public class RunnableC3642 implements Runnable {

        final String f10345;

        final boolean f10346;

        final int f10347;

        final int f10348;

        final String f10349;

        final String f10350;

        class RunnableC3643 implements Runnable {
            RunnableC3643() {
            }

            @Override
            public void run() {
                C3746 c3746 = C2975.f9277;
                if (c3746 != null && c3746.f10540) {
                    C2975.m7951(23);
                    C2975.m7960(25);
                } else {
                    C2975.m7951(23);
                    C2975.m7960(23);
                }
                C3746 c37462 = C2975.f9277;
                if (c37462 != null && c37462.m8243()) {
                    C2975.f9277.m8248(RunnableC3642.this.f10345);
                    C2975.f9277.m8245(RunnableC3642.this.f10346);
                    C2975.f9277.m8249(RunnableC3642.this.f10347);
                    C2975.f9277.m8247(RunnableC3642.this.f10348);
                    C2975.f9277.m8251(RunnableC3642.this.f10349);
                    C2975.f9277.m8246(false, C2975.f9245.mo1874());
                    C2975.f9277.m8250(RunnableC3642.this.f10350);
                }
            }
        }

        RunnableC3642(String str, boolean z, int i, int i2, String str2, String str3) {
            this.f10345 = str;
            this.f10346 = z;
            this.f10347 = i;
            this.f10348 = i2;
            this.f10349 = str2;
            this.f10350 = str3;
        }

        @Override
        public void run() {
            try {
                if (!C2975.f9323.booleanValue()) {
                    C3746 c3746 = C2975.f9277;
                    if (c3746 != null && c3746.m8243()) {
                        C2975.f9277.m8248(this.f10345);
                        C2975.f9277.m8245(this.f10346);
                        C2975.f9277.m8249(this.f10347);
                        C2975.f9277.m8247(this.f10348);
                        C2975.f9277.m8251(this.f10349);
                        C2975.f9277.m8246(false, C2975.f9245.mo1874());
                        C2975.f9277.m8250(this.f10350);
                    } else {
                        C2975.m7954(new RunnableC3643());
                    }
                }
            } catch (Throwable th) {
                th.printStackTrace();
            }
        }
    }

    public class C3644 implements InputFilter {
        C3644() {
        }

        @Override
        public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
            while (i < i2) {
                if (!Character.isDigit(charSequence.charAt(i))) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
                try {
                    Integer.valueOf(spanned.toString() + charSequence.toString());
                    i++;
                } catch (Throwable unused) {
                    Toast.makeText(C2975.m7929(), "Invalid Input", 0).show();
                    return "";
                }
            }
            return null;
        }
    }

    public class RunnableC3645 implements Runnable {
        RunnableC3645() {
        }

        @Override
        public void run() {
            C2975.m7960(11);
        }
    }

    public class C3646 implements AdapterView.OnItemClickListener {

        final ArrayAdapter f10352;

        C3646(ArrayAdapter arrayAdapter) {
            this.f10352 = arrayAdapter;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3727 c3727 = (C3727) this.f10352.getItem(i);
            if (c3727.f10499) {
                c3727.f10499 = false;
            } else {
                int i2 = c3727.f10494;
                if (i2 == R.string.context_use_installed_apk_for_original_signature) {
                    c3727.f10499 = true;
                    int i3 = 0;
                    while (true) {
                        if (i3 >= this.f10352.getCount()) {
                            break;
                        }
                        if (((C3727) this.f10352.getItem(i3)).f10494 == R.string.context_use_apk_for_original_signature) {
                            ((C3727) this.f10352.getItem(i3)).f10499 = false;
                            break;
                        }
                        i3++;
                    }
                } else if (i2 == R.string.context_use_apk_for_original_signature) {
                    c3727.f10499 = true;
                    int i4 = 0;
                    while (true) {
                        if (i4 >= this.f10352.getCount()) {
                            break;
                        }
                        if (((C3727) this.f10352.getItem(i4)).f10494 == R.string.context_use_installed_apk_for_original_signature) {
                            ((C3727) this.f10352.getItem(i4)).f10499 = false;
                            ((C3727) this.f10352.getItem(i4)).f10504 = null;
                            break;
                        }
                        i4++;
                    }
                } else {
                    c3727.f10499 = true;
                }
            }
            this.f10352.notifyDataSetChanged();
        }
    }

    public class RunnableC3647 implements Runnable {
        RunnableC3647() {
        }

        @Override
        public void run() {
            C2975.m7951(11);
        }
    }

    public class DialogInterfaceOnClickListenerC3648 implements DialogInterface.OnClickListener {

        final ArrayAdapter f10353;

        final File f10354;

        final File f10355;

        DialogInterfaceOnClickListenerC3648(ArrayAdapter arrayAdapter, File file, File file2) {
            this.f10353 = arrayAdapter;
            this.f10354 = file;
            this.f10355 = file2;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2597 c2597 = new C2597();
            int count = this.f10353.getCount();
            for (int i2 = 0; i2 < count; i2++) {
                C3727 c3727 = (C3727) this.f10353.getItem(i2);
                if (c3727.f10499) {
                    switch (c3727.f10494) {
                        case R.string.change_compileSDK:
                            if (c3727.f10508) {
                                c2597.f7281 = Integer.valueOf(c3727.f10507).intValue();
                                break;
                            } else {
                                break;
                            }
                        case R.string.change_minimumSDK:
                            if (c3727.f10508) {
                                c2597.f7352 = Integer.valueOf(c3727.f10507).intValue();
                                break;
                            } else {
                                break;
                            }
                        case R.string.change_targetSDK:
                            if (c3727.f10508) {
                                c2597.f7282 = Integer.valueOf(c3727.f10507).intValue();
                                break;
                            } else {
                                break;
                            }
                        case R.string.change_version_code:
                            if (c3727.f10508) {
                                try {
                                    c2597.f7336 = Integer.valueOf(c3727.f10507).intValue();
                                    break;
                                } catch (Throwable unused) {
                                    break;
                                }
                            } else {
                                break;
                            }
                        case R.string.context_use_apk_for_original_signature:
                            c2597.f7304 = true;
                            File file = c3727.f10504;
                            if (file != null) {
                                c2597.f7303 = file;
                                break;
                            } else {
                                break;
                            }
                        case R.string.context_use_installed_apk_for_original_signature:
                            c2597.f7304 = true;
                            File file2 = this.f10354;
                            if (file2 != null) {
                                c2597.f7303 = file2;
                                break;
                            } else {
                                break;
                            }
                        case R.string.create_clone_new_app_name:
                            if (c3727.f10508) {
                                c2597.f7350 = c3727.f10507;
                                break;
                            } else {
                                break;
                            }
                    }
                }
            }
            c2597.f7302 = true;
            c2597.f7323 = true;
            c2597.f7342 = true;
            c2597.f7329 = this.f10355;
            C2975.m7953(C2975.f9253, c2597);
        }
    }

    public class DialogInterfaceOnClickListenerC3649 implements DialogInterface.OnClickListener {

        final boolean f10356;

        final File f10357;

        final ArrayAdapter f10358;

        DialogInterfaceOnClickListenerC3649(boolean z, File file, ArrayAdapter arrayAdapter) {
            this.f10356 = z;
            this.f10357 = file;
            this.f10358 = arrayAdapter;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2597 c2597 = new C2597();
            c2597.f7342 = this.f10356;
            c2597.f7329 = this.f10357;
            int count = this.f10358.getCount();
            for (int i2 = 0; i2 < count; i2++) {
                C3727 c3727 = (C3727) this.f10358.getItem(i2);
                if (c3727.f10499) {
                    switch (c3727.f10494) {
                        case R.string.context_crt_apk_permission:
                            c2597.f7317 = true;
                            c2597.f7325 = true;
                            break;
                        case R.string.context_support_patch:
                            c2597.f7311 = true;
                            c2597.f7325 = true;
                            break;
                        case R.string.contextads:
                            c2597.f7305 = true;
                            c2597.f7325 = true;
                            break;
                        case R.string.contextcustompatch:
                            c2597.f7313 = true;
                            c2597.f7325 = true;
                            break;
                        case R.string.contextignore:
                            c2597.f7309 = true;
                            c2597.f7325 = true;
                            break;
                    }
                }
            }
            c2597.f7329 = this.f10357;
            C2975.f9245.m8067(c2597, this.f10356);
        }
    }

    public class C3650 implements AdapterView.OnItemClickListener {

        final ArrayAdapter f10359;

        C3650(ArrayAdapter arrayAdapter) {
            this.f10359 = arrayAdapter;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3727 c3727 = (C3727) this.f10359.getItem(i);
            if (c3727.f10499) {
                c3727.f10499 = false;
            } else {
                c3727.f10499 = true;
            }
            if (c3727.f10494 == R.string.create_clone_option2 && c3727.f10499) {
                C3549.m8186(R.string.create_clone_option1, this.f10359).f10499 = false;
            }
            if (c3727.f10494 == R.string.create_clone_option1 && c3727.f10499) {
                C3549.m8186(R.string.create_clone_option2, this.f10359).f10499 = false;
            }
            this.f10359.notifyDataSetChanged();
        }
    }

    public class DialogInterfaceOnClickListenerC3651 implements DialogInterface.OnClickListener {

        final C2637 f10360;

        final C2913 f10361;

        class DialogInterfaceOnClickListenerC3652 implements DialogInterface.OnClickListener {
            DialogInterfaceOnClickListenerC3652() {
            }

            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                C2637 c2637 = DialogInterfaceOnClickListenerC3651.this.f10360;
                if (c2637 != null) {
                    c2637.m7281();
                    DialogInterfaceOnClickListenerC3651.this.f10361.m7853();
                }
            }
        }

        DialogInterfaceOnClickListenerC3651(C2637 c2637, C2913 c2913) {
            this.f10360 = c2637;
            this.f10361 = c2913;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2500.m7125(C2500.m7007(R.string.warning), C2500.m7007(R.string.purchases_sorter_reset_warning_message), new DialogInterfaceOnClickListenerC3652(), null, null);
        }
    }

    public class DialogInterfaceOnClickListenerC3653 implements DialogInterface.OnClickListener {

        final ArrayAdapter f10363;

        final File f10364;

        DialogInterfaceOnClickListenerC3653(ArrayAdapter arrayAdapter, File file) {
            this.f10363 = arrayAdapter;
            this.f10364 = file;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2597 c2597 = new C2597();
            int count = this.f10363.getCount();
            String str = "1";
            for (int i2 = 0; i2 < count; i2++) {
                C3727 c3727 = (C3727) this.f10363.getItem(i2);
                if (c3727.f10499) {
                    switch (c3727.f10494) {
                        case R.string.change_sharedUserId:
                            str = str + "ChangeSharedUserId_";
                            break;
                        case R.string.context_dex_verification_kill_option:
                            c2597.f7292 = true;
                            break;
                        case R.string.context_original_resign_app:
                            c2597.f7302 = true;
                            break;
                        case R.string.context_signature_verification_kill_option:
                            c2597.f7290 = true;
                            break;
                        case R.string.context_use_zip_crc_image:
                            c2597.f7304 = true;
                            break;
                        case R.string.create_clone_new_app_name:
                            if (c3727.f10508) {
                                c2597.f7350 = c3727.f10507;
                                break;
                            } else {
                                break;
                            }
                        case R.string.create_clone_option1:
                            str = str + "onlyManifest_";
                            break;
                        case R.string.create_clone_option2:
                            str = str + "DeepWork_";
                            break;
                    }
                }
            }
            c2597.f7322 = str;
            c2597.f7315 = true;
            c2597.f7342 = true;
            c2597.f7329 = this.f10364;
            C2975.m7953(C2975.f9253, c2597);
        }
    }

    public class DialogInterfaceOnClickListenerC3654 implements DialogInterface.OnClickListener {

        final C2597 f10365;

        final int f10366;

        final boolean[] f10367;

        final boolean[] f10368;

        final boolean[] f10369;

        final boolean[] f10370;

        final boolean f10371;

        DialogInterfaceOnClickListenerC3654(C2597 c2597, int i, boolean[] zArr, boolean[] zArr2, boolean[] zArr3, boolean[] zArr4, boolean z) {
            this.f10365 = c2597;
            this.f10366 = i;
            this.f10367 = zArr;
            this.f10368 = zArr2;
            this.f10369 = zArr3;
            this.f10370 = zArr4;
            this.f10371 = z;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            ArrayList<String> arrayList = new ArrayList<>();
            ArrayList<String> arrayList2 = new ArrayList<>();
            for (int i2 = 0; i2 < C2975.f9265.f9124.size(); i2++) {
                C3477 c3477 = C2975.f9265.f9124.get(i2);
                if (!c3477.f10045 && !c3477.f10044.contains("chelpus_")) {
                    arrayList.add(c3477.f10044);
                }
                if (c3477.f10045 && c3477.f10044.startsWith("chelpa_per_")) {
                    arrayList.add(c3477.f10044.replace("chelpa_per_", ""));
                    C2975.m7942(c3477.f10044.replace("chelpa_per_", ""));
                }
                if (!c3477.f10045 && c3477.f10044.contains("chelpus_") && !c3477.f10044.contains("disabled_")) {
                    C2975.m7942("add activity to list:" + c3477.f10044);
                    arrayList2.add(c3477.f10044.replace("chelpus_", ""));
                    C2975.m7942("" + c3477.f10044.replace("chelpus_", ""));
                }
                if (c3477.f10045 && c3477.f10044.contains("chelpus_disabled_")) {
                    arrayList2.add(c3477.f10044.replace("chelpus_", ""));
                    C2975.m7942("" + c3477.f10044.replace("chelpus_", ""));
                }
            }
            C2597 c2597 = new C2597();
            C2597 c25972 = this.f10365;
            if (c25972 != null) {
                c2597 = c25972;
            }
            c2597.f7284 = arrayList;
            c2597.f7285 = arrayList2;
            int i3 = this.f10366;
            if (i3 == R.string.context_crt_apk_permission) {
                c2597.f7317 = true;
                c2597.f7342 = true;
            }
            if (i3 == R.string.context_safe_sign_apk_permission) {
                c2597.f7319 = true;
                c2597.f7342 = true;
            }
            if (!C2975.f9282.equals("")) {
                c2597.f7329 = new File(C2975.f9282);
            }
            if (this.f10367[0]) {
                c2597.f7292 = true;
            }
            if (this.f10368[0]) {
                c2597.f7290 = true;
            }
            if (this.f10369[0]) {
                c2597.f7304 = true;
            }
            if (this.f10370[0]) {
                c2597.f7302 = true;
            }
            if (this.f10365 != null) {
                C2975.f9245.m8067(c2597, this.f10371);
            } else {
                C2975.m7953(C2975.f9253, c2597);
            }
        }
    }

    public class C3655 implements CompoundButton.OnCheckedChangeListener {

        final C2913 f10372;

        final boolean[] f10373;

        final boolean[] f10374;

        C3655(C2913 c2913, boolean[] zArr, boolean[] zArr2) {
            this.f10372 = c2913;
            this.f10373 = zArr;
            this.f10374 = zArr2;
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                this.f10372.m7857().setChecked(false);
                this.f10373[0] = true;
                this.f10374[0] = false;
                return;
            }
            this.f10373[0] = false;
        }
    }

    public class C3656 implements CompoundButton.OnCheckedChangeListener {

        final C2913 f10375;

        final boolean[] f10376;

        final boolean[] f10377;

        C3656(C2913 c2913, boolean[] zArr, boolean[] zArr2) {
            this.f10375 = c2913;
            this.f10376 = zArr;
            this.f10377 = zArr2;
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                this.f10375.m7857().setChecked(false);
                this.f10376[0] = true;
                this.f10377[0] = false;
                return;
            }
            this.f10376[0] = false;
        }
    }

    public class C3657 implements CompoundButton.OnCheckedChangeListener {

        final C2913 f10378;

        final boolean[] f10379;

        final boolean[] f10380;

        C3657(C2913 c2913, boolean[] zArr, boolean[] zArr2) {
            this.f10378 = c2913;
            this.f10379 = zArr;
            this.f10380 = zArr2;
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                this.f10378.m7855().setChecked(false);
                this.f10379[0] = false;
                this.f10380[0] = true;
                return;
            }
            this.f10380[0] = false;
        }
    }

    public class RunnableC3658 implements Runnable {
        RunnableC3658() {
        }

        @Override
        public void run() {
            if (C2975.f9245 != null) {
                C2975.m7962(C2500.m7007(R.string.error), C2500.m7007(R.string.warning_for_no_free_space_on_device_to_patch));
            }
        }
    }

    public class C3659 implements CompoundButton.OnCheckedChangeListener {

        final boolean[] f10381;

        C3659(boolean[] zArr) {
            this.f10381 = zArr;
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                this.f10381[0] = true;
            } else {
                this.f10381[0] = false;
            }
        }
    }

    public class DialogInterfaceOnClickListenerC3660 implements DialogInterface.OnClickListener {

        final ArrayAdapter f10382;

        final boolean f10383;

        final File f10384;

        DialogInterfaceOnClickListenerC3660(ArrayAdapter arrayAdapter, boolean z, File file) {
            this.f10382 = arrayAdapter;
            this.f10383 = z;
            this.f10384 = file;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2597 c2597 = new C2597();
            int count = this.f10382.getCount();
            String str = "1";
            for (int i2 = 0; i2 < count; i2++) {
                C3727 c3727 = (C3727) this.f10382.getItem(i2);
                if (c3727.f10499) {
                    switch (c3727.f10494) {
                        case R.string.context_dex_verification_kill_option:
                            c2597.f7292 = true;
                            break;
                        case R.string.context_original_resign_app:
                            c2597.f7302 = true;
                            break;
                        case R.string.context_signature_verification_kill_option:
                            c2597.f7290 = true;
                            break;
                        case R.string.context_use_zip_crc_image:
                            c2597.f7304 = true;
                            break;
                        case R.string.contextpatt1:
                            str = str + "pattern1_";
                            break;
                        case R.string.contextpatt2:
                            str = str + "pattern2_";
                            break;
                        case R.string.contextpatt3:
                            str = str + "pattern3_";
                            break;
                        case R.string.contextpatt4:
                            str = str + "pattern4_";
                            break;
                        case R.string.contextpatt5:
                            str = str + "pattern5_";
                            break;
                        case R.string.contextpatt6:
                            str = str + "pattern6_";
                            break;
                        case R.string.contextpattlvl4:
                            c2597.f7344 = true;
                            break;
                        case R.string.contextpattlvl5:
                            c2597.f7330 = true;
                            break;
                        case R.string.contextpattlvl6:
                            c2597.f7332 = true;
                            break;
                    }
                }
            }
            c2597.f7318 = str;
            c2597.f7309 = true;
            c2597.f7342 = this.f10383;
            c2597.f7329 = this.f10384;
            C2975.m7953(C2975.f9253, c2597);
        }
    }

    public class DialogInterfaceOnClickListenerC3661 implements DialogInterface.OnClickListener {

        final C2597 f10385;

        final ArrayAdapter f10386;

        final boolean f10387;

        final File f10388;

        DialogInterfaceOnClickListenerC3661(C2597 c2597, ArrayAdapter arrayAdapter, boolean z, File file) {
            this.f10385 = c2597;
            this.f10386 = arrayAdapter;
            this.f10387 = z;
            this.f10388 = file;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            C2597 c2597 = new C2597();
            C2597 c25972 = this.f10385;
            if (c25972 != null) {
                c2597 = c25972;
            }
            int count = this.f10386.getCount();
            String str = "1";
            for (int i2 = 0; i2 < count; i2++) {
                C3727 c3727 = (C3727) this.f10386.getItem(i2);
                if (c3727.f10499) {
                    switch (c3727.f10494) {
                        case R.string.context_dependencies:
                            str = str + "dependencies_";
                            break;
                        case R.string.context_dex_verification_kill_option:
                            c2597.f7292 = true;
                            break;
                        case R.string.context_original_resign_app:
                            c2597.f7302 = true;
                            break;
                        case R.string.context_signature_verification_kill_option:
                            c2597.f7290 = true;
                            break;
                        case R.string.context_use_zip_crc_image:
                            c2597.f7304 = true;
                            break;
                        case R.string.contextpattamazon:
                            str = str + "amazon_";
                            break;
                        case R.string.contextpattlvl1:
                            str = "pattern1_pattern2_pattern3_pattern5_";
                            break;
                        case R.string.contextpattlvl2:
                            str = "pattern1_pattern2_pattern3_pattern6_";
                            break;
                        case R.string.contextpattlvl3:
                            str = str + "pattern4_";
                            break;
                        case R.string.contextpattlvl4:
                            c2597.f7344 = true;
                            break;
                        case R.string.contextpattlvl5:
                            c2597.f7330 = true;
                            break;
                        case R.string.contextpattlvl6:
                            c2597.f7332 = true;
                            break;
                        case R.string.contextpattlvl_dex:
                            c2597.f7296 = true;
                            str = "use_lic_hack_integrate_";
                            break;
                        case R.string.contextpattsamsung:
                            str = str + "samsung_";
                            break;
                    }
                }
            }
            c2597.f7318 = str;
            c2597.f7309 = true;
            boolean z = this.f10387;
            c2597.f7342 = z;
            c2597.f7329 = this.f10388;
            if (this.f10385 == null) {
                C2975.m7953(C2975.f9253, c2597);
            } else {
                C2975.f9245.m8067(c2597, z);
            }
        }
    }

    public class RunnableC3662 implements Runnable {

        final C2913 f10389;

        class C3663 implements Comparator<C2939> {

            final int f10390;

            C3663(int i) {
                this.f10390 = i;
            }

            @Override
            public int compare(C2939 c2939, C2939 c29392) {
                boolean z = c2939.f9158;
                if (z && c29392.f9158) {
                    return Long.valueOf(c29392.f9160).compareTo(Long.valueOf(c2939.f9160));
                }
                if (c29392.f9158) {
                    return 1;
                }
                if (z) {
                    return -1;
                }
                if (this.f10390 != 1) {
                    return Integer.valueOf(c2939.f9155).compareTo(Integer.valueOf(c29392.f9155));
                }
                return Long.valueOf(c29392.f9160).compareTo(Long.valueOf(c2939.f9160));
            }
        }

        class C3664 implements Comparator<C2942> {
            C3664() {
            }

            @Override
            public int compare(C2942 c2942, C2942 c29422) {
                return c2942.f9181.compareTo(c29422.f9181);
            }
        }

        class C3665 implements Comparator<C2942> {
            C3665() {
            }

            @Override
            public int compare(C2942 c2942, C2942 c29422) {
                return c29422.f9179.compareTo(c2942.f9179);
            }
        }

        class RunnableC3666 implements Runnable {

            final C2943 f10394;

            RunnableC3666(C2943 c2943) {
                this.f10394 = c2943;
            }

            @Override
            public void run() {
                this.f10394.notifyDataSetChanged();
            }
        }

        class DialogInterfaceOnClickListenerC3667 implements DialogInterface.OnClickListener {

            final C2943 f10396;

            class C3668 implements RadioGroup.OnCheckedChangeListener {

                class C3669 implements Comparator<C2942> {
                    C3669() {
                    }

                    @Override
                    public int compare(C2942 c2942, C2942 c29422) {
                        return c2942.f9181.compareTo(c29422.f9181);
                    }
                }

                class C3670 implements Comparator<C2942> {
                    C3670() {
                    }

                    @Override
                    public int compare(C2942 c2942, C2942 c29422) {
                        return c29422.f9179.compareTo(c2942.f9179);
                    }
                }

                class C3671 implements Comparator<C2939> {

                    final int f10401;

                    C3671(int i) {
                        this.f10401 = i;
                    }

                    @Override
                    public int compare(C2939 c2939, C2939 c29392) {
                        boolean z = c2939.f9158;
                        if (z && c29392.f9158) {
                            return Long.valueOf(c29392.f9160).compareTo(Long.valueOf(c2939.f9160));
                        }
                        if (c29392.f9158) {
                            return 1;
                        }
                        if (z) {
                            return -1;
                        }
                        if (this.f10401 != 1) {
                            return Integer.valueOf(c2939.f9155).compareTo(Integer.valueOf(c29392.f9155));
                        }
                        return Long.valueOf(c29392.f9160).compareTo(Long.valueOf(c2939.f9160));
                    }
                }

                C3668() {
                }

                @Override
                public void onCheckedChanged(RadioGroup radioGroup, int i) {
                    int i2;
                    switch (i) {
                        case R.id.radioSortName:
                            C2975.m7928().edit().putInt("backups_sorting", 0).commit();
                            DialogInterfaceOnClickListenerC3667.this.f10396.m7905(new C3669());
                            i2 = 0;
                            break;
                        case R.id.radioSortTime:
                            C2975.m7928().edit().putInt("backups_sorting", 1).commit();
                            DialogInterfaceOnClickListenerC3667.this.f10396.m7905(new C3670());
                            i2 = 1;
                            break;
                        default:
                            i2 = 99;
                            break;
                    }
                    for (C2942 c2942 : DialogInterfaceOnClickListenerC3667.this.f10396.f9183) {
                        List list = c2942.f9170;
                        if (list != null && list.size() > 1) {
                            Collections.sort(c2942.f9170, new C3671(i2));
                        }
                    }
                }
            }

            DialogInterfaceOnClickListenerC3667(C2943 c2943) {
                this.f10396 = c2943;
            }

            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                C2913 c2913 = new C2913(C2975.f9245.mo1874());
                c2913.m7860(C2500.m7007(R.string.settings));
                c2913.m7875(C2500.m7007(R.string.close), null);
                LinearLayout linearLayout = (LinearLayout) View.inflate(C2975.f9259, R.layout.backups_settings, null);
                ((TextView) linearLayout.findViewById(R.id.titleSort)).setText(C2500.m7007(R.string.sortmenu));
                RadioButton radioButton = (RadioButton) linearLayout.findViewById(R.id.radioSortName);
                RadioButton radioButton2 = (RadioButton) linearLayout.findViewById(R.id.radioSortTime);
                radioButton.setText(C2500.m7007(R.string.sortbyname));
                radioButton2.setText(C2500.m7007(R.string.sortbydate));
                int i2 = C2975.m7928().getInt("backups_sorting", 0);
                if (i2 != 0) {
                    if (i2 == 1) {
                        radioButton.setChecked(false);
                        radioButton2.setChecked(true);
                    }
                } else {
                    radioButton.setChecked(true);
                    radioButton2.setChecked(false);
                }
                c2913.m7858(linearLayout);
                ((RadioGroup) linearLayout.findViewById(R.id.radioGroupSortBackups)).setOnCheckedChangeListener(new C3668());
                c2913.m7851().show();
            }
        }

        class RunnableC3672 implements Runnable {
            RunnableC3672() {
            }

            @Override
            public void run() {
                RunnableC3662.this.f10389.m7851().show();
            }
        }

        RunnableC3662(C2913 c2913) {
            this.f10389 = c2913;
        }

        @Override
        public void run() {
            C2939 c2939;
            String str;
            File[] fileArr;
            int i;
            int i2;
            String name;
            Drawable m6957;
            boolean z;
            File[] listFiles;
            C2942 c2942;
            List list;
            int length;
            int i3;
            String str2;
            File[] fileArr2;
            File file;
            int i4;
            C2942 c29422;
            int i5;
            File[] listFiles2;
            File[] fileArr3;
            int i6;
            int i7;
            int i8;
            File[] fileArr4;
            C2942 c29423;
            String str3;
            File file2;
            String str4;
            ArrayList arrayList = new ArrayList();
            ArrayList arrayList2 = new ArrayList();
            if (new File(C2975.f9251 + "/Backup/Data").exists()) {
                File[] listFiles3 = new File(C2975.f9251 + "/Backup/Data").listFiles();
                if (listFiles3 != null && listFiles3.length != 0) {
                    int length2 = listFiles3.length;
                    int i9 = 0;
                    while (i9 < length2) {
                        File file3 = listFiles3[i9];
                        if (file3.isDirectory()) {
                            String str5 = "dd-MM-yyyy HH:mm";
                            String str6 = ".lpbkp";
                            if (arrayList2.contains(file3.getName())) {
                                Iterator it = arrayList.iterator();
                                while (it.hasNext()) {
                                    C2942 c29424 = (C2942) it.next();
                                    if (c29424.f9180.equals(file3.getName()) && (listFiles2 = file3.listFiles()) != null && listFiles2.length > 0) {
                                        int length3 = listFiles2.length;
                                        int i10 = 0;
                                        boolean z2 = false;
                                        while (i10 < length3) {
                                            File file4 = listFiles2[i10];
                                            if (!z2 && file4.isFile() && file4.getAbsolutePath().endsWith(str6)) {
                                                SimpleDateFormat simpleDateFormat = new SimpleDateFormat(str5);
                                                fileArr3 = listFiles3;
                                                StringBuilder sb = new StringBuilder();
                                                sb.append("");
                                                i6 = length2;
                                                i8 = length3;
                                                fileArr4 = listFiles2;
                                                sb.append(simpleDateFormat.format(new Date(file4.lastModified())));
                                                String sb2 = sb.toString();
                                                c29423 = c29424;
                                                str3 = str6;
                                                i7 = i9;
                                                file2 = file3;
                                                str4 = str5;
                                                C2939 c29392 = new C2939(file3.getName(), file3, sb2, file4.lastModified());
                                                if (c29423.f9179.longValue() < file4.lastModified()) {
                                                    c29423.f9179 = Long.valueOf(file4.lastModified());
                                                }
                                                C2500.m7106(c29392, file2);
                                                C2975.m7942("add old bkp");
                                                c29423.f9170.add(c29392);
                                                z2 = true;
                                            } else {
                                                fileArr3 = listFiles3;
                                                i6 = length2;
                                                i7 = i9;
                                                i8 = length3;
                                                fileArr4 = listFiles2;
                                                c29423 = c29424;
                                                str3 = str6;
                                                file2 = file3;
                                                str4 = str5;
                                            }
                                            if (file4.isDirectory()) {
                                                C2939 c29393 = new C2939(file2.getName(), file4);
                                                if (c29423.f9179.longValue() < file4.lastModified()) {
                                                    c29423.f9179 = Long.valueOf(file4.lastModified());
                                                }
                                                C2500.m7106(c29393, file4);
                                                C2975.m7942("add new bkp");
                                                c29423.f9170.add(c29393);
                                            }
                                            i10++;
                                            str6 = str3;
                                            file3 = file2;
                                            c29424 = c29423;
                                            str5 = str4;
                                            listFiles3 = fileArr3;
                                            length2 = i6;
                                            listFiles2 = fileArr4;
                                            length3 = i8;
                                            i9 = i7;
                                        }
                                    }
                                    str6 = str6;
                                    file3 = file3;
                                    str5 = str5;
                                    listFiles3 = listFiles3;
                                    length2 = length2;
                                    i9 = i9;
                                }
                            } else {
                                fileArr = listFiles3;
                                i = length2;
                                i2 = i9;
                                String str7 = ".lpbkp";
                                try {
                                    try {
                                        name = C2975.m7932().getPackageInfo(file3.getName(), ItemType.CLASS_DATA_ITEM).applicationInfo.loadLabel(C2975.m7932()).toString();
                                        m6957 = C2975.m7932().getPackageInfo(file3.getName(), ItemType.CLASS_DATA_ITEM).applicationInfo.loadIcon(C2975.m7932());
                                        z = true;
                                    } catch (JSONException unused) {
                                        name = file3.getName();
                                        if (name != null || name.equals("")) {
                                            name = file3.getName();
                                        }
                                        m6957 = C2500.m6957(new File(file3.getAbsoluteFile() + "/icon.png"));
                                        if (m6957 == null) {
                                            m6957 = C2975.m7933().getDrawable(R.mipmap.ic_def_app);
                                        }
                                        z = false;
                                        C2607 c2607 = new C2607(file3.getName(), name);
                                        listFiles = file3.listFiles();
                                        C2942 c29425 = new C2942(c2607);
                                        if (listFiles != null) {
                                            length = listFiles.length;
                                            boolean z3 = false;
                                            i3 = 0;
                                            while (i3 < length) {
                                            }
                                        }
                                        c2942 = c29425;
                                        c2942.f9178 = z;
                                        if (m6957 != null) {
                                        }
                                        list = c2942.f9170;
                                        if (list == null) {
                                            arrayList.add(c2942);
                                            arrayList2.add(file3.getName());
                                        }
                                        i9 = i2 + 1;
                                        listFiles3 = fileArr;
                                        length2 = i;
                                    }
                                } catch (PackageManager.NameNotFoundException unused2) {
                                    name = C2500.m7055(new File(file3.getAbsoluteFile() + "/info.json"));
                                    if (name != null) {
                                    }
                                    name = file3.getName();
                                    m6957 = C2500.m6957(new File(file3.getAbsoluteFile() + "/icon.png"));
                                    if (m6957 == null) {
                                    }
                                    z = false;
                                    C2607 c26072 = new C2607(file3.getName(), name);
                                    listFiles = file3.listFiles();
                                    C2942 c294252 = new C2942(c26072);
                                    if (listFiles != null) {
                                    }
                                    c2942 = c294252;
                                    c2942.f9178 = z;
                                    if (m6957 != null) {
                                    }
                                    list = c2942.f9170;
                                    if (list == null) {
                                    }
                                    i9 = i2 + 1;
                                    listFiles3 = fileArr;
                                    length2 = i;
                                }
                                C2607 c260722 = new C2607(file3.getName(), name);
                                listFiles = file3.listFiles();
                                C2942 c2942522 = new C2942(c260722);
                                if (listFiles != null && listFiles.length > 0) {
                                    length = listFiles.length;
                                    boolean z32 = false;
                                    i3 = 0;
                                    while (i3 < length) {
                                        File file5 = listFiles[i3];
                                        if (!z32 && file5.isFile() && file5.getAbsolutePath().endsWith(str7)) {
                                            SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("dd-MM-yyyy HH:mm");
                                            StringBuilder sb3 = new StringBuilder();
                                            sb3.append("");
                                            str2 = str7;
                                            i4 = i3;
                                            sb3.append(simpleDateFormat2.format(new Date(file5.lastModified())));
                                            fileArr2 = listFiles;
                                            file = file5;
                                            c29422 = c2942522;
                                            i5 = length;
                                            C2939 c29394 = new C2939(file3.getName(), file3, sb3.toString(), file5.lastModified());
                                            C2500.m7106(c29394, file3);
                                            C2975.m7942("add old2 bkp");
                                            if (c29422.f9179.longValue() < file.lastModified()) {
                                                c29422.f9179 = Long.valueOf(file.lastModified());
                                            }
                                            c260722.f7401.add(c29394);
                                            z32 = true;
                                        } else {
                                            str2 = str7;
                                            fileArr2 = listFiles;
                                            file = file5;
                                            i4 = i3;
                                            c29422 = c2942522;
                                            i5 = length;
                                        }
                                        if (file.isDirectory()) {
                                            File file6 = file;
                                            C2939 c29395 = new C2939(file3.getName(), file6);
                                            C2500.m7106(c29395, file6);
                                            if (c29422.f9179.longValue() < file6.lastModified()) {
                                                c29422.f9179 = Long.valueOf(file6.lastModified());
                                            }
                                            C2975.m7942("add new2 bkp");
                                            c260722.f7401.add(c29395);
                                        }
                                        i3 = i4 + 1;
                                        c2942522 = c29422;
                                        str7 = str2;
                                        length = i5;
                                        listFiles = fileArr2;
                                    }
                                }
                                c2942 = c2942522;
                                c2942.f9178 = z;
                                if (m6957 != null) {
                                    c2942.f9177 = m6957;
                                }
                                list = c2942.f9170;
                                if (list == null && list.size() > 0) {
                                    arrayList.add(c2942);
                                    arrayList2.add(file3.getName());
                                }
                                i9 = i2 + 1;
                                listFiles3 = fileArr;
                                length2 = i;
                            }
                        }
                        fileArr = listFiles3;
                        i = length2;
                        i2 = i9;
                        i9 = i2 + 1;
                        listFiles3 = fileArr;
                        length2 = i;
                    }
                }
            }
            StringBuilder sb4 = new StringBuilder();
            sb4.append(C2975.f9251);
            String str8 = "/Backup";
            sb4.append("/Backup");
            File[] listFiles4 = new File(sb4.toString()).listFiles();
            if (listFiles4 != null && listFiles4.length != 0) {
                int length4 = listFiles4.length;
                int i11 = 0;
                while (i11 < length4) {
                    File file7 = listFiles4[i11];
                    if (!file7.isDirectory()) {
                        try {
                            c2939 = new C2939(C2975.m7929(), file7.getAbsoluteFile(), true);
                        } catch (Exception unused3) {
                        }
                        if (arrayList2.contains(c2939.f9151)) {
                            Iterator it2 = arrayList.iterator();
                            while (it2.hasNext()) {
                                C2942 c29426 = (C2942) it2.next();
                                if (c29426.f9180.equals(c2939.f9151)) {
                                    long longValue = c29426.f9179.longValue();
                                    str = str8;
                                    try {
                                        long j = c2939.f9160;
                                        if (longValue < j) {
                                            c29426.f9179 = Long.valueOf(j);
                                        }
                                        c29426.f9170.add(c2939);
                                        if (c29426.f9180.equals(c29426.f9181) || c29426.f9181.equals("")) {
                                            c29426.f9181 = c2939.f9152;
                                            c29426.f9177 = c2939.f9153;
                                        }
                                    } catch (Exception unused4) {
                                    }
                                } else {
                                    str = str8;
                                }
                                str8 = str;
                            }
                        } else {
                            str = str8;
                            C2607 c26073 = new C2607(c2939.f9151, c2939.f9152);
                            c26073.f7401.add(c2939);
                            C2942 c29427 = new C2942(c26073);
                            long longValue2 = c29427.f9179.longValue();
                            long j2 = c2939.f9160;
                            if (longValue2 < j2) {
                                c29427.f9179 = Long.valueOf(j2);
                            }
                            Drawable drawable = c2939.f9153;
                            if (drawable != null) {
                                c29427.f9177 = drawable;
                            }
                            try {
                                try {
                                    try {
                                        C2975.m7932().getPackageInfo(c2939.f9151, ItemType.CLASS_DATA_ITEM);
                                        c29427.f9178 = true;
                                    } catch (Exception unused5) {
                                    }
                                } catch (PackageManager.NameNotFoundException unused6) {
                                }
                            } catch (PackageManager.NameNotFoundException unused7) {
                            }
                            arrayList.add(c29427);
                            arrayList2.add(c2939.f9151);
                            i11++;
                            str8 = str;
                        }
                    }
                    str = str8;
                    i11++;
                    str8 = str;
                }
                String str9 = str8;
                if (arrayList.size() != 0) {
                    int i12 = C2975.m7928().getInt("backups_sorting", 0);
                    Iterator it3 = arrayList.iterator();
                    while (it3.hasNext()) {
                        C2942 c29428 = (C2942) it3.next();
                        if (c29428.f9170.size() > 1) {
                            Collections.sort(c29428.f9170, new C3663(i12));
                        }
                    }
                    if (i12 != 0) {
                        if (i12 == 1) {
                            Collections.sort(arrayList, new C3665());
                        }
                    } else {
                        Collections.sort(arrayList, new C3664());
                    }
                    C2943 c2943 = new C2943(C2975.f9245.mo1874(), this.f10389.m7859(), C2975.m7928().getInt("viewsize", 0), arrayList);
                    C2975.m7954(new RunnableC3666(c2943));
                    this.f10389.m7863(true);
                    this.f10389.m7871(c2943);
                    this.f10389.m7875(C2500.m7007(R.string.close), null);
                    this.f10389.m7852(C2500.m7007(R.string.settings), new DialogInterfaceOnClickListenerC3667(c2943));
                    C2975.m7954(new RunnableC3672());
                    return;
                }
                C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.backups_not_found) + " " + C2975.f9251 + str9);
                C2975.m7951(11);
                return;
            }
            C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.backups_not_found) + " " + C2975.f9251 + "/Backup");
            C2975.m7951(11);
        }
    }

    public class C3673 implements CompoundButton.OnCheckedChangeListener {

        final C2913 f10404;

        final boolean[] f10405;

        final boolean[] f10406;

        C3673(C2913 c2913, boolean[] zArr, boolean[] zArr2) {
            this.f10404 = c2913;
            this.f10405 = zArr;
            this.f10406 = zArr2;
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                this.f10404.m7855().setChecked(false);
                this.f10405[0] = false;
                this.f10406[0] = true;
                return;
            }
            this.f10406[0] = false;
        }
    }

    public class C3674 extends ArrayAdapter<C2640> {

        ArrayAdapter<C2640> f10407;

        final C2637 f10408;

        class ViewOnClickListenerC3675 implements View.OnClickListener {

            final CheckBox f10409;

            final CheckBox f10410;

            final C2640 f10411;

            final TextView f10412;

            ViewOnClickListenerC3675(CheckBox checkBox, CheckBox checkBox2, C2640 c2640, TextView textView) {
                this.f10409 = checkBox;
                this.f10410 = checkBox2;
                this.f10411 = c2640;
                this.f10412 = textView;
            }

            @Override
            public void onClick(View view) {
                C2640 c2640 = (C2640) view.getTag();
                c2640.f7669 = true;
                c2640.f7670 = false;
                c2640.f7666 = "inapp";
                C3674.this.f10408.m7285(new C2640("" + c2640.f7665, "inapp", c2640.f7667, true, false));
                this.f10409.setChecked(true);
                this.f10410.setChecked(false);
                this.f10410.setTextColor(Color.parseColor("#AAFFFFFF"));
                this.f10409.setTextColor(-16711936);
                if (this.f10411.f7667 == 0) {
                    this.f10412.setText(C2500.m6933("" + this.f10411.f7665, -1, "bold"));
                }
            }
        }

        class ViewOnClickListenerC3676 implements View.OnClickListener {

            final CheckBox f10414;

            final CheckBox f10415;

            final C2640 f10416;

            final TextView f10417;

            ViewOnClickListenerC3676(CheckBox checkBox, CheckBox checkBox2, C2640 c2640, TextView textView) {
                this.f10414 = checkBox;
                this.f10415 = checkBox2;
                this.f10416 = c2640;
                this.f10417 = textView;
            }

            @Override
            public void onClick(View view) {
                C2640 c2640 = (C2640) view.getTag();
                c2640.f7669 = true;
                c2640.f7670 = false;
                c2640.f7666 = "subs";
                C3674.this.f10408.m7285(new C2640("" + c2640.f7665, "subs", c2640.f7667, true, false));
                this.f10414.setChecked(true);
                this.f10415.setChecked(false);
                this.f10415.setTextColor(Color.parseColor("#AAFFFFFF"));
                this.f10414.setTextColor(-16711936);
                if (this.f10416.f7667 == 0) {
                    this.f10417.setText(C2500.m6933("" + this.f10416.f7665, -1, "bold"));
                }
            }
        }

        C3674(Context context, int i, List list, C2637 c2637) {
            super(context, i, list);
            this.f10408 = c2637;
            this.f10407 = this;
        }

        @Override
        public View getView(int i, View view, ViewGroup viewGroup) {
            View view2;
            C2640 c2640 = (C2640) getItem(i);
            if (view == null) {
                view2 = ((LayoutInflater) C2975.m7929().getSystemService("layout_inflater")).inflate(R.layout.purchases_for_sort, viewGroup, false);
            } else {
                view2 = view;
            }
            LinearLayout linearLayout = (LinearLayout) view2.findViewById(R.id.label);
            TextView textView = (TextView) view2.findViewById(R.id.context);
            TextView textView2 = (TextView) view2.findViewById(R.id.zagolovok);
            TextView textView3 = (TextView) view2.findViewById(R.id.describe);
            CheckBox checkBox = (CheckBox) view2.findViewById(R.id.inapp);
            CheckBox checkBox2 = (CheckBox) view2.findViewById(R.id.subs);
            textView.setTextAppearance(getContext(), C2975.m7934());
            textView2.setTextAppearance(getContext(), C2975.m7934());
            textView3.setTextAppearance(getContext(), C2975.m7934());
            int i2 = (int) ((C2975.m7933().getDisplayMetrics().density * 5.0f) + 0.5f);
            textView.setCompoundDrawablePadding(i2);
            textView2.setCompoundDrawablePadding(i2);
            textView3.setCompoundDrawablePadding(i2);
            String str = c2640.f7666;
            if (str != null && !str.equals("")) {
                linearLayout.setVisibility(8);
                textView.setVisibility(0);
                checkBox.setVisibility(0);
                checkBox2.setVisibility(0);
                checkBox.setText(C2500.m7007(R.string.purchases_sorter_type_inapp_purchase));
                checkBox2.setText(C2500.m7007(R.string.purchases_sorter_type_subs_purchase));
                if (c2640.f7669) {
                    if (c2640.f7666.equals("inapp")) {
                        checkBox.setChecked(true);
                        checkBox2.setChecked(false);
                        checkBox.setTextColor(-16711936);
                        checkBox2.setTextColor(Color.parseColor("#AAFFFFFF"));
                    }
                    if (c2640.f7666.equals("subs")) {
                        checkBox2.setChecked(true);
                        checkBox.setChecked(false);
                        checkBox2.setTextColor(-16711936);
                        checkBox.setTextColor(Color.parseColor("#AAFFFFFF"));
                    }
                }
                if (c2640.f7670) {
                    if (c2640.f7666.equals("inapp")) {
                        checkBox.setChecked(true);
                        checkBox2.setChecked(false);
                    }
                    if (c2640.f7666.equals("subs")) {
                        checkBox2.setChecked(true);
                        checkBox.setChecked(false);
                    }
                    checkBox.setTextColor(Color.parseColor("#AAFFFFFF"));
                    checkBox2.setTextColor(Color.parseColor("#AAFFFFFF"));
                }
                checkBox.setTag(c2640);
                checkBox2.setTag(c2640);
                checkBox.setOnClickListener(new ViewOnClickListenerC3675(checkBox, checkBox2, c2640, textView));
                checkBox2.setOnClickListener(new ViewOnClickListenerC3676(checkBox2, checkBox, c2640, textView));
                if (c2640.f7667 > 0) {
                    textView.setText(C2500.m6933("" + c2640.f7665, -256, "bold"));
                    textView.append(C2500.m6934("\n" + C2500.m7007(R.string.purchases_sorter_last_time_try_purchase) + ":\n" + c2640.f7668, "#AAAAAA", ""));
                } else {
                    textView.setText(C2500.m6933("" + c2640.f7665, -1, "bold"));
                    if (c2640.f7670) {
                        textView.append(C2500.m6934("\n" + C2500.m7007(R.string.purchases_sorter_not_defined_by_user), "#AAAAAA", ""));
                    }
                }
            } else {
                linearLayout.setVisibility(0);
                textView.setVisibility(8);
                textView2.setText(C2500.m7007(R.string.purchases_sorter_describe) + "\n");
                textView3.setText(C2500.m6933(C2500.m7007(R.string.purchases_sorter_type_inapp_purchase), -16711936, ""));
                textView3.append(" - " + C2500.m7007(R.string.purchases_sorter_type_inapp_describe) + "\n");
                textView3.append(C2500.m6933(C2500.m7007(R.string.purchases_sorter_type_subs_purchase), -16711936, ""));
                textView3.append(" - " + C2500.m7007(R.string.purchases_sorter_type_subs_describe));
                checkBox.setVisibility(8);
                checkBox2.setVisibility(8);
            }
            return view2;
        }
    }

    public class DialogInterfaceOnCancelListenerC3677 implements DialogInterface.OnCancelListener {
        DialogInterfaceOnCancelListenerC3677() {
        }

        @Override
        public void onCancel(DialogInterface dialogInterface) {
            C2975.f9282 = "";
        }
    }

    public class C3678 implements AdapterView.OnItemClickListener {
        C3678() {
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
        }
    }

    public class DialogInterfaceOnClickListenerC3679 implements DialogInterface.OnClickListener {

        final boolean f10419;

        final File f10420;

        final C2597 f10421;

        final String f10422;

        final boolean f10423;

        final File f10424;

        final boolean[] f10425;

        final boolean[] f10426;

        final boolean[] f10427;

        final boolean[] f10428;

        DialogInterfaceOnClickListenerC3679(boolean z, File file, C2597 c2597, String str, boolean z2, File file2, boolean[] zArr, boolean[] zArr2, boolean[] zArr3, boolean[] zArr4) {
            this.f10419 = z;
            this.f10420 = file;
            this.f10421 = c2597;
            this.f10422 = str;
            this.f10423 = z2;
            this.f10424 = file2;
            this.f10425 = zArr;
            this.f10426 = zArr2;
            this.f10427 = zArr3;
            this.f10428 = zArr4;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            if (this.f10419) {
                C2975.f9255 = this.f10420;
                C2975.f9245.m7975(C2975.f9253, "custom");
                return;
            }
            C2597 c2597 = new C2597();
            C2597 c25972 = this.f10421;
            if (c25972 != null) {
                c2597 = c25972;
            }
            if (this.f10422.toLowerCase().contains("[integrate_inapp_lvl_emulation]")) {
                c2597.f7311 = true;
                c2597.f7294 = true;
            }
            c2597.f7313 = true;
            boolean z = this.f10423;
            c2597.f7342 = z;
            c2597.f7329 = this.f10424;
            File file = this.f10420;
            c2597.f7286 = file;
            if (this.f10425[0]) {
                c2597.f7292 = true;
            }
            if (this.f10426[0]) {
                c2597.f7290 = true;
            }
            if (this.f10427[0]) {
                c2597.f7304 = true;
            }
            if (this.f10428[0]) {
                c2597.f7302 = true;
            }
            if (this.f10421 == null) {
                C2975.m7953(C2975.f9253, c2597);
            } else {
                c2597.f7286 = file;
                C2975.f9245.m8067(c2597, z);
            }
        }
    }

    public class RunnableC3680 implements Runnable {

        class RunnableC3681 implements Runnable {

            class C3682 extends ArrayAdapter<C3727> {

                TextView f10430;

                TextView f10431;

                TextView f10432;

                ArrayAdapter<C3727> f10433;

                class ViewOnClickListenerC3683 implements View.OnClickListener {

                    final C3727 f10435;

                    class RunnableC3684 implements Runnable {

                        class RunnableC3685 implements Runnable {
                            RunnableC3685() {
                            }

                            @Override
                            public void run() {
                                if (C2975.f9375) {
                                    C3727 c3727 = ViewOnClickListenerC3683.this.f10435;
                                    if (c3727.f10502) {
                                        c3727.f10502 = false;
                                        C2500.m7133(C2975.f9245.mo1874(), C2500.m7007(R.string.information), C2500.m7007(R.string.message_test_patch_unlocked));
                                    }
                                }
                                C3682.this.f10433.notifyDataSetChanged();
                            }
                        }

                        RunnableC3684() {
                        }

                        @Override
                        public void run() {
                            int i;
                            String[] strArr;
                            long m6983;
                            String[] strArr2 = {"appver1", "appver2", "appnewsig", "apptargetsdk30"};
                            int i2 = 0;
                            for (int i3 = 4; i2 < i3; i3 = 4) {
                                String str = strArr2[i2];
                                File file = new File(C2975.f9250 + InternalZipConstants.ZIP_FILE_SEPARATOR + str + ".apk");
                                str.hashCode();
                                char c = 65535;
                                switch (str.hashCode()) {
                                    case -2035823470:
                                        if (str.equals("appnewsig")) {
                                            c = 0;
                                        }
                                        switch (c) {
                                            case 0:
                                                i = R.raw.appnewsig;
                                                break;
                                            case 1:
                                                i = R.raw.appver1;
                                                break;
                                            case 2:
                                                i = R.raw.appver2;
                                                break;
                                            case 3:
                                                i = R.raw.apptargetsdk30;
                                                break;
                                            default:
                                                strArr = strArr2;
                                                i = 0;
                                                break;
                                        }
                                        strArr = strArr2;
                                        m6983 = C2500.m6983(i);
                                        if (file.exists() || file.length() != m6983) {
                                            if (file.length() != m6983) {
                                                File file2 = new File(C2975.f9250 + InternalZipConstants.ZIP_FILE_SEPARATOR + str + ".apk");
                                                if (file2.exists()) {
                                                    file2.delete();
                                                }
                                                C2975.m7942("LuckyPatcher: " + str + " version updated. " + m6983 + " " + file.length());
                                                if (file.exists()) {
                                                    file.delete();
                                                }
                                            }
                                            try {
                                                C2500.m6984(i, new File(C2975.f9250 + InternalZipConstants.ZIP_FILE_SEPARATOR + str + ".apk"));
                                            } catch (Exception unused) {
                                            }
                                            C2500.m7093("chmod 06777 " + file.getAbsolutePath());
                                            C2500.m7093("chown 0.0 " + file.getAbsolutePath());
                                            C2500.m7093("chown 0:0 " + file.getAbsolutePath());
                                        }
                                        i2++;
                                        strArr2 = strArr;
                                        break;
                                    case -792940913:
                                        if (str.equals("appver1")) {
                                            c = 1;
                                        }
                                        switch (c) {
                                        }
                                        strArr = strArr2;
                                        m6983 = C2500.m6983(i);
                                        if (file.exists()) {
                                            break;
                                        }
                                        if (file.length() != m6983) {
                                        }
                                        C2500.m6984(i, new File(C2975.f9250 + InternalZipConstants.ZIP_FILE_SEPARATOR + str + ".apk"));
                                        C2500.m7093("chmod 06777 " + file.getAbsolutePath());
                                        C2500.m7093("chown 0.0 " + file.getAbsolutePath());
                                        C2500.m7093("chown 0:0 " + file.getAbsolutePath());
                                        i2++;
                                        strArr2 = strArr;
                                        break;
                                    case -792940912:
                                        if (str.equals("appver2")) {
                                            c = 2;
                                        }
                                        switch (c) {
                                        }
                                        strArr = strArr2;
                                        m6983 = C2500.m6983(i);
                                        if (file.exists()) {
                                        }
                                        if (file.length() != m6983) {
                                        }
                                        C2500.m6984(i, new File(C2975.f9250 + InternalZipConstants.ZIP_FILE_SEPARATOR + str + ".apk"));
                                        C2500.m7093("chmod 06777 " + file.getAbsolutePath());
                                        C2500.m7093("chown 0.0 " + file.getAbsolutePath());
                                        C2500.m7093("chown 0:0 " + file.getAbsolutePath());
                                        i2++;
                                        strArr2 = strArr;
                                        break;
                                    case -790162331:
                                        if (str.equals("apptargetsdk30")) {
                                            c = 3;
                                        }
                                        switch (c) {
                                        }
                                        strArr = strArr2;
                                        m6983 = C2500.m6983(i);
                                        if (file.exists()) {
                                        }
                                        if (file.length() != m6983) {
                                        }
                                        C2500.m6984(i, new File(C2975.f9250 + InternalZipConstants.ZIP_FILE_SEPARATOR + str + ".apk"));
                                        C2500.m7093("chmod 06777 " + file.getAbsolutePath());
                                        C2500.m7093("chown 0.0 " + file.getAbsolutePath());
                                        C2500.m7093("chown 0:0 " + file.getAbsolutePath());
                                        i2++;
                                        strArr2 = strArr;
                                        break;
                                    default:
                                        switch (c) {
                                        }
                                        strArr = strArr2;
                                        m6983 = C2500.m6983(i);
                                        if (file.exists()) {
                                        }
                                        if (file.length() != m6983) {
                                        }
                                        C2500.m6984(i, new File(C2975.f9250 + InternalZipConstants.ZIP_FILE_SEPARATOR + str + ".apk"));
                                        C2500.m7093("chmod 06777 " + file.getAbsolutePath());
                                        C2500.m7093("chown 0.0 " + file.getAbsolutePath());
                                        C2500.m7093("chown 0:0 " + file.getAbsolutePath());
                                        i2++;
                                        strArr2 = strArr;
                                        break;
                                }
                            }
                            File file3 = new File(C2975.f9250 + "/appver1.apk");
                            File file4 = new File(C2975.f9250 + "/appver2.apk");
                            File file5 = new File(C2975.f9250 + "/appnewsig.apk");
                            File file6 = new File(C2975.f9250 + "/apptargetsdk30.apk");
                            SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
                            if (file3.exists() && file4.exists()) {
                                String m7024 = C2500.m7024(file4.getAbsolutePath(), null, true, false);
                                if (m7024.length() < 5) {
                                    m7024 = m7024 + C2975.f9298;
                                }
                                spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.message_test_pm_utility) + ": ", "#DDDDDD", ""));
                                if (m7024.toLowerCase().contains("success")) {
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.success) + "\n\n", "#8BC34A", ""));
                                    StringBuilder sb = new StringBuilder();
                                    sb.append(C2500.m7007(R.string.message_test_patch_downgrade));
                                    sb.append(": ");
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb.toString(), "#DDDDDD", ""));
                                    String m70242 = C2500.m7024(file3.getAbsolutePath(), null, true, false);
                                    if (m70242.length() < 5) {
                                        m70242 = m70242 + C2975.f9298;
                                    }
                                    if (m70242.toLowerCase().contains("success")) {
                                        spannableStringBuilder.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.success) + "\n\n", "#8BC34A", ""));
                                    } else {
                                        C2975.f9375 = true;
                                        spannableStringBuilder.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.failed) + "\n(" + m70242.replaceAll("\n", "") + ")\n\n", "#F44336", ""));
                                    }
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.message_test_patch_signatures) + ": ", "#DDDDDD", ""));
                                    String m70243 = C2500.m7024(file5.getAbsolutePath(), null, true, false);
                                    if (m70243.length() < 5) {
                                        m70243 = m70243 + C2975.f9298;
                                    }
                                    if (m70243.toLowerCase().contains("success")) {
                                        spannableStringBuilder.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.success) + "\n\n", "#8BC34A", ""));
                                    } else {
                                        C2975.f9375 = true;
                                        spannableStringBuilder.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.failed) + "\n(" + m70243.replaceAll("\n", "") + ")\n\n", "#F44336", ""));
                                    }
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(C2500.m7007(R.string.message_test_patch_terget_sdk_30_installing) + ": ", "#DDDDDD", ""));
                                    new C2500("").m7211("pm uninstall ru.test.app.lp");
                                    String m70244 = C2500.m7024(file6.getAbsolutePath(), null, true, false);
                                    if (m70244.length() < 5) {
                                        m70244 = m70244 + C2975.f9298;
                                    }
                                    if (m70244.toLowerCase().contains("success")) {
                                        spannableStringBuilder.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.success) + "\n", "#8BC34A", ""));
                                    } else {
                                        C2975.f9375 = true;
                                        spannableStringBuilder.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.failed) + "\n(" + m70244.replaceAll("\n", "") + ")\n", "#F44336", ""));
                                    }
                                } else {
                                    C2975.f9375 = true;
                                    spannableStringBuilder.append((CharSequence) C2500.m6934("\n" + C2500.m7007(R.string.failed) + "\n(" + m7024.replaceAll("\n", "") + ")\n", "#F44336", ""));
                                    StringBuilder sb2 = new StringBuilder();
                                    sb2.append("\n");
                                    sb2.append(C2500.m7007(R.string.message_test_pm_utility_fail));
                                    spannableStringBuilder.append((CharSequence) C2500.m6934(sb2.toString(), "#F44336", ""));
                                }
                                new C2500("").m7211("pm uninstall ru.test.app.lp");
                            }
                            C2500.m7132(C2975.f9245.mo1874(), C2500.m7007(R.string.PatchResult), spannableStringBuilder);
                            C2975.m7954(new RunnableC3685());
                        }
                    }

                    ViewOnClickListenerC3683(C3727 c3727) {
                        this.f10435 = c3727;
                    }

                    @Override
                    public void onClick(View view) {
                        C2975.m7956(new RunnableC3684());
                    }
                }

                C3682(Context context, int i, List list) {
                    super(context, i, list);
                    this.f10433 = this;
                }

                @Override
                public View getView(int i, View view, ViewGroup viewGroup) {
                    boolean z;
                    C3727 c3727 = (C3727) getItem(i);
                    View inflate = ((LayoutInflater) C2975.m7929().getSystemService("layout_inflater")).inflate(R.layout.corepatch, viewGroup, false);
                    this.f10430 = (TextView) inflate.findViewById(R.id.txtTitle);
                    this.f10431 = (TextView) inflate.findViewById(R.id.txtStatus);
                    this.f10432 = (TextView) inflate.findViewById(R.id.txtStatusPatch);
                    this.f10430.setTextAppearance(getContext(), C2975.m7934());
                    this.f10431.setTextAppearance(getContext(), C2975.m7934());
                    this.f10432.setTextAppearance(getContext(), C2975.m7934());
                    CheckBox checkBox = (CheckBox) inflate.findViewById(R.id.CheckBox1);
                    if (((C3727) getItem(i)).f10500) {
                        this.f10430.setTextAppearance(getContext(), C2975.m7934());
                        this.f10430.setText(C2500.m6934(C2500.m7007(c3727.f10494), c3727.f10498, "bold"));
                        this.f10430.setTypeface(null, 1);
                        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) this.f10430.getLayoutParams();
                        layoutParams.setMargins(10, 5, 0, 5);
                        this.f10430.setLayoutParams(layoutParams);
                        inflate.setBackgroundColor(-12303292);
                        checkBox.setVisibility(8);
                        this.f10431.setVisibility(8);
                        this.f10432.setVisibility(8);
                        z = false;
                    } else {
                        checkBox.setChecked(c3727.f10499);
                        checkBox.setClickable(false);
                        this.f10431.setTextAppearance(getContext(), android.R.style.TextAppearance.Small);
                        this.f10431.setTextColor(-7829368);
                        this.f10430.setTextColor(-1);
                        if (!c3727.f10503) {
                            this.f10430.setTextColor(Color.parseColor(c3727.f10498));
                        } else {
                            this.f10430.setTextColor(Color.parseColor("#AAAAAAAA"));
                        }
                        if (!c3727.f10503) {
                            this.f10430.setText(C2500.m6934(C2500.m7007(c3727.f10494), c3727.f10498, "bold"));
                        } else {
                            this.f10430.setText(C2500.m6934(C2500.m7007(c3727.f10494), "#AAAAAAAA", "bold"));
                        }
                        this.f10430.setTypeface(null, 1);
                        int i2 = c3727.f10496;
                        if (i2 != 0) {
                            this.f10431.append(C2500.m6934(C2500.m7007(i2), "#ff888888", "italic"));
                            this.f10431.setVisibility(0);
                        }
                        checkBox.setChecked(c3727.f10499);
                        if (c3727.f10494 == R.string.contextcorepatch1) {
                            ?? r5 = C2975.f9371;
                            if (r5 != 0) {
                                int i3 = r5;
                                if (C2975.f9372) {
                                    i3 = r5 + 1;
                                }
                                if (i3 == 2) {
                                    checkBox.setEnabled(false);
                                    c3727.f10502 = true;
                                    this.f10432.setText("2/2 " + C2500.m7007(R.string.core_patch_apply));
                                }
                                if (i3 == 1) {
                                    if (C2975.f9299 >= 29) {
                                        this.f10432.setText(C2500.m7007(R.string.core_patch_apply));
                                    } else {
                                        this.f10432.setText("1/2 " + C2500.m7007(R.string.core_patch_apply));
                                    }
                                }
                                this.f10432.setVisibility(0);
                            } else if (C2975.f9368) {
                                this.f10432.setText(C2500.m7007(R.string.core_patch_nopatch_no_space1));
                            } else if (c3727.f10503) {
                                this.f10432.setText(C2500.m6934(C2500.m7007(R.string.core_patch_nopatch) + "\n", "#AAAAAAAA", ""));
                                this.f10432.append(C2500.m6934(C2500.m7007(R.string.android_patches_xposed_need_message), "#DDfcff00", ""));
                                z = true;
                                this.f10432.setVisibility(0);
                            } else {
                                this.f10432.setText(C2500.m7007(R.string.core_patch_nopatch));
                            }
                            z = false;
                            this.f10432.setVisibility(0);
                        } else {
                            z = false;
                        }
                        if (c3727.f10494 == R.string.contextcorepatch2) {
                            if (C2975.f9373) {
                                checkBox.setEnabled(false);
                                c3727.f10502 = true;
                                this.f10432.setText(C2500.m7007(R.string.core_patch_apply));
                            } else if (C2975.f9368) {
                                this.f10432.setText(C2500.m7007(R.string.core_patch_nopatch_no_space1));
                            } else if (c3727.f10503) {
                                this.f10432.setText(C2500.m6934(C2500.m7007(R.string.core_patch_nopatch) + "\n", "#AAAAAAAA", ""));
                                this.f10432.append(C2500.m6934(C2500.m7007(R.string.android_patches_xposed_need_message), "#DDfcff00", ""));
                                z = true;
                            } else {
                                this.f10432.setText(C2500.m7007(R.string.core_patch_nopatch));
                            }
                            this.f10432.setVisibility(0);
                        }
                        if (c3727.f10494 == R.string.contextcorepatch3) {
                            if (C2975.f9299 >= 28) {
                                this.f10432.setVisibility(8);
                            } else {
                                this.f10432.setVisibility(0);
                            }
                            Button button = (Button) inflate.findViewById(R.id.button_test);
                            Drawable drawable = C2975.m7933().getDrawable(R.drawable.outline_fact_check_white_24);
                            drawable.setColorFilter(Color.parseColor("#DCFFEB3B"), PorterDuff.Mode.MULTIPLY);
                            button.setTextAppearance(getContext(), C2975.m7934());
                            button.setCompoundDrawablesWithIntrinsicBounds(drawable, (Drawable) null, (Drawable) null, (Drawable) null);
                            button.setVisibility(0);
                            button.setText(" " + C2500.m7007(R.string.option_test_patch));
                            button.setOnClickListener(new ViewOnClickListenerC3683(c3727));
                            if (!C2975.f9369 && !C2975.f9374) {
                                if (C2975.f9368) {
                                    this.f10432.setText(C2500.m7007(R.string.core_patch_nopatch_no_space1));
                                } else {
                                    this.f10432.setText(C2500.m7007(R.string.core_patch_nopatch));
                                }
                            } else {
                                checkBox.setEnabled(false);
                                if (!C2975.f9375) {
                                    c3727.f10502 = true;
                                }
                                this.f10432.setText(C2500.m7007(R.string.core_patch_apply));
                            }
                        }
                        if (c3727.f10494 == R.string.android_patches_dialog_remove_patches_1_and_2) {
                            this.f10430.setText(C2500.m7009(R.string.android_patches_dialog_remove_patches_1_and_2, C2500.m7007(R.string.contextcorepatch1), C2500.m7007(R.string.contextcorepatch2)));
                            this.f10432.setText(C2500.m6934(C2500.m7007(R.string.contextcorepatchrestore_descr), "#ff888888", "italic"));
                        }
                        if (c3727.f10494 == R.string.android_patches_dialog_remove_patch_3) {
                            this.f10430.setText(C2500.m7009(R.string.android_patches_dialog_remove_patch_3, C2500.m7007(R.string.contextcorepatch3)));
                            this.f10432.setText(C2500.m6934(C2500.m7007(R.string.contextcorepatchrestore2_descr), "#ff888888", "italic"));
                        }
                    }
                    if (c3727.f10503) {
                        checkBox.setEnabled(false);
                        c3727.f10499 = false;
                        this.f10430.setTextColor(Color.parseColor("#AAAAAAAA"));
                        if (!z) {
                            this.f10432.setTextColor(Color.parseColor("#AAAAAAAA"));
                        }
                    }
                    return inflate;
                }
            }

            class DialogInterfaceOnClickListenerC3686 implements DialogInterface.OnClickListener {

                class RunnableC3687 implements Runnable {

                    class DialogInterfaceOnClickListenerC3688 implements DialogInterface.OnClickListener {

                        class RunnableC3689 implements Runnable {
                            RunnableC3689() {
                            }

                            @Override
                            public void run() {
                                C2500.m7092(C1563.class, "");
                                C2500.m7073();
                            }
                        }

                        DialogInterfaceOnClickListenerC3688() {
                        }

                        @Override
                        public void onClick(DialogInterface dialogInterface, int i) {
                            C2975.m7956(new RunnableC3689());
                        }
                    }

                    RunnableC3687() {
                    }

                    @Override
                    public void run() {
                        if (C2500.m7092(C1658.class, "").contains("magisk module found")) {
                            C2500.m7125(C2500.m7007(R.string.warning), C2500.m7007(R.string.button_remove_magisk_module_message_warning), new DialogInterfaceOnClickListenerC3688(), null, null);
                        } else {
                            C2975.m7962(C2500.m7007(R.string.information), C2500.m7007(R.string.button_remove_magisk_module_message_not_found));
                        }
                    }
                }

                DialogInterfaceOnClickListenerC3686() {
                }

                @Override
                public void onClick(DialogInterface dialogInterface, int i) {
                    C2975.m7956(new RunnableC3687());
                }
            }

            class C3690 implements CompoundButton.OnCheckedChangeListener {

                final ArrayAdapter f10443;

                final CheckBox f10444;

                final CheckBox f10445;

                C3690(ArrayAdapter arrayAdapter, CheckBox checkBox, CheckBox checkBox2) {
                    this.f10443 = arrayAdapter;
                    this.f10444 = checkBox;
                    this.f10445 = checkBox2;
                }

                @Override
                public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                    C2975.m7942("only dalvik chkbox changed " + z);
                    C3727 c3727 = null;
                    C3727 c37272 = null;
                    C3727 c37273 = null;
                    for (int i = 0; i < this.f10443.getCount(); i++) {
                        C3727 c37274 = (C3727) this.f10443.getItem(i);
                        int i2 = c37274.f10494;
                        if (i2 != R.string.contextcorepatch1) {
                            if (i2 != R.string.contextcorepatch2) {
                                if (i2 == R.string.contextcorepatch3) {
                                    c37273 = c37274;
                                }
                            } else {
                                c37272 = c37274;
                            }
                        } else {
                            c3727 = c37274;
                        }
                    }
                    if (z && C2975.f9319) {
                        C2975.f9319 = false;
                        this.f10444.setChecked(false);
                    }
                    if (!C2500.m6935().equals("ART")) {
                        C2975.f9318 = z;
                    } else if (C2975.f9299 >= 20 && C2500.m6935().equals("ART") && (C2975.f9384 || C2975.f9386)) {
                        if ((c3727.f10499 || c37272.f10499) && !C2975.f9384) {
                            c3727.f10499 = false;
                            c37272.f10499 = false;
                            this.f10443.notifyDataSetChanged();
                        }
                        if (c37273.f10499 && !C2975.f9386) {
                            c37273.f10499 = false;
                            this.f10443.notifyDataSetChanged();
                        }
                        C2975.f9318 = z;
                    } else {
                        this.f10445.setChecked(false);
                        this.f10445.setEnabled(false);
                        C2975.f9318 = false;
                    }
                    C3549.m8197(this.f10443);
                }
            }

            class C3691 implements CompoundButton.OnCheckedChangeListener {

                final CheckBox f10447;

                final Button f10448;

                final ArrayAdapter f10449;

                class C3692 implements CompoundButton.OnCheckedChangeListener {
                    C3692() {
                    }

                    @Override
                    public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                        if (z) {
                            C2975.m7928().edit().putBoolean("warning_magisk_module", false).commit();
                        } else {
                            C2975.m7928().edit().putBoolean("warning_magisk_module", true).commit();
                        }
                    }
                }

                C3691(CheckBox checkBox, Button button, ArrayAdapter arrayAdapter) {
                    this.f10447 = checkBox;
                    this.f10448 = button;
                    this.f10449 = arrayAdapter;
                }

                @Override
                public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                    C2975.m7942("magisk chkbox changed " + z);
                    C2975.f9319 = z;
                    if (z) {
                        if (C2975.m7928().getBoolean("warning_magisk_module", true)) {
                            C2500.m7131(C2500.m7007(R.string.warning), C2500.m7007(R.string.magisk_module_warning), C2500.m7007(R.string.warning_superSu_mount_name_space_separation_3), new C3692(), false, null, true);
                        }
                        C2975.f9318 = false;
                        this.f10447.setChecked(false);
                        this.f10448.setVisibility(0);
                        if (!C2975.f9377) {
                            this.f10448.setEnabled(false);
                        } else {
                            this.f10448.setEnabled(true);
                        }
                    } else {
                        this.f10448.setVisibility(8);
                        C2975.f9318 = false;
                        this.f10447.setChecked(false);
                    }
                    C3549.m8197(this.f10449);
                }
            }

            class C3693 implements AdapterView.OnItemClickListener {

                final ArrayAdapter f10452;

                final CheckBox f10453;

                final CheckBox f10454;

                C3693(ArrayAdapter arrayAdapter, CheckBox checkBox, CheckBox checkBox2) {
                    this.f10452 = arrayAdapter;
                    this.f10453 = checkBox;
                    this.f10454 = checkBox2;
                }

                @Override
                public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
                    C3727 c3727 = (C3727) this.f10452.getItem(i);
                    C3727 c37272 = null;
                    C3727 c37273 = null;
                    C3727 c37274 = null;
                    C3727 c37275 = null;
                    C3727 c37276 = null;
                    for (int i2 = 0; i2 < this.f10452.getCount(); i2++) {
                        C3727 c37277 = (C3727) this.f10452.getItem(i2);
                        switch (c37277.f10494) {
                            case R.string.android_patches_dialog_remove_patch_3:
                                c37273 = c37277;
                                break;
                            case R.string.android_patches_dialog_remove_patches_1_and_2:
                                c37272 = c37277;
                                break;
                            case R.string.contextcorepatch1:
                                c37275 = c37277;
                                break;
                            case R.string.contextcorepatch2:
                                c37276 = c37277;
                                break;
                            case R.string.contextcorepatch3:
                                c37274 = c37277;
                                break;
                        }
                    }
                    if (c3727.f10499) {
                        c3727.f10499 = false;
                    } else if (!c37272.f10499 && !c37273.f10499 && !c3727.f10502 && !c3727.f10503) {
                        c3727.f10499 = true;
                    }
                    int i3 = c3727.f10494;
                    if ((i3 == R.string.contextcorepatch1 || i3 == R.string.contextcorepatch2) && !C2975.f9319 && c3727.f10499 && ((c37274.f10499 || c37272.f10499) && (!C2975.f9378 || C2500.m6935().contains("ART")))) {
                        c37274.f10499 = false;
                        C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.patch_to_Android_At_once));
                    }
                    if (c3727.f10494 == R.string.contextcorepatch3 && !C2975.f9319 && c3727.f10499 && ((!C2975.f9378 || C2500.m6935().contains("ART")) && (c37275.f10499 || c37276.f10499))) {
                        c37275.f10499 = false;
                        c37276.f10499 = false;
                        C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.patch_to_Android_At_once));
                    }
                    if (!c37272.f10499 && !c37273.f10499 && C2975.f9299 >= 20 && C2975.f9318 && C2500.m6935().equals("ART")) {
                        if (c3727.f10494 == R.string.contextcorepatch3 && !C2975.f9386) {
                            C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.patch_to_Android_only_dalvik_cahce_services_disable));
                            c37275.f10499 = false;
                            c37276.f10499 = false;
                            C2975.f9318 = false;
                            this.f10453.setChecked(false);
                        }
                        int i4 = c3727.f10494;
                        if ((i4 == R.string.contextcorepatch1 || i4 == R.string.contextcorepatch2) && !C2975.f9384) {
                            C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.patch_to_Android_only_dalvik_cahce_core_disable));
                            c37274.f10499 = false;
                            C2975.f9318 = false;
                            this.f10453.setChecked(false);
                        }
                    }
                    if (c3727.f10494 == R.string.android_patches_dialog_remove_patches_1_and_2 && c3727.f10499) {
                        if (!C2975.f9384 && C2975.f9318) {
                            C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.patch_to_Android_only_dalvik_cahce_core_disable));
                            C2975.f9318 = false;
                            this.f10453.setChecked(false);
                        }
                        C2975.f9319 = false;
                        this.f10454.setChecked(false);
                        c37275.f10499 = false;
                        c37276.f10499 = false;
                        c37274.f10499 = false;
                    }
                    if (c3727.f10494 == R.string.android_patches_dialog_remove_patch_3 && c3727.f10499) {
                        if (!C2975.f9386 && C2975.f9318) {
                            C2975.m7962(C2500.m7007(R.string.warning), C2500.m7007(R.string.patch_to_Android_only_dalvik_cahce_services_disable));
                            C2975.f9318 = false;
                            this.f10453.setChecked(false);
                        }
                        C2975.f9319 = false;
                        this.f10454.setChecked(false);
                        c37275.f10499 = false;
                        c37276.f10499 = false;
                        c37274.f10499 = false;
                    }
                    this.f10452.notifyDataSetChanged();
                }
            }

            class DialogInterfaceOnClickListenerC3694 implements DialogInterface.OnClickListener {

                final ArrayAdapter f10456;

                final C2913 f10457;

                DialogInterfaceOnClickListenerC3694(ArrayAdapter arrayAdapter, C2913 c2913) {
                    this.f10456 = arrayAdapter;
                    this.f10457 = c2913;
                }

                @Override
                public void onClick(DialogInterface dialogInterface, int i) {
                    int count = this.f10456.getCount();
                    String str = "patch";
                    boolean z = false;
                    for (int i2 = 0; i2 < count; i2++) {
                        C3727 c3727 = (C3727) this.f10456.getItem(i2);
                        if (c3727.f10499) {
                            switch (c3727.f10494) {
                                case R.string.android_patches_dialog_remove_patch_3:
                                    if (str.contains("restoreCore")) {
                                        str = str + "_restoreServices";
                                        break;
                                    } else {
                                        str = "restoreServices";
                                        break;
                                    }
                                case R.string.android_patches_dialog_remove_patches_1_and_2:
                                    str = str + "restoreCore";
                                    break;
                                case R.string.contextcorepatch1:
                                    str = str + "_patch1";
                                    break;
                                case R.string.contextcorepatch2:
                                    str = str + "_patch2";
                                    break;
                                case R.string.contextcorepatch3:
                                    str = str + "_patch3";
                                    break;
                            }
                        }
                    }
                    if (z) {
                        C2975.f9245.m8002(str);
                        this.f10457.f9080.dismiss();
                    }
                }
            }

            RunnableC3681() {
            }

            @Override
            public void run() {
                C2913 c2913 = new C2913(C2975.f9245.mo1874());
                ArrayList arrayList = new ArrayList();
                arrayList.add(new C3727(R.string.android_patches_dialog_header1, true));
                arrayList.add(new C3727(R.string.contextcorepatch1, R.string.contextcorepatch1_descr, "#ff00ff00", false));
                arrayList.add(new C3727(R.string.contextcorepatch2, R.string.contextcorepatch2_descr, "#ff00ff00", false));
                arrayList.add(new C3727(R.string.contextcorepatch3, R.string.contextcorepatch3_descr, "#ff00ff00", false));
                arrayList.add(new C3727(R.string.android_patches_dialog_header2, true));
                arrayList.add(new C3727(R.string.android_patches_dialog_remove_patches_1_and_2, 0, "#ffFF0000", false));
                arrayList.add(new C3727(R.string.android_patches_dialog_remove_patch_3, 0, "#ffFF0000", false));
                C3682 c3682 = new C3682(C2975.f9245.mo1874(), R.layout.contextmenu, arrayList);
                CheckBox m7855 = c2913.m7855();
                CheckBox m7857 = c2913.m7857();
                c2913.m7878(C2500.m7007(R.string.button_remove_magisk_module), new DialogInterfaceOnClickListenerC3686());
                Button m7861 = c2913.m7861();
                m7861.setVisibility(8);
                c2913.m7866(C2500.m7007(R.string.core_option), new C3690(c3682, m7857, m7855), false);
                if (C2500.m7060() && (C2975.f9378 || C2975.f9379 || C2975.f9380 || C2975.f9381 || C2975.f9382 || C2975.f9383)) {
                    if ((C2975.f9299 >= 33 && !C2975.m7928().getBoolean("option_force_turn_off_magisk", false)) || C2500.m7044()) {
                        C2975.f9319 = true;
                    }
                    c2913.m7867(C2500.m7007(R.string.android_patches_dialog_use_magisk_module_for_patches), new C3691(m7855, m7861, c3682), C2975.f9319);
                }
                m7855.setText(C2500.m7007(R.string.core_option));
                m7855.setMaxLines(1);
                if (C2500.m6947("/system/framework/core.jar") != null && !C2500.m6935().equals("ART")) {
                    m7855.setChecked(true);
                    C2975.f9318 = true;
                } else if (C2975.f9299 >= 20 && C2500.m6935().equals("ART") && (C2975.f9384 || C2975.f9386)) {
                    m7855.setChecked(true);
                    C2975.f9318 = true;
                } else {
                    C2975.f9318 = false;
                    m7855.setChecked(false);
                    m7855.setEnabled(false);
                }
                c3682.setNotifyOnChange(true);
                c2913.m7863(true);
                c2913.f9084 = true;
                c2913.m7862(c3682, new C3693(c3682, m7855, m7857));
                c2913.m7875(C2500.m7007(R.string.patch_ok), new DialogInterfaceOnClickListenerC3694(c3682, c2913));
                c2913.m7851().show();
                C3549.m8197(c3682);
            }
        }

        RunnableC3680() {
        }

        @Override
        public void run() {
            String str;
            String str2;
            String str3;
            C2975.f9370 = true;
            C2975.f9371 = C2500.m7182();
            C2975.f9372 = C2500.m7184();
            C2975.f9373 = C2500.m7186();
            C2975.f9374 = C2500.m7188();
            if (!C2500.m6969().equals("")) {
                C2975.m7942("magisk folder found:" + C2500.m6969());
                C2975.f9376 = true;
                if (C2500.m6898(C2500.m6969())) {
                    C2975.f9377 = true;
                } else {
                    C2975.f9377 = false;
                }
            } else {
                C2975.m7942("magisk folder not found:" + C2500.m6969());
                C2975.f9376 = false;
            }
            if (C2500.m6935().equals("ART") && C2975.f9299 >= 20) {
                C2608 c2608 = new C2608();
                c2608.f7406 = true;
                c2608.f7411 = true;
                c2608.f7408 = true;
                ArrayList<File> m6955 = C2500.m6955(c2608);
                if (m6955.size() > 0) {
                    C2975.m7942("found system files");
                    Iterator<File> it = m6955.iterator();
                    while (it.hasNext()) {
                        C2975.m7942(it.next().getAbsolutePath());
                    }
                    C2975.f9378 = true;
                    C2975.f9379 = true;
                } else {
                    C2975.f9378 = false;
                    C2975.f9378 = false;
                }
                C2608 c26082 = new C2608();
                c26082.f7414 = true;
                c26082.f7420 = true;
                ArrayList<File> m69552 = C2500.m6955(c26082);
                if (m69552.size() > 0) {
                    C2975.m7942("found system files");
                    Iterator<File> it2 = m69552.iterator();
                    while (it2.hasNext()) {
                        C2975.m7942(it2.next().getAbsolutePath());
                    }
                    C2975.f9380 = true;
                } else {
                    C2975.f9380 = false;
                }
                C2608 c26083 = new C2608();
                c26083.f7407 = true;
                c26083.f7412 = true;
                c26083.f7409 = true;
                if (C2500.m6955(c26083).size() > 0) {
                    C2975.f9384 = true;
                    C2975.f9385 = true;
                } else {
                    C2975.f9384 = false;
                    C2975.f9385 = false;
                }
                C2608 c26084 = new C2608();
                c26084.f7415 = true;
                c26084.f7421 = true;
                if (C2500.m6955(c26084).size() > 0) {
                    C2975.f9386 = true;
                } else {
                    C2975.f9386 = false;
                }
                C2608 c26085 = new C2608();
                c26085.f7410 = true;
                if (C2500.m6955(c26085).size() > 0) {
                    C2975.f9381 = true;
                }
                C2608 c26086 = new C2608();
                c26086.f7413 = true;
                if (C2500.m6955(c26086).size() > 0) {
                    C2975.f9381 = true;
                    C2975.f9382 = true;
                }
                if (new File("/system/framework/services.jar").exists() || new File("/system/framework/framework.jar").exists()) {
                    C2975.f9383 = true;
                }
            } else {
                if (new File("/system/framework/core.jar").exists() || new File("/system/framework/core-libart.jar").exists() || new File("/system/framework/core-oj.jar").exists()) {
                    C2975.f9381 = true;
                    C2975.f9382 = true;
                }
                if (new File("/system/framework/services.jar").exists() || new File("/system/framework/framework.jar").exists()) {
                    C2975.f9383 = true;
                }
                if (new File(C2500.m6976("/system/framework/core.jar", false)).length() != 0) {
                    C2975.f9378 = true;
                    C2975.f9379 = true;
                }
                if (new File(C2500.m6976("/system/framework/core-libart.jar", false)).length() != 0) {
                    C2975.f9378 = true;
                    C2975.f9379 = true;
                }
                if (new File(C2500.m6976("/system/framework/services.jar", false)).length() != 0) {
                    C2975.f9380 = true;
                }
                if (C2975.f9299 < 20 || !C2500.m6935().equals("ART")) {
                    try {
                        str = C2500.m6947("/system/framework/core.jar").getAbsolutePath();
                    } catch (Exception e) {
                        e.printStackTrace();
                        str = "";
                    }
                    if (str != null && !str.equals("")) {
                        C2975.f9384 = true;
                        C2975.f9385 = true;
                    }
                    try {
                        str2 = C2500.m6947("/system/framework/core-libart.jar").getAbsolutePath();
                    } catch (Exception e2) {
                        e2.printStackTrace();
                        str2 = "";
                    }
                    if (str2 != null && !str2.equals("")) {
                        C2975.f9384 = true;
                        C2975.f9385 = true;
                    }
                    try {
                        str3 = C2500.m6947("/system/framework/services.jar").getAbsolutePath();
                    } catch (Exception e3) {
                        e3.printStackTrace();
                        str3 = "";
                    }
                    if (str3 != null && !str3.equals("")) {
                        C2975.f9386 = true;
                    }
                }
            }
            if ((C2975.f9371 && C2975.f9372) || (!C2500.m6898("/system/framework/core.jar.jex") && !C2500.m6898("/system/framework/core-libart.jar.jex") && !C2500.m6898("/system/framework/services.jar.jex"))) {
                try {
                    C2975.f9368 = C2500.m6898("/system/framework/not.space");
                    C2975.f9369 = C2500.m6898("/system/framework/patch3.done");
                    C2975.m7954(new RunnableC3681());
                } catch (Exception unused) {
                    C2975.m7942("LuckyPatcher: handler Null.");
                }
                C2500.m7177();
                return;
            }
            C2500.m7130(C2975.f9245.mo1874(), C2500.m7007(R.string.warning), C2500.m7007(R.string.warning_jex_optimised_firmware));
        }
    }

    public class C3695 extends C2931<C3477> {

        class C3696 extends Filter {
            C3696() {
            }

            @Override
            protected Filter.FilterResults performFiltering(CharSequence charSequence) {
                Filter.FilterResults filterResults = new Filter.FilterResults();
                ArrayList arrayList = new ArrayList();
                C3695 c3695 = C3695.this;
                if (c3695.f9124 == null) {
                    c3695.f9124 = c3695.f9122;
                }
                if (charSequence != null) {
                    List<Object> list = c3695.f9124;
                    if (list != 0 && list.size() > 0) {
                        for (Object object : C3695.this.f9124) {
                            if (object.f10044.toLowerCase().contains(charSequence.toString().toLowerCase())) {
                                arrayList.add(object);
                            }
                        }
                    }
                    arrayList.toArray(new C3477[arrayList.size()]);
                    filterResults.values = arrayList;
                }
                return filterResults;
            }

            @Override
            protected void publishResults(CharSequence charSequence, Filter.FilterResults filterResults) {
                C3695 c3695 = C3695.this;
                c3695.f9122 = (List) filterResults.values;
                c3695.notifyDataSetChanged();
            }
        }

        C3695(Context context, int i, List list) {
            super(context, i, list);
        }

        @Override
        public Filter getFilter() {
            return new C3696();
        }

        @Override
        public View getView(int i, View view, ViewGroup viewGroup) {
            View view2 = super.getView(i, view, viewGroup);
            TextView textView = (TextView) view2.findViewById(R.id.conttext);
            textView.setTextAppearance(getContext(), C2975.m7934());
            textView.setCompoundDrawablePadding((int) ((C2975.m7933().getDisplayMetrics().density * 5.0f) + 0.5f));
            String str = getItem(i).f10044.replace("disabled_", "").replace("chelpa_per_", "").replace("chelpus_", "").replace("android.permission.", "").replace("com.android.vending.", "") + "\n";
            if (getItem(i).f10045) {
                if (getItem(i).f10045 && getItem(i).f10044.contains("chelpus_")) {
                    textView.setText(C2500.m6934(str, "#ff00ffff", "bold"));
                    if (C2500.m7026(getItem(i).f10044)) {
                        textView.setText(C2500.m6934(str, "#ffffff00", "bold"));
                    }
                } else {
                    textView.setText(C2500.m6934(str, "#ff00ff00", "bold"));
                }
            } else {
                textView.setText(C2500.m6934(str, "#ffff0000", "bold"));
            }
            PackageManager m7932 = C2975.m7932();
            try {
                String charSequence = m7932.getPermissionInfo(getItem(i).f10044.replace("chelpa_per_", "").replace("chelpus_", ""), 0).loadDescription(m7932).toString();
                if (charSequence == null) {
                    String m7007 = C2500.m7007(R.string.permission_not_descr);
                    if (getItem(i).f10044.contains("chelpus_")) {
                        m7007 = C2500.m7007(R.string.activity_descr);
                    }
                    if (getItem(i).f10044.contains("chelpus_") && C2500.m7026(getItem(i).f10044)) {
                        m7007 = C2500.m7007(R.string.activity_ads_descr);
                    }
                    textView.append(C2500.m6934(m7007, "#ff888888", "italic"));
                } else {
                    textView.append(C2500.m6934(charSequence, "#ff888888", "italic"));
                }
            } catch (PackageManager.NameNotFoundException unused) {
                String m70072 = C2500.m7007(R.string.permission_not_descr);
                if (getItem(i).f10044.contains("chelpus_")) {
                    m70072 = C2500.m7007(R.string.activity_descr);
                }
                if (getItem(i).f10044.contains("chelpus_") && C2500.m7026(getItem(i).f10044)) {
                    m70072 = C2500.m7007(R.string.activity_ads_descr);
                }
                textView.append(C2500.m6934(m70072, "#ff888888", "italic"));
            } catch (NullPointerException unused2) {
                String m70073 = C2500.m7007(R.string.permission_not_descr);
                if (getItem(i).f10044.contains("chelpus_")) {
                    m70073 = C2500.m7007(R.string.activity_descr);
                }
                if (getItem(i).f10044.contains("chelpus_") && C2500.m7026(getItem(i).f10044)) {
                    m70073 = C2500.m7007(R.string.activity_ads_descr);
                }
                textView.append(C2500.m6934(m70073, "#ff888888", "italic"));
            }
            return view2;
        }
    }

    public class C3697 implements AdapterView.OnItemClickListener {
        C3697() {
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3477 item = C2975.f9265.getItem(i);
            if (item.f10045) {
                item.f10045 = false;
            } else {
                item.f10045 = true;
            }
            C2975.f9265.notifyDataSetChanged();
        }
    }

    public static void m8155() {
        try {
            MainActivity mainActivity = C2975.f9259;
            if (mainActivity == null || mainActivity.isFinishing()) {
                return;
            }
            C2913 c2913 = new C2913(C2975.f9245.mo1874(), true);
            View inflate = View.inflate(C2975.f9259, R.layout.help, null);
            Dialog m7851 = c2913.m7858(inflate).m7875(C2500.m7007(R.string.exit), null).m7851();
            Button button = (Button) inflate.findViewById(R.id.common_help);
            button.setText(C2500.m7007(R.string.help_common));
            Button button2 = (Button) m7851.findViewById(R.id.custom_patch_help);
            button2.setText(C2500.m7007(R.string.help_custom));
            ScrollView scrollView = new ScrollView(C2975.f9259);
            scrollView.setTag("common_help_tag");
            scrollView.setBackgroundColor(255);
            LinearLayout linearLayout = new LinearLayout(C2975.f9259);
            linearLayout.setBackgroundColor(255);
            linearLayout.setGravity(1);
            linearLayout.setOrientation(1);
            m8162(linearLayout, R.string.help_root_warning, "#FF0000", "bold");
            m8174(linearLayout, R.string.help_title1, "bold");
            m8160(linearLayout, R.drawable.green, R.string.help_green_apps, "");
            m8160(linearLayout, R.drawable.yellow, R.string.help_yellow_apps, "");
            m8160(linearLayout, R.drawable.cyan, R.string.help_cyan_apps, "");
            m8160(linearLayout, R.drawable.magenta, R.string.help_magenta_apps, "");
            m8160(linearLayout, R.drawable.purple, R.string.help_purple_apps, "");
            m8160(linearLayout, R.drawable.red, R.string.help_red_apps, "");
            m8160(linearLayout, R.drawable.orange, R.string.help_orange_apps, "");
            m8158(linearLayout, R.drawable.klev_down, -3473664, R.string.help_klever, "");
            m8158(linearLayout, R.drawable.round_scatter_plot_white_36, -16728876, R.string.help_3dot, "");
            m8158(linearLayout, R.drawable.star, -7680, R.string.help_star, "");
            m8164(linearLayout, R.string.help_bootlist_describing, new int[]{R.string.bootview}, -1, "");
            m8174(linearLayout, R.string.help_title_for_inapp, "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_sub_title_for_inapp_root) + "\n", "#ff9c00", "bold");
            m8162(linearLayout, R.string.help_sub_title_for_inapp_root_method1, "#36ff00", "italic");
            m8164(linearLayout, R.string.help_for_inapp_root_method1, new int[]{R.string.contextcorepatch1, R.string.billing_hack_menu, R.string.toolbar_system_utils, R.string.corepatches, R.string.market_install, R.string.mod_market_check}, -1, "");
            m8162(linearLayout, R.string.help_sub_title_for_inapp_root_method2, "#36ff00", "italic");
            m8164(linearLayout, R.string.help_for_inapp_root_method2, new int[]{R.string.proxyGP}, -1, "");
            m8162(linearLayout, R.string.help_sub_title_for_inapp_disadvantages_method, "#ff0000", "italic");
            m8162(linearLayout, R.string.help_for_inapp_root_method2_disadvantages, "#FFFFFFFF", "");
            m8162(linearLayout, R.string.help_sub_title_for_inapp_root_method3, "#36ff00", "italic");
            m8164(linearLayout, R.string.help_for_inapp_root_method3, new int[]{R.string.contextcorepatch4}, -1, "");
            m8162(linearLayout, R.string.help_sub_title_for_inapp_disadvantages_method, "#ff0000", "italic");
            m8162(linearLayout, R.string.help_for_inapp_root_method3_disadvantages, "#FFFFFFFF", "");
            m8162(linearLayout, R.string.help_sub_title_for_inapp_root_method4, "#36ff00", "italic");
            m8164(linearLayout, R.string.help_for_inapp_root_method4, new int[]{R.string.support_patch_billing_redirect_to_proxy, R.string.billing_proxy_server_for_support_patch_inapp, R.string.support_patch_billing_rebuild_dex}, -1, "");
            m8162(linearLayout, R.string.help_sub_title_for_inapp_disadvantages_method, "#ff0000", "italic");
            m8162(linearLayout, R.string.help_for_inapp_root_method4_disadvantages, "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.help_sub_title_for_inapp_non_root) + "\n", "#ff9c00", "bold");
            m8162(linearLayout, R.string.help_sub_title_for_inapp_non_root_method1, "#36ff00", "italic");
            m8164(linearLayout, R.string.help_for_inapp_non_root_method1, new int[]{R.string.createapksupport, R.string.billing_proxy_server_for_support_patch_inapp}, -1, "");
            m8164(linearLayout, R.string.help_for_inapp_non_root_method1_note, new int[]{R.string.context_signature_verification_kill_option}, -1, "");
            m8168(linearLayout, C2500.m7007(R.string.help_sub_title_for_purchase_window) + "\n", "#ff9c00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.billing_hack_option2), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_sub_describe_for_inapp_buy_dialog_save_purchase) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.inapp_emulation_auto_repeat), "#36ff00", "bold");
            m8170(linearLayout, C2500.m7007(R.string.help_sub_describe_for_inapp_buy_dialog_auto_purchase) + "\n", new int[]{R.string.context_remove_saved_purchaces}, -1, "");
            m8174(linearLayout, R.string.help_title_for_context_menu, "bold");
            m8168(linearLayout, C2500.m7007(R.string.contextbootlvl), "#36ff00", "bold");
            m8170(linearLayout, C2500.m7007(R.string.help_describe_for_lvl_remove) + "\n", new int[]{R.string.contextpattlvl1, R.string.contextpattlvl3, R.string.contextselpatt}, -1, "");
            m8168(linearLayout, C2500.m7007(R.string.contextbootlvl) + "(" + C2500.m7007(R.string.contextpattlvl_dex).replaceAll("\n", "  ") + ")", "#36ff00", "bold");
            StringBuilder sb = new StringBuilder();
            sb.append(C2500.m7007(R.string.help_describe_for_lvl_auto_mode_dex));
            sb.append("\n");
            m8168(linearLayout, sb.toString(), "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.contextbootlvl) + "(" + C2500.m7007(R.string.contextpattlvl1).replaceAll("\n", "  ") + ")", "#36ff00", "bold");
            StringBuilder sb2 = new StringBuilder();
            sb2.append(C2500.m7007(R.string.help_describe_for_lvl_auto_mode));
            sb2.append("\n");
            m8168(linearLayout, sb2.toString(), "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.contextbootlvl) + "(" + C2500.m7007(R.string.contextpattlvl2).replaceAll("\n", "  ") + ")", "#36ff00", "bold");
            StringBuilder sb3 = new StringBuilder();
            sb3.append(C2500.m7007(R.string.help_describe_for_lvl_auto_mode_inverse));
            sb3.append("\n");
            m8170(linearLayout, sb3.toString(), new int[]{R.string.contextpattlvl1}, -1, "");
            m8168(linearLayout, C2500.m7007(R.string.contextbootlvl) + "(" + C2500.m7007(R.string.contextpattlvl3).replaceAll("\n", "  ") + ")", "#36ff00", "bold");
            StringBuilder sb4 = new StringBuilder();
            sb4.append(C2500.m7007(R.string.help_describe_for_lvl_other_patches_extreme_mode));
            sb4.append("\n");
            m8168(linearLayout, sb4.toString(), "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.contextbootlvl) + "(" + C2500.m7007(R.string.contextselpatt) + ")", "#36ff00", "bold");
            StringBuilder sb5 = new StringBuilder();
            sb5.append(C2500.m7007(R.string.help_describe_for_lvl_sellect_patterns));
            sb5.append("\n");
            m8168(linearLayout, sb5.toString(), "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_removeAds), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_remove_ads) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_disableActivity), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_remove_ad_activities) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_support_patch), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_support_patch_inapp) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_disableComponents).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_disable_components_pm_disable) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_hard_apk_permission).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_hard_apk_permission_disale) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_safe_sign_apk_permission).replaceAll("\n", " "), "#36ff00", "bold");
            m8170(linearLayout, C2500.m7007(R.string.help_describe_for_safe_apk_permission_disale) + "\n", new int[]{R.string.contextcorepatch2}, -1, "");
            m8168(linearLayout, C2500.m7007(R.string.context_safe_apk_permission).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_safe_apk_permission_disale_rebuild_and_install) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.createapk).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_create_mod_apk) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.contextdeodex).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_remove_odex) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_remove_saved_purchaces).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_remove_purchase_from_db) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_backup_apk).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_backup_app) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_backup_data).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_backup_settings_app) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_restore_apk).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_restore_app) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_restore_data).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_restore_app_data) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.contextboot).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_patch_on_reboot) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_dexopt_app).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_create_odex) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.make_app_a_sys).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_move_to_system) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.move_to_sys).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_move_to_system) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.share_this_app).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_share_this_app) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.contextpattlvl4).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_apply_changes_to_dalvik_cache) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.contextpattlvl5).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_create_backup_before_patch) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_signature_verification_kill_option).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_signature_verification_killer) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.context_dex_verification_kill_option).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_dex_verification_killer) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.contextpattlvl6).replaceAll("\n", " "), "#36ff00", "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_describe_for_remove_dalvik_cache_after_patch) + "\n", "#FFFFFFFF", "");
            m8174(linearLayout, R.string.help_title_for_instructions, "bold");
            m8168(linearLayout, C2500.m7007(R.string.help_title_instruction_for_remove_lvl).replaceAll("\n", " "), "#36ff00", "bold");
            m8170(linearLayout, C2500.m7007(R.string.help_instruction_for_remove_lvl) + "\n", new int[]{R.string.contextbootlvl, R.string.contextpattlvl1, R.string.contextpattlvl2, R.string.contextpattlvl3, R.string.contextdeodex, R.string.contextreinstall}, -1, "");
            m8168(linearLayout, C2500.m7007(R.string.help_title_instruction_for_remove_ads).replaceAll("\n", " "), "#36ff00", "bold");
            m8172(linearLayout, C2500.m7007(R.string.help_instruction_for_remove_ads) + "\n", new int[]{R.string.contextads, R.string.context_removeAds, R.string.context_disableActivity, R.string.contextdeodex, R.string.contextreinstall}, "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.help_title_instruction_for_custom_patch).replaceAll("\n", " "), "#36ff00", "bold");
            m8172(linearLayout, C2500.m7007(R.string.help_instruction_for_custom_patch) + "\n", new int[]{R.string.contextcustompatch, R.string.contextdeodex, R.string.contextreinstall}, "#FFFFFFFF", "");
            m8168(linearLayout, C2500.m7007(R.string.help_title_instruction_for_create_apk).replaceAll("\n", " "), "#36ff00", "bold");
            m8172(linearLayout, C2500.m7007(R.string.help_instruction_for_create_apk) + "\n", new int[]{R.string.createapk}, "#FFFFFFFF", "");
            m8174(linearLayout, R.string.help_PS, "bold");
            LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1, 1.0f);
            layoutParams.leftMargin = (int) C2500.m7068(5.0f);
            layoutParams.rightMargin = (int) C2500.m7068(5.0f);
            layoutParams.topMargin = (int) C2500.m7068(5.0f);
            scrollView.setLayoutParams(layoutParams);
            scrollView.addView(linearLayout);
            LinearLayout linearLayout2 = (LinearLayout) inflate.findViewById(R.id.text);
            if (linearLayout2.findViewWithTag("common_help_tag") == null) {
                linearLayout2.addView(scrollView);
            }
            ScrollView scrollView2 = new ScrollView(C2975.f9259);
            scrollView2.setTag("custom_help_tag");
            scrollView2.setBackgroundColor(255);
            LinearLayout linearLayout3 = new LinearLayout(C2975.f9259);
            linearLayout3.setBackgroundColor(255);
            linearLayout3.setGravity(1);
            linearLayout3.setOrientation(1);
            m8174(linearLayout3, R.string.help_custom_title_general, "bold");
            m8162(linearLayout3, R.string.help_custom_general_text1, "#FFFFFFFF", "");
            m8162(linearLayout3, R.string.help_custom_general_text2, "#FFFFFFFF", "");
            m8162(linearLayout3, R.string.help_custom_general_text3, "#FFFFFFFF", "");
            m8162(linearLayout3, R.string.help_custom_general_text4, "#FFFFFFFF", "");
            m8162(linearLayout3, R.string.help_custom_general_text5, "#FFFFFFFF", "");
            m8162(linearLayout3, R.string.help_custom_general_text6, "#FFFFFFFF", "");
            m8162(linearLayout3, R.string.help_custom_general_text7, "#FFFFFFFF", "");
            m8162(linearLayout3, R.string.help_custom_warning_title, "#FF0000", "bold");
            m8162(linearLayout3, R.string.help_custom_warning_text, "#FFFFFFFF", "");
            m8174(linearLayout3, R.string.help_custom_title_syntax, "bold");
            m8162(linearLayout3, R.string.help_custom_syntax_text_start, "#FFFFFFFF", "");
            LinearLayout linearLayout4 = new LinearLayout(C2975.f9259);
            linearLayout4.setBackgroundColor(-13421773);
            linearLayout4.setGravity(1);
            linearLayout4.setOrientation(1);
            linearLayout4.setLayoutParams(layoutParams);
            linearLayout4.setPadding((int) C2500.m7068(5.0f), 0, 0, (int) C2500.m7068(5.0f));
            m8168(linearLayout4, "[BEGIN]", "#00FF00", "");
            m8168(linearLayout4, "<" + C2500.m7007(R.string.help_custom_begin_tag) + ">", "#FFFF00", "");
            m8168(linearLayout4, "Patch for XYZ Pro 5.0.5\n", "#FFFFFFFF", "");
            m8168(linearLayout4, "[PACKAGE]", "#00FF00", "");
            m8168(linearLayout4, "<" + C2500.m7007(R.string.help_custom_package_tag) + ">\n", "#FFFF00", "");
            m8168(linearLayout4, "[CLASSES]", "#00FF00", "");
            m8168(linearLayout4, "<" + C2500.m7007(R.string.help_custom_classes_tag) + ">", "#FFFF00", "");
            m8168(linearLayout4, "{\"search\":\"63 R0 R1 R2 38 00 04 00 12 10 0F 00\"}\n\n{\"group\":\"1\"}\n{\"original\":\"63 ?? ?? ?? 38 00 04 00 12 10 0F 00\"}\n{\"replaced\":\"12 00 6A W0 W1 W2 00 00 12 S0 0F 00\"}\n\n{\"group\":\"1\"}\n{\"original\":\"0F 00 00 00 1A 00 00 00 0F 00 00 00 59 00 00 00 2F\"}\n{\"replaced\":\"12 10 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\"}\n\n{\"original\":\"0F 00 00 00 1A 00 00\"}\n{\"replaced\":\"?? ?? ?? ?? 12 10 ??\"}\n\n{\"apk_build\":604-}\n{\"original\":\"0F 00 00 00 1A 00 00\"}\n{\"replaced\":\"?? ?? ?? ?? 12 10 ??\"}\n\n{\"classes_name\":\"classes2.dex\"}\n{\"original\":\"63 ?? ?? ?? 38 00 04 00 12 10 0F 00\"}\n{\"replaced\":\"12 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\"}\n", "#FFFFFFFF", "");
            m8168(linearLayout4, "[LIB]", "#00FF00", "");
            m8168(linearLayout4, "<" + C2500.m7007(R.string.help_custom_lib_tag) + ">", "#FFFF00", "");
            m8168(linearLayout4, "{\"name\":\"libtitanium.so\"}\n{\"apk_build\":604+}\n{\"original\":\"00 ** 50 e2\"}\n{\"replaced\":\"00 00 50 e1\"}\n", "#FFFFFFFF", "");
            m8168(linearLayout4, "[LIB]", "#00FF00", "");
            m8168(linearLayout4, "<" + C2500.m7007(R.string.help_custom_all_lib_tag) + ">", "#FFFF00", "");
            m8168(linearLayout4, "{\"name\":\"*\"}\n{\"original\":\"00 ** 50 e2\"}\n{\"replaced\":\"00 00 50 e1\"}\n", "#FFFFFFFF", "");
            m8168(linearLayout4, "[OTHER FILES]", "#00FF00", "");
            m8168(linearLayout4, "<" + C2500.m7007(R.string.help_custom_other_files_tag) + ">", "#FFFF00", "");
            m8168(linearLayout4, "{\"name\":\"/files/shell.dex\"}\n{\"original\":\"0F 00 00 00 1A 00 00 00 0F 00 00 00 59 00 00 00 2F\"}\n{\"replaced\":\"0F 00 00 00 0F 00 00 00 0F 00 00 00 59 00 00 00 2F\"}\n", "#FFFFFFFF", "");
            m8168(linearLayout4, "[OTHER FILES]", "#00FF00", "");
            m8168(linearLayout4, "{\"name\":\"/mnt/sdcard/Android/package-name/files/lives.xml\"}\n{\"original\":\"63 68 65 6C 70 61\"}\n{\"insert\":\"63 68 65 6c 70 61 61 61\"}\n", "#FFFFFFFF", "");
            m8168(linearLayout4, "[OTHER FILES]", "#00FF00", "");
            m8168(linearLayout4, "{\"name\":\"/mnt/sdcard/Android/package-name/files/settings.bin\"}\n{\"offset\":\"6CF0\"}\n{\"replaced\":\"99 99 65 FF\"}\n", "#FFFFFFFF", "");
            m8168(linearLayout4, "[FILE_IN_APK]", "#00FF00", "");
            m8168(linearLayout4, "<" + C2500.m7007(R.string.help_custom_file_in_apk_tag) + ">", "#FFFF00", "");
            m8168(linearLayout4, "{\"name\":\"assets/bin/Data/Managed/O7SharpCompress.dll\"}\n{\"original\":\"0F 00 00 00 1A 00 00 00 0F 00 00 00 59 00 00 00 2F\"}\n{\"replaced\":\"0F 00 00 00 0F 00 00 00 0F 00 00 00 59 00 00 00 2F\"}\n", "#FFFFFFFF", "");
            m8168(linearLayout4, "[ADD-BOOT]", "#00FF00", "");
            m8172(linearLayout4, "<" + C2500.m7007(R.string.help_custom_add_boot_tag) + ">\n", new int[]{R.string.bootview}, "#FFFF00", "");
            m8168(linearLayout4, "[END]", "#00FF00", "");
            m8168(linearLayout4, "<" + C2500.m7007(R.string.help_custom_end_tag) + ">", "#FFFF00", "");
            m8168(linearLayout4, "Congratulations, the application has been cracked!\n", "#FFFFFFFF", "");
            linearLayout3.addView(linearLayout4);
            m8168(linearLayout3, "\n" + C2500.m7007(R.string.help_custom_end) + "\n", "#FFFFFFFF", "");
            m8174(linearLayout3, R.string.help_custom_title_detailed_description, "bold");
            m8168(linearLayout3, "[BEGIN]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_begin_tag_detail) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "[PACKAGE]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_package_tag_detail) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "[CLASSES]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_classes_tag_detail) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"search\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_search_param), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"search\":\"63 R0 R1 R2 38 00 04 00 12 10 0F 00\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_search_param_end) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"classes_name\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_classes_name_param) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"group\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_group_param) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"apk_build\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_apk_build_param), "#FFFFFFFF", "");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_apk_build_param2), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[LIB-ARMEABI-V7A]\n{\"name\":\"libvkmedia.so\"}\n{\"apk_build\":\"22+\"}\n{\"apk_build\":\"32-\"}\n{\"original\":\"10 b9 01 20 ?? f7\"}\n{\"replaced\":\"10 b1 01 20 ?? f7\"}\n[END]\nCongratulations!", "#FFFFFFFF", "");
            m8168(linearLayout3, "\n\"original\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_original_param), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"original\":\"63 ?? ?? ?? 38 00 04 00 12 10 0F 00\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_original_param_end) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"offset\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_offset_param) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"replaced\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_replaced_param), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"replaced\":\"12 00 6A W0 W1 W2 00 00 12 00 0F 00\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_replaced_param_end) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"name\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_name_param) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "S0, S1, SQ", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_s0_s1_sq_param), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"original\":\"12 ?? ?? ?? ?? ??\"}\n{\"replaced\":\"12 S1 ?? ?? ?? ??\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_s0_s1_sq_param_end), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"original\":\"12 ?? ?? ?? ?? ??\"}\n{\"replaced\":\"12 S0 ?? ?? ?? ??\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "-# , +#", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_increment_decrement_param), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"original\":\"12 ?? ?? ?? ?? ??\"}\n{\"replaced\":\"12 -1 ?? ?? ?? +3\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_increment_decrement_param_end), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"original\":\"12 ?? ?? ?? ?? ??\"}\n{\"replaced\":\"12 -30 ?? +6 ?? ??\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"replace_from_file\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_replace_from_file_param), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"replace_from_file\":\"array.bin\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_replace_from_file_param_end) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"insert\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_insert_param), "#FFFFFFFF", "");
            m8156(linearLayout3, "{\"original\":\"63 68 65 6C 70 61\"}\n{\"insert\":\"63 68 65 6c 70 61 61\"}", "#FFFFFFFF", "");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_insert_param_end) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"method name\",\"class name\",\"parameter types\",\"return type\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_method_name_patch_param), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[CLASSES]\n//" + C2500.m7007(R.string.help_custom_method_name_patch_example1) + "\n{\"method name\":\"loadAD\"}\n{\"return type\":\"V\"}\n{\"replaced\":\"0E 00\"}\n\n//" + C2500.m7007(R.string.help_custom_method_name_patch_example2) + "\n{\"class name\":\"Lcom/appsflyer/AFb1bSDK;\"}\n{\"method name\":\"loadAD\"}\n{\"return type\":\"Z\"}\n{\"replaced\":\"12 00 0F 00\"}\n\n//" + C2500.m7007(R.string.help_custom_method_name_patch_example3) + "\n{\"class name\":\"Lcom/appsflyer/AFb1bSDK;\"}\n{\"method name\":\"AFInAppEventType\"}\n{\"parameter types\":\"ILjava/lang/Runnable;Ljava/util/concurrent/ThreadPoolExecutor;\"}\n{\"return type\":\"Lcom/appsflyer/AFc1tSDK;\"}\n{\"original\":\"22 00 ?? ?? 70 10 ?? ?? 00 00\"}\n{\"replaced\":\"00 00 00 00 ?? ?? ?? ?? ?? ??\"}\n\n[END]\nCongratulations!", "#FFFFFFFF", "");
            StringBuilder sb6 = new StringBuilder();
            sb6.append(C2500.m7007(R.string.help_custom_replace_from_file_param_end));
            sb6.append("\n");
            m8168(linearLayout3, sb6.toString(), "#FFFFFFFF", "");
            m8168(linearLayout3, "[LIB]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_lib_tags) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "[LIB-ARMEABI],[LIB-ARMEABI-V7A],[LIB-ARM64-V8A],[LIB-MIPS],[LIB-X86] or [LIB-X86_64]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_libs_tags) + "\n", "#FFFFFFFF", "");
            m8166(linearLayout3, C2500.m6934("[ODEX]", "#00FF00", "bold"), C2500.m6934(" (" + C2500.m7007(R.string.help_custom_deprecated_tag) + ")", "#FF0000", ""));
            StringBuilder sb7 = new StringBuilder();
            sb7.append(C2500.m7007(R.string.help_custom_odex_tags));
            sb7.append("\n");
            m8168(linearLayout3, sb7.toString(), "#FFFFFFFF", "");
            m8166(linearLayout3, C2500.m6934("[ODEX-PATCH]", "#00FF00", "bold"), C2500.m6934(" (" + C2500.m7007(R.string.help_custom_deprecated_tag) + ")", "#FF0000", ""));
            m8172(linearLayout3, C2500.m7007(R.string.help_custom_odex_patch_tag), new int[]{R.string.contextmultipatch}, "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[ODEX-PATCH]\n{\"original\":\"63 ?? ?? ?? 38 00 04 00 12 10 0F 00\"}\n{\"replaced\":\"12 00 6A ?? ?? ?? 00 00 12 00 0F 00\"}\n[END]\nCongratulations! ODEX modified!", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8166(linearLayout3, C2500.m6934("[CLASSES] without [PACKAGE]", "#00FF00", "bold"), C2500.m6934(" (" + C2500.m7007(R.string.help_custom_deprecated_tag) + ")", "#FF0000", ""));
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_classes_bez_package_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[CLASSES]\n{\"original\":\"63 ?? ?? ?? 38 00 04 00 12 10 0F 00\"}\n{\"replaced\":\"12 00 6A ?? ?? ?? 00 00 12 00 0F 00\"}\n[ADD-BOOT]\n[END]\nCongratulations!", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[COMPONENT]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_component_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[COMPONENT]\n{\"disable\":\"com.superApp.adsActivity\"}\n{\"enable\":\"com.superApp.fullVersion.Provider\"}\n{\"disable\":\"com.android.vending.CHECK_LICENSE\"}\n[END]\nCongratulations!", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[SQLITE]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_sqlite_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\nTrial Reset\n[SQLITE]\n{\"database\":\"/data/data/com.package.megaapp/databases/settings.db\"}\n{\"execute\":\"DELETE FROM table_settings WHERE name = 'SETTING__LIC'\"}\n{\"execute\":\"UPDATE table_settings SET UsedDays=0 WHERE name='Trial_set'\"}\n[END]\nCongratulations! Your Trial Period has been reset!", "#FFFFFFFF", "");
            m8168(linearLayout3, "\"database\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_database_param), "#FFFFFFFF", "");
            m8168(linearLayout3, "\"execute\"", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_execute_param) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "[SET_PERMISSIONS]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_permission_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\nTrial Reset\n[SET_PERMISSIONS]\n{\"file_name\":\"/files/stats\"}\n{\"permissions\":\"777\"}\n\n[OTHER FILES]\n{\"name\":\"/files/stats\"}\n\n{\"original\":\"4D 4D 46 31\"}\n{\"replaced\":\"00 4D 46 30\"}\n\n[SET_PERMISSIONS]\n{\"file_name\":\"/files/stats\"}\n{\"permissions\":\"444\"}\n\n[END]\nCongratulations! Your Trial Period has been reset!", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[COPY_FILE]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_copy_file_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\nCopy file with money\n[COPY_FILE]\n{\"file_name\":\"money_for_game.bin\"}\n{\"to\":\"/data/data/game_package/files/settings.xml\"}\n\n[END]\nCongratulations! Your File is copied and money is modified now!\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[SHARED-PREFERENCES]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_shared_preferences_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\nSet more money\n[SHARED-PREFERENCES]\n\n{\"file_name\":\"hillclimbprefs.xml\"}\n{\"insert\":\"int\"}\n{\"pref_name\":\"coins\"}\n{\"value\":\"550000\"}\n\n{\"insert\":\"string\"}\n{\"pref_name\":\"license_status\"}\n{\"value\":\"licensed\"}\n\n{\"insert\":\"long\"}\n{\"pref_name\":\"time_for_license_verify\"}\n{\"value\":\"365000\"}\n\n{\"delete\":\"boolean\"}\n{\"pref_name\":\"unlicensed\"}\n\n{\"file_name\":\"hillclimbprefs_config.xml\"}\n{\"insert\":\"float\"}\n{\"pref_name\":\"result_table\"}\n{\"value\":\"123.4\"}\n\n[END]\nCongratulations! Your File is copied and money is modified now!", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[PATCH ALL FILES]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_all_files_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\nMod for files of app\n\n[PATCH ALL FILES]\n\n{\"dir\":\"/data/data/com.jakyl.aftermathxhd/files\"}\n{\"template\":\"*.txt\"}\n{\"original\":\"63 68 65 6C 70 75 73\"}\n{\"replaced\":\"63 68 65 6C 70 75 73\"}\n\n{\"dir\":\"/data/data/com.jakyl.aftermathxhd/files\"}\n{\"template\":\"*data*.bin\"}\n{\"original\":\"63 68 65 6C 70 75 73\"}\n{\"replaced\":\"63 68 65 6C 70 75 73\"}\n\n{\"dir\":\"/data/data/com.jakyl.aftermathxhd/files\"}\n{\"template\":\"settings*\"}\n{\"original\":\"63 68 65 6C 70 75 73\"}\n{\"replaced\":\"63 68 65 6C 70 75 73\"}\n\n[END]\nCongratulations!", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[BLOCK HOSTS]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_block_hosts_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\nMod for files of app\n\n[BLOCK HOSTS]\n\n{\"host\":\"ya.ru\"}\n{\"host\":\"google.com\"}\n{\"host\":\"adobe.com\"}\n\n[END]\nCongratulations!", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[ADD_FILE_IN_APK]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_add_file_in_apk_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[ADD_FILE_IN_APK]\n\n{\"file_name\":\"file_for_add.bin\"}\n{\"to\":\"asset/start_money.xml\"}\n\n{\"file_name\":\"file_for_add_2.bin\"}\n{\"to\":\"armeabi-v7a/game.lib\"}\n\n[END]", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[RENAME_FILE_IN_APK]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_rename_file_in_apk_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[RENAME_FILE_IN_APK]\n\n{\"file_name\":\"lib/armeabi-v7a/libcr3engine-3-2-X.so\"}\n{\"new_file_name\":\"lib/armeabi-v7a/temp.so\"}\n\n{\"file_name\":\"res/raw/doc.css\"}\n{\"new_file_name\":\"res/raw/pro.css\"}\n\n[END]\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[DELETE_FILE_IN_APK]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_delete_file_in_apk_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[DELETE_FILE_IN_APK]\n\n{\"file_name\":\"res/raw/video_ads.css\"}\n\n{\"file_name\":\"res/raw/ads.css\"}\n\n[END]", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[DELETE_FOLDER_IN_APK]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_delete_folder_in_apk_tag), "#FFFFFFFF", "");
            m8156(linearLayout3, "[BEGIN]\n[DELETE_FOLDER_IN_APK]\n\n{\"name\":\"lib/armeabi-v7a\"}\n\n{\"name\":\"lib/x86\"}\n\n[END]", "#FFFFFFFF", "");
            m8168(linearLayout3, "", "#FFFFFFFF", "");
            m8168(linearLayout3, "[use_signature_verification_killer]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7009(R.string.help_custom_use_option_rebuild_tag, C2500.m7007(R.string.context_signature_verification_kill_option)) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "[use_dex_and_signature_verification_killer]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7009(R.string.help_custom_use_option_rebuild_tag, C2500.m7007(R.string.context_dex_verification_kill_option)) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "[use_fake_modified_apk_archive]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7009(R.string.help_custom_use_option_rebuild_tag, C2500.m7007(R.string.context_use_zip_crc_image)) + "\n", "#FFFFFFFF", "");
            m8168(linearLayout3, "[integrate_inapp_lvl_emulation]", "#00FF00", "bold");
            m8168(linearLayout3, C2500.m7007(R.string.help_custom_integrate_inapp_lvl_emulation_tag) + "\n", "#FFFFFFFF", "");
            scrollView2.setLayoutParams(layoutParams);
            scrollView2.addView(linearLayout3);
            button.setOnClickListener(new ViewOnClickListenerC3565(inflate, scrollView));
            button2.setOnClickListener(new ViewOnClickListenerC3566(inflate, scrollView2));
            C2500.m7117(m7851);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    static void m8156(LinearLayout linearLayout, String str, String str2, String str3) {
        LinearLayout linearLayout2 = new LinearLayout(C2975.f9259);
        linearLayout2.setBackgroundColor(-13421773);
        linearLayout2.setGravity(1);
        linearLayout2.setOrientation(1);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1, 1.0f);
        layoutParams.leftMargin = (int) C2500.m7068(5.0f);
        layoutParams.rightMargin = (int) C2500.m7068(5.0f);
        layoutParams.topMargin = (int) C2500.m7068(5.0f);
        linearLayout2.setLayoutParams(layoutParams);
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setText(C2500.m6934(str, str2, str3));
        textView.setPadding((int) C2500.m7068(5.0f), 0, 0, (int) C2500.m7068(5.0f));
        linearLayout2.addView(textView, layoutParams);
        linearLayout.addView(linearLayout2);
    }

    public static void m8157() {
        C2975.m7956(new RunnableC3580(new ArrayList[]{new ArrayList()}));
    }

    static void m8158(LinearLayout linearLayout, int i, int i2, int i3, String str) {
        LinearLayout linearLayout2 = new LinearLayout(C2975.f9259);
        linearLayout2.setOrientation(0);
        ImageView imageView = new ImageView(C2975.f9259);
        imageView.setColorFilter(i2, PorterDuff.Mode.MULTIPLY);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams((int) C2500.m7068(24.0f), (int) C2500.m7068(24.0f), 0.0f);
        layoutParams.leftMargin = (int) C2500.m7068(5.0f);
        layoutParams.topMargin = (int) C2500.m7068(4.0f);
        layoutParams.gravity = 51;
        imageView.setImageResource(i);
        linearLayout2.addView(imageView, layoutParams);
        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-2, -2, 0.0f);
        layoutParams2.leftMargin = (int) C2500.m7068(10.0f);
        layoutParams2.topMargin = (int) C2500.m7068(0.0f);
        layoutParams2.gravity = 51;
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setText(C2500.m6934(C2500.m7007(i3), "#FFFFFF", str));
        linearLayout2.addView(textView, layoutParams2);
        LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(-2, -2, 0.0f);
        layoutParams3.topMargin = (int) C2500.m7068(5.0f);
        layoutParams3.bottomMargin = (int) C2500.m7068(5.0f);
        layoutParams3.gravity = 51;
        linearLayout.addView(linearLayout2, layoutParams3);
    }

    public static void m8159(String str, String str2, int i, boolean z, boolean z2) {
        if (!C2975.f9323.booleanValue()) {
            C3746 c3746 = C2975.f9277;
            if (c3746 != null && c3746.m8243()) {
                C2975.f9277.m8248(str2);
                C2975.f9277.m8245(z);
                C2975.f9277.m8247(i);
                C2975.f9277.m8251(str);
                C2975.f9277.m8246(false, C2975.f9245.mo1874());
                return;
            }
            C2975.m7954(new RunnableC3636(z2, str2, z, i, str));
        }
    }

    static void m8160(LinearLayout linearLayout, int i, int i2, String str) {
        LinearLayout linearLayout2 = new LinearLayout(C2975.f9259);
        linearLayout2.setOrientation(0);
        ImageView imageView = new ImageView(C2975.f9259);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams((int) C2500.m7068(24.0f), (int) C2500.m7068(24.0f), 0.0f);
        layoutParams.leftMargin = (int) C2500.m7068(5.0f);
        layoutParams.topMargin = (int) C2500.m7068(4.0f);
        layoutParams.gravity = 51;
        imageView.setImageResource(i);
        linearLayout2.addView(imageView, layoutParams);
        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-2, -2, 0.0f);
        layoutParams2.leftMargin = (int) C2500.m7068(10.0f);
        layoutParams2.topMargin = (int) C2500.m7068(0.0f);
        layoutParams2.gravity = 51;
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setText(C2500.m6934(C2500.m7007(i2), "#FFFFFF", str));
        linearLayout2.addView(textView, layoutParams2);
        LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(-2, -2, 0.0f);
        layoutParams3.topMargin = (int) C2500.m7068(5.0f);
        layoutParams3.bottomMargin = (int) C2500.m7068(5.0f);
        layoutParams3.gravity = 51;
        linearLayout.addView(linearLayout2, layoutParams3);
    }

    public static void m8161(ArrayList<C3727> arrayList, boolean z) {
        C2975.m7954(new RunnableC3626(arrayList, z));
    }

    static void m8162(LinearLayout linearLayout, int i, String str, String str2) {
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setText(C2500.m6934(C2500.m7007(i), str, str2));
        linearLayout.addView(textView);
    }

    public static void m8163(String str, ArrayList<C3727> arrayList, boolean z) {
        C2975.m7954(new RunnableC3633(arrayList, z, str));
    }

    static void m8164(LinearLayout linearLayout, int i, int[] iArr, int i2, String str) {
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setTextColor(i2);
        textView.setTypeface(null, 0);
        if (str.equals("bold")) {
            textView.setTypeface(null, 1);
        }
        if (str.equals("italic")) {
            textView.setTypeface(null, 2);
        }
        textView.setText(C2500.m7008(i, iArr));
        linearLayout.addView(textView);
    }

    public static void m8165(String str) {
        C2913 c2913 = new C2913(C2975.f9245.mo1874());
        c2913.m7860(C2500.m7007(R.string.purchases_sorter_title));
        C2637 c2637 = new C2637(C2975.m7929(), str, false);
        if (c2637.m7284()) {
            ArrayList<C2640> m7283 = c2637.m7283();
            m7283.add(0, new C2640(C2500.m7007(R.string.empty), "", 0L, false, false));
            C3674 c3674 = new C3674(C2975.f9245.mo1874(), R.layout.contextmenu, m7283, c2637);
            c3674.setNotifyOnChange(true);
            c2913.m7863(true);
            c2913.m7862(c3674, new C3678());
            c2913.m7878(C2500.m7007(R.string.purchases_sorter_reset_button), new DialogInterfaceOnClickListenerC3651(c2637, c2913));
            c2913.m7875(C2500.m7007(R.string.close), null);
            c2913.m7851().show();
            return;
        }
        C2975 c2975 = C2975.f9245;
        if (c2975 != null) {
            C2500.m7130(c2975.mo1874(), C2500.m7007(R.string.information), C2500.m7007(R.string.purchases_sorter_message_not_need_sorter));
        }
    }

    static void m8166(LinearLayout linearLayout, SpannableString spannableString, SpannableString spannableString2) {
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setText(spannableString);
        textView.append(spannableString2);
        linearLayout.addView(textView);
    }

    public static void m8167() {
        C2500.m7125(C2500.m7007(R.string.information), C2500.m7007(R.string.message_reset_dialog_settings), new DialogInterfaceOnClickListenerC3567(), null, null);
    }

    static void m8168(LinearLayout linearLayout, String str, String str2, String str3) {
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setText(C2500.m6934(str, str2, str3));
        linearLayout.addView(textView);
    }

    public static void m8169(int i, boolean z, File file, C2597 c2597) {
        File file2;
        String[] strArr;
        int i2;
        String[] strArr2;
        ArrayList arrayList = new ArrayList();
        boolean[] zArr = {false};
        boolean[] zArr2 = {false};
        boolean[] zArr3 = {false};
        boolean[] zArr4 = {false};
        if (c2597 != null) {
            if (c2597.f7292) {
                zArr[0] = true;
                c2597.f7290 = false;
            }
            if (c2597.f7290) {
                zArr2[0] = true;
            }
            if (c2597.f7302) {
                zArr3[0] = true;
            }
            if (c2597.f7304) {
                zArr4[0] = true;
            }
        }
        C2975.m7942("" + file);
        if (file == null) {
            PackageManager m7932 = C2975.m7932();
            try {
                String[] strArr3 = m7932.getPackageInfo(C2975.f9253.f10046, 12800).requestedPermissions;
                if (strArr3 != null) {
                    int length = strArr3.length;
                    int i3 = 0;
                    while (i3 < length) {
                        String str = strArr3[i3];
                        if (str.startsWith("disabled_")) {
                            strArr2 = strArr3;
                            arrayList.add(new C3477("chelpa_per_" + str.replace("disabled_", ""), false));
                        } else {
                            strArr2 = strArr3;
                            arrayList.add(new C3477(str, true));
                        }
                        i3++;
                        strArr3 = strArr2;
                    }
                }
            } catch (PackageManager.NameNotFoundException e) {
                e.printStackTrace();
            } catch (NullPointerException e2) {
                e2.printStackTrace();
            }
            try {
                PackageInfo packageInfo = m7932.getPackageInfo(C2975.f9253.f10046, 8705);
                int i4 = 0;
                while (true) {
                    ActivityInfo[] activityInfoArr = packageInfo.activities;
                    if (i4 >= activityInfoArr.length) {
                        break;
                    }
                    if (!activityInfoArr[i4].name.startsWith("disabled_")) {
                        arrayList.add(new C3477("chelpus_" + packageInfo.activities[i4].name, true));
                    }
                    if (packageInfo.activities[i4].name.startsWith("disabled_")) {
                        arrayList.add(new C3477("chelpus_" + packageInfo.activities[i4].name, false));
                    }
                    i4++;
                }
            } catch (PackageManager.NameNotFoundException e3) {
                e3.printStackTrace();
            } catch (NullPointerException e4) {
                e4.printStackTrace();
            }
        } else {
            if (C2500.m7027(file.getName())) {
                file2 = C2500.m6928(file);
            } else {
                file2 = file;
            }
            PackageManager m79322 = C2975.m7932();
            PackageInfo packageArchiveInfo = m79322.getPackageArchiveInfo(file2.getAbsolutePath(), 4608);
            if (packageArchiveInfo != null) {
                ApplicationInfo applicationInfo = packageArchiveInfo.applicationInfo;
                applicationInfo.sourceDir = file2.getAbsolutePath();
                applicationInfo.publicSourceDir = file2.getAbsolutePath();
            }
            arrayList.clear();
            try {
                String[] strArr4 = packageArchiveInfo.requestedPermissions;
                C2975.m7942(strArr4);
                if (strArr4 != null) {
                    int length2 = strArr4.length;
                    int i5 = 0;
                    while (i5 < length2) {
                        String str2 = strArr4[i5];
                        C2975.m7942(str2);
                        if (str2.startsWith("disabled_")) {
                            strArr = strArr4;
                            i2 = length2;
                            arrayList.add(new C3477("chelpa_per_" + str2.replace("disabled_", ""), false));
                        } else {
                            strArr = strArr4;
                            i2 = length2;
                            arrayList.add(new C3477(str2, true));
                        }
                        i5++;
                        strArr4 = strArr;
                        length2 = i2;
                    }
                }
            } catch (NullPointerException unused) {
            }
            PackageInfo packageArchiveInfo2 = m79322.getPackageArchiveInfo(file2.getAbsolutePath(), 513);
            int i6 = 0;
            while (true) {
                try {
                    ActivityInfo[] activityInfoArr2 = packageArchiveInfo2.activities;
                    if (i6 >= activityInfoArr2.length) {
                        break;
                    }
                    if (!activityInfoArr2[i6].name.startsWith("disabled_")) {
                        arrayList.add(new C3477("chelpus_" + packageArchiveInfo2.activities[i6].name, true));
                    }
                    if (packageArchiveInfo2.activities[i6].name.startsWith("disabled_")) {
                        arrayList.add(new C3477("chelpus_" + packageArchiveInfo2.activities[i6].name, false));
                    }
                    i6++;
                } catch (Exception e5) {
                    e5.printStackTrace();
                }
            }
        }
        if (arrayList.size() <= 0) {
            arrayList.add(new C3477(C2500.m7007(R.string.permission_not_found), false));
        }
        C2931<C3477> c2931 = C2975.f9265;
        if (c2931 != null) {
            c2931.notifyDataSetChanged();
        }
        C2975.f9265 = new C3695(C2975.f9245.mo1874(), R.layout.contextmenu, arrayList);
        C2913 c2913 = new C2913(C2975.f9245.mo1874());
        C2931<C3477> c29312 = C2975.f9265;
        if (c29312 != null) {
            c29312.setNotifyOnChange(true);
            c2913.m7863(true);
            c2913.m7864(C2975.f9265, new C3697());
            c2913.m7875(C2500.m7007(R.string.create_perm_ok), new DialogInterfaceOnClickListenerC3654(c2597, i, zArr, zArr2, zArr4, zArr3, z));
            if (z || file != null) {
                c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3656(c2913, zArr2, zArr), zArr2[0]);
                c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3551(c2913, zArr2, zArr), zArr[0]);
                c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3619(zArr4), zArr4[0]);
                c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3596(c2913, zArr2, zArr3), zArr3[0]);
            }
            c2913.m7851().show();
        }
    }

    static void m8170(LinearLayout linearLayout, String str, int[] iArr, int i, String str2) {
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setTextColor(i);
        textView.setTypeface(null, 0);
        if (str2.equals("bold")) {
            textView.setTypeface(null, 1);
        }
        if (str2.equals("italic")) {
            textView.setTypeface(null, 2);
        }
        textView.setText(C2500.m7010(str, iArr, true));
        linearLayout.addView(textView);
    }

    public static void m8171(boolean z, File file) {
        String str;
        String str2;
        ArrayAdapter m8180;
        String m7007;
        C3478 c3478;
        try {
            c3478 = C2975.f9253;
        } catch (Throwable th) {
            th = th;
            str = "";
        }
        if (c3478 != null) {
            str2 = c3478.f10047;
        } else {
            if (z && file != null) {
                try {
                } catch (Exception e) {
                    e = e;
                    str = "";
                }
                if (file.exists() && file.canRead()) {
                    if (!file.getName().toLowerCase().endsWith(".apk")) {
                        str = "";
                    } else {
                        str = C2500.m6921(file.getAbsolutePath());
                    }
                    try {
                        try {
                            if (C2500.m7027(file.getName())) {
                                str2 = C2500.m6923(file);
                            }
                        } catch (Exception e2) {
                            e = e2;
                            e.printStackTrace();
                            str2 = str;
                            C2913 c2913 = new C2913(C2975.f9245.mo1874());
                            ArrayList arrayList = new ArrayList();
                            arrayList.add(new C3727(R.string.create_clone_option2, R.string.create_clone_option2_descr, "#ff00ff00", true));
                            arrayList.add(new C3727(R.string.create_clone_option1, R.string.create_clone_option1_descr, "#ff00ff00", false));
                            arrayList.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str2 + " Clone", (InputFilter) null, "#ff00ff00", false));
                            arrayList.add(new C3727(R.string.change_sharedUserId, 0, "#ff00ff00", true));
                            arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                            arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                            arrayList.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", false));
                            if (z) {
                            }
                            m8180 = m8180(arrayList);
                            if (m8180 != null) {
                            }
                            c2913.m7851().show();
                        }
                    } catch (Throwable th2) {
                        th = th2;
                        th.printStackTrace();
                        str2 = str;
                        C2913 c29132 = new C2913(C2975.f9245.mo1874());
                        ArrayList arrayList2 = new ArrayList();
                        arrayList2.add(new C3727(R.string.create_clone_option2, R.string.create_clone_option2_descr, "#ff00ff00", true));
                        arrayList2.add(new C3727(R.string.create_clone_option1, R.string.create_clone_option1_descr, "#ff00ff00", false));
                        arrayList2.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str2 + " Clone", (InputFilter) null, "#ff00ff00", false));
                        arrayList2.add(new C3727(R.string.change_sharedUserId, 0, "#ff00ff00", true));
                        arrayList2.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                        arrayList2.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                        arrayList2.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", false));
                        if (z) {
                        }
                        m8180 = m8180(arrayList2);
                        if (m8180 != null) {
                        }
                        c29132.m7851().show();
                    }
                    str2 = str;
                }
            }
            str2 = "";
        }
        C2913 c291322 = new C2913(C2975.f9245.mo1874());
        ArrayList arrayList22 = new ArrayList();
        arrayList22.add(new C3727(R.string.create_clone_option2, R.string.create_clone_option2_descr, "#ff00ff00", true));
        arrayList22.add(new C3727(R.string.create_clone_option1, R.string.create_clone_option1_descr, "#ff00ff00", false));
        arrayList22.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str2 + " Clone", (InputFilter) null, "#ff00ff00", false));
        arrayList22.add(new C3727(R.string.change_sharedUserId, 0, "#ff00ff00", true));
        arrayList22.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
        arrayList22.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
        arrayList22.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", false));
        if (z) {
            arrayList22.add(new C3727(R.string.context_original_resign_app, C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), 0, "#ffffff00", false));
        }
        m8180 = m8180(arrayList22);
        if (m8180 != null) {
            m8180.setNotifyOnChange(true);
            c291322.m7863(true);
            c291322.m7862(m8180, new C3650(m8180));
            DialogInterfaceOnClickListenerC3653 dialogInterfaceOnClickListenerC3653 = new DialogInterfaceOnClickListenerC3653(m8180, file);
            if (!z) {
                m7007 = C2500.m7007(R.string.patch_ok);
            } else {
                m7007 = C2500.m7007(R.string.create_perm_ok);
            }
            c291322.m7875(m7007, dialogInterfaceOnClickListenerC3653);
        }
        c291322.m7851().show();
    }

    static void m8172(LinearLayout linearLayout, String str, int[] iArr, String str2, String str3) {
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setTextColor(Color.parseColor(str2));
        textView.setTypeface(null, 0);
        if (str3.equals("bold")) {
            textView.setTypeface(null, 1);
        }
        if (str3.equals("italic")) {
            textView.setTypeface(null, 2);
        }
        textView.setText(C2500.m7010(str, iArr, true));
        linearLayout.addView(textView);
    }

    public static void m8173(boolean z, File file, C2597 c2597) {
        String m7007;
        C2913 c2913 = new C2913(C2975.f9245.mo1874());
        ArrayList arrayList = new ArrayList();
        arrayList.add(new C3727(R.string.contextblockfileads, R.string.contextblockfileads_descr, "#ff00ff00", true));
        arrayList.add(new C3727(R.string.contextpattads3, R.string.contextpattads3_descr, "#ff00ff00", true));
        arrayList.add(new C3727(R.string.contextpattads6, R.string.contextpattads6_descr, "#ff00ff00", true));
        arrayList.add(new C3727(R.string.contextpattads4, R.string.contextpattads4_descr, "#ff00ff00", true));
        arrayList.add(new C3727(R.string.context_dependencies, R.string.contextpattdependencies_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextfulloffline, R.string.contextfulloffline_descr, "#ff00ff00", false));
        if (!z && C2975.f9299 < 23) {
            arrayList.add(new C3727(R.string.contextpattlvl4, R.string.contextpattlvl4_descr, "#ffffff00", false));
        }
        if (file == null) {
            arrayList.add(new C3727(R.string.contextpattlvl5, R.string.contextpattlvl5_descr, "#ffffff00", false));
        }
        if (!z && C2975.f9299 < 23) {
            arrayList.add(new C3727(R.string.contextpattlvl6, R.string.contextpattlvl6_descr, "#ffff0000", false));
        }
        if (z) {
            if (c2597 != null) {
                if (c2597.f7292) {
                    c2597.f7290 = false;
                }
                arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", c2597.f7290));
                arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", c2597.f7292));
                arrayList.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", c2597.f7304));
                arrayList.add(new C3727(R.string.context_original_resign_app, C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), 0, "#ffffff00", c2597.f7302));
            } else {
                arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_original_resign_app, C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), 0, "#ffffff00", false));
            }
        }
        ArrayAdapter m8180 = m8180(arrayList);
        if (m8180 != null) {
            m8180.setNotifyOnChange(true);
            c2913.m7863(true);
            c2913.m7862(m8180, new C3558(m8180));
            DialogInterfaceOnClickListenerC3571 dialogInterfaceOnClickListenerC3571 = new DialogInterfaceOnClickListenerC3571(c2597, m8180, z, file);
            if (!z) {
                if (c2597 == null) {
                    m7007 = C2500.m7007(R.string.patch_ok);
                } else {
                    m7007 = C2500.m7007(R.string.multipatch_next_step);
                }
            } else if (c2597 == null) {
                m7007 = C2500.m7007(R.string.create_perm_ok);
            } else {
                m7007 = C2500.m7007(R.string.multipatch_next_step);
            }
            c2913.m7875(m7007, dialogInterfaceOnClickListenerC3571);
        }
        c2913.m7851().show();
    }

    static void m8174(LinearLayout linearLayout, int i, String str) {
        View linearLayout2 = new LinearLayout(C2975.f9259);
        linearLayout2.setBackgroundColor(-1);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, (int) C2500.m7068(1.0f), 0.0f);
        layoutParams.topMargin = (int) C2500.m7068(14.0f);
        layoutParams.bottomMargin = (int) C2500.m7068(2.0f);
        linearLayout.addView(linearLayout2, layoutParams);
        TextView textView = new TextView(C2975.f9259);
        textView.setTextAppearance(C2975.f9259, C2975.m7934());
        textView.setText(C2500.m6934(C2500.m7007(i), "#FFFFFF", str));
        linearLayout.addView(textView);
        View linearLayout3 = new LinearLayout(C2975.f9259);
        linearLayout3.setBackgroundColor(-1);
        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, (int) C2500.m7068(1.0f), 0.0f);
        layoutParams2.topMargin = (int) C2500.m7068(4.0f);
        layoutParams2.bottomMargin = (int) C2500.m7068(14.0f);
        linearLayout.addView(linearLayout3, layoutParams2);
    }

    public static void m8175(boolean z, File file, C2597 c2597) {
        String m7007;
        C2913 c2913 = new C2913(C2975.f9245.mo1874());
        ArrayList arrayList = new ArrayList();
        arrayList.add(new C3727(R.string.contextpattlvl_dex, R.string.contextpattlvl_dex_descr, "#ff00ff00", true));
        arrayList.add(new C3727(R.string.contextpattlvl1, R.string.contextpattlvl1_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextpattlvl2, R.string.contextpattlvl2_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextpattlvl3, R.string.contextpattlvl3_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextpattamazon, R.string.contextpattamazon_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextpattsamsung, R.string.contextpattsamsung_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.context_dependencies, R.string.contextpattdependencies_descr, "#ff00ff00", false));
        if (!z && C2975.f9299 < 23) {
            arrayList.add(new C3727(R.string.contextpattlvl4, R.string.contextpattlvl4_descr, "#ffffff00", false));
        }
        if (file == null) {
            arrayList.add(new C3727(R.string.contextpattlvl5, R.string.contextpattlvl5_descr, "#ffffff00", false));
        }
        if (!z && C2975.f9299 < 23) {
            arrayList.add(new C3727(R.string.contextpattlvl6, R.string.contextpattlvl6_descr, "#ffff0000", false));
        }
        if (z) {
            if (c2597 != null) {
                if (c2597.f7292) {
                    c2597.f7290 = false;
                }
                arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", c2597.f7290));
                arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", c2597.f7292));
                arrayList.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", c2597.f7304));
                arrayList.add(new C3727(R.string.context_original_resign_app, C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), 0, "#ffffff00", c2597.f7302));
            } else {
                arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_original_resign_app, C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), 0, "#ffffff00", false));
            }
        }
        ArrayAdapter m8180 = m8180(arrayList);
        if (m8180 != null) {
            m8180.setNotifyOnChange(true);
            c2913.m7863(true);
            c2913.m7862(m8180, new C3637(m8180));
            DialogInterfaceOnClickListenerC3661 dialogInterfaceOnClickListenerC3661 = new DialogInterfaceOnClickListenerC3661(c2597, m8180, z, file);
            if (!z) {
                if (c2597 == null) {
                    m7007 = C2500.m7007(R.string.patch_ok);
                } else {
                    m7007 = C2500.m7007(R.string.multipatch_next_step);
                }
            } else if (c2597 == null) {
                m7007 = C2500.m7007(R.string.create_perm_ok);
            } else {
                m7007 = C2500.m7007(R.string.multipatch_next_step);
            }
            c2913.m7875(m7007, dialogInterfaceOnClickListenerC3661);
        }
        c2913.m7851().show();
    }

    public static void m8176(File[] fileArr, Runnable runnable, String str) {
        f10205 = true;
        LinearLayout linearLayout = (LinearLayout) View.inflate(C2975.f9245.mo1874(), R.layout.file_browser, null);
        ((Button) linearLayout.findViewById(R.id.settings)).setVisibility(8);
        Dialog m7851 = new C2913(C2975.f9245.mo1874(), true).m7858(linearLayout).m7852(C2500.m7007(R.string.exit), new DialogInterfaceOnClickListenerC3576()).m7851();
        m7851.setCancelable(false);
        m7851.setOnKeyListener(new DialogInterfaceOnKeyListenerC3577(str));
        m7851.show();
        ListView listView = (ListView) linearLayout.findViewById(R.id.list);
        f10207 = (TextView) m7851.findViewById(R.id.path);
        String parent = new File(C2975.f9292).getParent();
        while (new File(new File(parent).getParent()).getParent() != null) {
            try {
                parent = new File(parent).getParent();
                System.out.println("Parent directory:" + parent);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        f10206 = parent;
        listView.setOnItemClickListener(new C3578(str, fileArr, runnable, m7851));
        f10208 = (ListView) linearLayout.findViewById(R.id.list);
        try {
            try {
                System.out.println(f10206);
                System.out.println("");
                m8182(f10206, (ListView) linearLayout.findViewById(R.id.list), f10205, false, str);
            } catch (Exception unused) {
                String parent2 = new File(C2975.f9251).getParent();
                f10206 = parent2;
                m8182(parent2, (ListView) linearLayout.findViewById(R.id.list), f10205, false, str);
            }
        } catch (Exception unused2) {
            String str2 = C2975.f9251;
            f10206 = str2;
            m8182(str2, (ListView) linearLayout.findViewById(R.id.list), f10205, false, str);
        }
    }

    public static void m8177(File file, boolean z, File file2, boolean z2, C2597 c2597) {
        String str;
        C2913 c2913;
        String str2;
        String m7007;
        String str3;
        BufferedReader bufferedReader;
        String readLine;
        String str4;
        C2975 c2975 = C2975.f9245;
        if (c2975 != null && c2975.mo1874() != null) {
            C2975.m7942("Custom patch dialog create.");
            boolean[] zArr = {false};
            boolean[] zArr2 = {false};
            boolean[] zArr3 = {false};
            boolean[] zArr4 = {false};
            if (!z && file2 == null) {
                str = "";
            } else {
                try {
                    str = C2500.m7072(file);
                    try {
                        if (str.toLowerCase().contains("[use_signature_verification_killer]")) {
                            zArr2[0] = true;
                        }
                        if (str.toLowerCase().contains("[use_dex_and_signature_verification_killer]")) {
                            zArr[0] = true;
                        }
                        if (str.toLowerCase().contains("[use_fake_modified_apk_archive]")) {
                            zArr4[0] = true;
                        }
                    } catch (Throwable th) {
                        th = th;
                        th.printStackTrace();
                        if (c2597 != null) {
                        }
                        c2913 = new C2913(C2975.f9245.mo1874());
                        c2913.m7876("");
                        try {
                            TextView textView = c2913.f9086;
                            textView.setText(C2500.m6934("---------------------------------------------\n", "", "bold"));
                            textView.append(C2500.m6933(C2500.m7007(R.string.custom_sel_app) + "\n", -16711821, "bold"));
                            textView.append(C2500.m6934("---------------------------------------------\n", "", "bold"));
                            try {
                                if (!C2975.f9282.equals("")) {
                                }
                                textView.append(C2500.m6934("\n-----------------------------------------------\n", "", "bold"));
                                FileInputStream fileInputStream = new FileInputStream(file.toString());
                                bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream, "UTF-8"));
                                String[] strArr = new String[2000];
                                str2 = str;
                                boolean z3 = false;
                                int i = 0;
                                str3 = "";
                                while (true) {
                                    try {
                                        try {
                                            readLine = bufferedReader.readLine();
                                            if (readLine != null) {
                                            }
                                        } catch (PackageManager.NameNotFoundException e) {
                                            e = e;
                                            e.printStackTrace();
                                            if (!z) {
                                            }
                                            c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3655(c2913, zArr2, zArr), zArr2[0]);
                                            c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3657(c2913, zArr2, zArr), zArr[0]);
                                            c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3659(zArr4), zArr4[0]);
                                            c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3673(c2913, zArr2, zArr3), zArr3[0]);
                                            if (z) {
                                            }
                                            c2913.m7875(m7007, new DialogInterfaceOnClickListenerC3679(z2, file, c2597, str2, z, file2, zArr, zArr2, zArr4, zArr3)).m7878(C2500.m7007(R.string.dontusepatch), null).m7881(new DialogInterfaceOnCancelListenerC3677()).m7865(true).m7851().show();
                                        } catch (NullPointerException unused) {
                                            if (!z) {
                                            }
                                            c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3655(c2913, zArr2, zArr), zArr2[0]);
                                            c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3657(c2913, zArr2, zArr), zArr[0]);
                                            c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3659(zArr4), zArr4[0]);
                                            c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3673(c2913, zArr2, zArr3), zArr3[0]);
                                            if (z) {
                                            }
                                            c2913.m7875(m7007, new DialogInterfaceOnClickListenerC3679(z2, file, c2597, str2, z, file2, zArr, zArr2, zArr4, zArr3)).m7878(C2500.m7007(R.string.dontusepatch), null).m7881(new DialogInterfaceOnCancelListenerC3677()).m7865(true).m7851().show();
                                        }
                                    } catch (FileNotFoundException unused2) {
                                    } catch (IOException e2) {
                                        e = e2;
                                    }
                                }
                                str4 = str3;
                                fileInputStream.close();
                                str3 = str4;
                                textView.append(C2500.m6933(C2500.m7007(R.string.custom_descript) + "\n", -990142, "bold"));
                                textView.append(C2500.m6934("-----------------------------------------------\n", "", "bold"));
                                textView.append(C2500.m6933(str3, -990142, "bold"));
                                try {
                                    Linkify.addLinks(textView, 3);
                                } catch (Throwable th2) {
                                    th2.printStackTrace();
                                }
                                textView.setTextAppearance(C2975.f9245.mo1874(), C2975.m7934());
                            } catch (NullPointerException unused3) {
                                str2 = str;
                            }
                        } catch (NullPointerException unused4) {
                            str2 = str;
                        }
                        if (!z) {
                        }
                        c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3655(c2913, zArr2, zArr), zArr2[0]);
                        c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3657(c2913, zArr2, zArr), zArr[0]);
                        c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3659(zArr4), zArr4[0]);
                        c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3673(c2913, zArr2, zArr3), zArr3[0]);
                        if (z) {
                        }
                        c2913.m7875(m7007, new DialogInterfaceOnClickListenerC3679(z2, file, c2597, str2, z, file2, zArr, zArr2, zArr4, zArr3)).m7878(C2500.m7007(R.string.dontusepatch), null).m7881(new DialogInterfaceOnCancelListenerC3677()).m7865(true).m7851().show();
                    }
                } catch (Throwable th3) {
                    th = th3;
                    str = "";
                }
            }
            if (c2597 != null) {
                if (c2597.f7292 || zArr[0]) {
                    zArr[0] = true;
                    c2597.f7290 = false;
                }
                if (c2597.f7290 || zArr2[0]) {
                    zArr2[0] = true;
                }
                if (c2597.f7302) {
                    zArr3[0] = true;
                }
                if (c2597.f7304 || zArr4[0]) {
                    zArr4[0] = true;
                }
            }
            c2913 = new C2913(C2975.f9245.mo1874());
            c2913.m7876("");
            try {
                TextView textView2 = c2913.f9086;
                textView2.setText(C2500.m6934("---------------------------------------------\n", "", "bold"));
                textView2.append(C2500.m6933(C2500.m7007(R.string.custom_sel_app) + "\n", -16711821, "bold"));
                textView2.append(C2500.m6934("---------------------------------------------\n", "", "bold"));
                if (!C2975.f9282.equals("")) {
                    textView2.append(C2500.m6933("\n" + C2975.f9253.f10047, -16711821, "bold"));
                    textView2.append(C2500.m6933("\n" + C2500.m7007(R.string.statversion) + " ", -16711821, "bold"));
                    textView2.append(C2500.m6933(C2500.m6975(C2975.f9253.f10046), -16711821, "bold"));
                    textView2.append(C2500.m6933("\n" + C2500.m7007(R.string.statbuild) + " ", -16711821, "bold"));
                    textView2.append(C2500.m6933("" + C2975.m7932().getPackageInfo(C2975.f9253.f10046, ItemType.CLASS_DATA_ITEM).versionCode + "\n", -16711821, "bold"));
                } else {
                    if (C2975.f9282.toLowerCase().endsWith(".apk")) {
                        textView2.append(C2500.m6933("\n" + C2500.m6921(C2975.f9282), -16711821, "bold"));
                        textView2.append(C2500.m6933("\n" + C2500.m7007(R.string.statversion) + " ", -16711821, "bold"));
                        StringBuilder sb = new StringBuilder();
                        sb.append("");
                        sb.append(C2500.m6922(C2975.f9282, 1).versionName);
                        textView2.append(C2500.m6933(sb.toString(), -16711821, "bold"));
                        textView2.append(C2500.m6933("\n" + C2500.m7007(R.string.statbuild) + " ", -16711821, "bold"));
                        textView2.append(C2500.m6933("" + C2500.m6922(C2975.f9282, 1).versionCode + "\n", -16711821, "bold"));
                    }
                    if (C2975.f9282.toLowerCase().endsWith(".apks") || C2975.f9282.toLowerCase().endsWith(".xapk")) {
                        textView2.append(C2500.m6933("\n" + C2500.m6923(new File(C2975.f9282)), -16711821, "bold"));
                        textView2.append(C2500.m6933("\n" + C2500.m7007(R.string.statversion) + " ", -16711821, "bold"));
                        StringBuilder sb2 = new StringBuilder();
                        sb2.append("");
                        sb2.append(C2500.m6926(new File(C2975.f9282)));
                        textView2.append(C2500.m6933(sb2.toString(), -16711821, "bold"));
                        textView2.append(C2500.m6933("\n" + C2500.m7007(R.string.statbuild) + " ", -16711821, "bold"));
                        textView2.append(C2500.m6933("" + C2500.m6925(new File(C2975.f9282)) + "\n", -16711821, "bold"));
                    }
                }
                textView2.append(C2500.m6934("\n-----------------------------------------------\n", "", "bold"));
                try {
                    FileInputStream fileInputStream2 = new FileInputStream(file.toString());
                    bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream2, "UTF-8"));
                    String[] strArr2 = new String[2000];
                    str2 = str;
                    boolean z32 = false;
                    int i2 = 0;
                    str3 = "";
                    while (true) {
                        readLine = bufferedReader.readLine();
                        if (readLine != null) {
                            break;
                        }
                        strArr2[0] = readLine;
                        BufferedReader bufferedReader2 = bufferedReader;
                        if (z32) {
                            try {
                                if (readLine.contains("[") || strArr2[0].contains("]") || strArr2[0].contains("{")) {
                                    C2975.m7942("" + str3 + "\n");
                                    i2++;
                                    z32 = false;
                                }
                            } catch (FileNotFoundException unused5) {
                                C2975.m7942("Custom Patch not Found in\n/sdcard/LuckyPatcher/\n");
                                textView2.append(C2500.m6933(C2500.m7007(R.string.custom_descript) + "\n", -990142, "bold"));
                                textView2.append(C2500.m6934("-----------------------------------------------\n", "", "bold"));
                                textView2.append(C2500.m6933(str3, -990142, "bold"));
                                Linkify.addLinks(textView2, 3);
                                textView2.setTextAppearance(C2975.f9245.mo1874(), C2975.m7934());
                                if (!z) {
                                }
                                c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3655(c2913, zArr2, zArr), zArr2[0]);
                                c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3657(c2913, zArr2, zArr), zArr[0]);
                                c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3659(zArr4), zArr4[0]);
                                c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3673(c2913, zArr2, zArr3), zArr3[0]);
                                if (z) {
                                }
                                c2913.m7875(m7007, new DialogInterfaceOnClickListenerC3679(z2, file, c2597, str2, z, file2, zArr, zArr2, zArr4, zArr3)).m7878(C2500.m7007(R.string.dontusepatch), null).m7881(new DialogInterfaceOnCancelListenerC3677()).m7865(true).m7851().show();
                            } catch (IOException e3) {
                                e = e3;
                                C2975.m7942("" + e);
                                textView2.append(C2500.m6933(C2500.m7007(R.string.custom_descript) + "\n", -990142, "bold"));
                                textView2.append(C2500.m6934("-----------------------------------------------\n", "", "bold"));
                                textView2.append(C2500.m6933(str3, -990142, "bold"));
                                Linkify.addLinks(textView2, 3);
                                textView2.setTextAppearance(C2975.f9245.mo1874(), C2975.m7934());
                                if (!z) {
                                }
                                c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3655(c2913, zArr2, zArr), zArr2[0]);
                                c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3657(c2913, zArr2, zArr), zArr[0]);
                                c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3659(zArr4), zArr4[0]);
                                c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3673(c2913, zArr2, zArr3), zArr3[0]);
                                if (z) {
                                }
                                c2913.m7875(m7007, new DialogInterfaceOnClickListenerC3679(z2, file, c2597, str2, z, file2, zArr, zArr2, zArr4, zArr3)).m7878(C2500.m7007(R.string.dontusepatch), null).m7881(new DialogInterfaceOnCancelListenerC3677()).m7865(true).m7851().show();
                            }
                        }
                        if (z32) {
                            StringBuilder sb3 = new StringBuilder();
                            sb3.append(str3);
                            sb3.append("\n");
                            str4 = str3;
                            try {
                                sb3.append(strArr2[0]);
                                str3 = sb3.toString();
                            } catch (FileNotFoundException unused6) {
                                str3 = str4;
                                C2975.m7942("Custom Patch not Found in\n/sdcard/LuckyPatcher/\n");
                                textView2.append(C2500.m6933(C2500.m7007(R.string.custom_descript) + "\n", -990142, "bold"));
                                textView2.append(C2500.m6934("-----------------------------------------------\n", "", "bold"));
                                textView2.append(C2500.m6933(str3, -990142, "bold"));
                                Linkify.addLinks(textView2, 3);
                                textView2.setTextAppearance(C2975.f9245.mo1874(), C2975.m7934());
                                if (!z) {
                                }
                                c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3655(c2913, zArr2, zArr), zArr2[0]);
                                c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3657(c2913, zArr2, zArr), zArr[0]);
                                c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3659(zArr4), zArr4[0]);
                                c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3673(c2913, zArr2, zArr3), zArr3[0]);
                                if (z) {
                                }
                                c2913.m7875(m7007, new DialogInterfaceOnClickListenerC3679(z2, file, c2597, str2, z, file2, zArr, zArr2, zArr4, zArr3)).m7878(C2500.m7007(R.string.dontusepatch), null).m7881(new DialogInterfaceOnCancelListenerC3677()).m7865(true).m7851().show();
                            } catch (IOException e4) {
                                e = e4;
                                str3 = str4;
                                C2975.m7942("" + e);
                                textView2.append(C2500.m6933(C2500.m7007(R.string.custom_descript) + "\n", -990142, "bold"));
                                textView2.append(C2500.m6934("-----------------------------------------------\n", "", "bold"));
                                textView2.append(C2500.m6933(str3, -990142, "bold"));
                                Linkify.addLinks(textView2, 3);
                                textView2.setTextAppearance(C2975.f9245.mo1874(), C2975.m7934());
                                if (!z) {
                                }
                                c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3655(c2913, zArr2, zArr), zArr2[0]);
                                c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3657(c2913, zArr2, zArr), zArr[0]);
                                c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3659(zArr4), zArr4[0]);
                                c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3673(c2913, zArr2, zArr3), zArr3[0]);
                                if (z) {
                                }
                                c2913.m7875(m7007, new DialogInterfaceOnClickListenerC3679(z2, file, c2597, str2, z, file2, zArr, zArr2, zArr4, zArr3)).m7878(C2500.m7007(R.string.dontusepatch), null).m7881(new DialogInterfaceOnCancelListenerC3677()).m7865(true).m7851().show();
                            }
                        }
                        if (strArr2[0].toUpperCase().contains("[BEGIN]")) {
                            if (i2 > 0) {
                                str3 = str3 + "\n-------- " + C2500.m7007(R.string.next_custom_patch) + " --------\n";
                            }
                            bufferedReader = bufferedReader2;
                            z32 = true;
                        } else {
                            bufferedReader = bufferedReader2;
                        }
                    }
                    str4 = str3;
                    fileInputStream2.close();
                    str3 = str4;
                } catch (FileNotFoundException unused7) {
                    str2 = str;
                    str3 = "";
                } catch (IOException e5) {
                    e = e5;
                    str2 = str;
                    str3 = "";
                }
                textView2.append(C2500.m6933(C2500.m7007(R.string.custom_descript) + "\n", -990142, "bold"));
                textView2.append(C2500.m6934("-----------------------------------------------\n", "", "bold"));
                textView2.append(C2500.m6933(str3, -990142, "bold"));
                Linkify.addLinks(textView2, 3);
                textView2.setTextAppearance(C2975.f9245.mo1874(), C2975.m7934());
            } catch (PackageManager.NameNotFoundException e6) {
                e = e6;
                str2 = str;
            }
            if (!z || file2 != null) {
                c2913.m7866(C2500.m7007(R.string.context_signature_verification_kill_option), new C3655(c2913, zArr2, zArr), zArr2[0]);
                c2913.m7867(C2500.m7007(R.string.context_dex_verification_kill_option), new C3657(c2913, zArr2, zArr), zArr[0]);
                c2913.m7868(C2500.m7007(R.string.context_use_zip_crc_image), new C3659(zArr4), zArr4[0]);
                c2913.m7869(C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), new C3673(c2913, zArr2, zArr3), zArr3[0]);
            }
            if (z) {
                if (c2597 == null) {
                    m7007 = C2500.m7007(R.string.usepatch);
                } else {
                    m7007 = C2500.m7007(R.string.multipatch_next_step);
                }
            } else if (c2597 == null) {
                m7007 = C2500.m7007(R.string.create_perm_ok);
            } else {
                m7007 = C2500.m7007(R.string.multipatch_next_step);
            }
            c2913.m7875(m7007, new DialogInterfaceOnClickListenerC3679(z2, file, c2597, str2, z, file2, zArr, zArr2, zArr4, zArr3)).m7878(C2500.m7007(R.string.dontusepatch), null).m7881(new DialogInterfaceOnCancelListenerC3677()).m7865(true).m7851().show();
        }
    }

    public static void m8178(File[] fileArr, Runnable runnable, CompoundButton.OnCheckedChangeListener onCheckedChangeListener) {
        f10205 = true;
        LinearLayout linearLayout = (LinearLayout) View.inflate(C2975.f9245.mo1874(), R.layout.file_browser, null);
        ((Button) linearLayout.findViewById(R.id.settings)).setVisibility(8);
        C2913 m7875 = new C2913(C2975.f9245.mo1874(), true).m7858(linearLayout).m7852(C2500.m7007(R.string.binder_browser_create_dir), null).m7875(C2500.m7007(R.string.binder_browser_select), new DialogInterfaceOnClickListenerC3569(fileArr, runnable));
        if (onCheckedChangeListener != null) {
            m7875.m7866(C2500.m7007(R.string.change_folder_checkbox), onCheckedChangeListener, true);
        }
        Dialog m7851 = m7875.m7851();
        m7851.setCancelable(false);
        m7851.setOnKeyListener(new DialogInterfaceOnKeyListenerC3570(m7851));
        m7851.show();
        ListView listView = (ListView) linearLayout.findViewById(R.id.list);
        Button button = (Button) m7851.findViewById(R.id.button_settings);
        button.setOnClickListener(new ViewOnClickListenerC3572(button, listView, linearLayout));
        f10207 = (TextView) m7851.findViewById(R.id.path);
        String parent = new File(C2975.f9292).getParent();
        while (new File(new File(parent).getParent()).getParent() != null) {
            try {
                parent = new File(parent).getParent();
                System.out.println("Parent directory:" + parent);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        f10206 = parent;
        listView.setOnItemClickListener(new C3575(button));
        f10208 = (ListView) linearLayout.findViewById(R.id.list);
        try {
            try {
                System.out.println(f10206);
                System.out.println("");
                m8182(f10206, (ListView) linearLayout.findViewById(R.id.list), f10205, true, "");
                button.setText(C2500.m7007(R.string.enter_manual_path));
            } catch (Exception unused) {
                String parent2 = new File(C2975.f9251).getParent();
                f10206 = parent2;
                m8182(parent2, (ListView) linearLayout.findViewById(R.id.list), f10205, true, "");
            }
        } catch (Exception unused2) {
            String str = C2975.f9251;
            f10206 = str;
            m8182(str, (ListView) linearLayout.findViewById(R.id.list), f10205, true, "");
        }
    }

    public static void m8179(boolean z, File file) {
        String m7007;
        C2913 c2913 = new C2913(C2975.f9245.mo1874());
        ArrayList arrayList = new ArrayList();
        arrayList.add(new C3727(R.string.contextpatt1, R.string.contextpatt1_descr, "#ff00ff00", true));
        arrayList.add(new C3727(R.string.contextpatt2, R.string.contextpatt2_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextpatt3, R.string.contextpatt3_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextpatt4, R.string.contextpatt4_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextpatt5, R.string.contextpatt5_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.contextpatt6, R.string.contextpatt6_descr, "#ff00ff00", false));
        if (!z && C2975.f9299 < 23) {
            arrayList.add(new C3727(R.string.contextpattlvl4, R.string.contextpattlvl4_descr, "#ffffff00", false));
        }
        if (file == null) {
            arrayList.add(new C3727(R.string.contextpattlvl5, R.string.contextpattlvl5_descr, "#ffffff00", false));
        }
        if (!z && C2975.f9299 < 23) {
            arrayList.add(new C3727(R.string.contextpattlvl6, R.string.contextpattlvl6_descr, "#ffff0000", false));
        }
        if (z) {
            arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
        }
        if (z) {
            arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
        }
        if (z) {
            arrayList.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", false));
        }
        if (z) {
            arrayList.add(new C3727(R.string.context_original_resign_app, C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), 0, "#ffffff00", false));
        }
        ArrayAdapter m8180 = m8180(arrayList);
        if (m8180 != null) {
            m8180.setNotifyOnChange(true);
            c2913.m7863(true);
            c2913.m7862(m8180, new C3624(m8180));
            DialogInterfaceOnClickListenerC3660 dialogInterfaceOnClickListenerC3660 = new DialogInterfaceOnClickListenerC3660(m8180, z, file);
            if (!z) {
                m7007 = C2500.m7007(R.string.patch_ok);
            } else {
                m7007 = C2500.m7007(R.string.create_perm_ok);
            }
            c2913.m7875(m7007, dialogInterfaceOnClickListenerC3660);
        }
        c2913.m7851().show();
    }

    public static ArrayAdapter m8180(ArrayList<C3727> arrayList) {
        return new C3629(C2975.f9245.mo1874(), R.layout.contextmenu, arrayList);
    }

    public static void m8181(boolean z, File file) {
        String str;
        ?? r8;
        int i;
        ?? r0;
        ArrayAdapter m8180;
        File file2;
        String str2;
        String str3;
        int i2;
        File file3;
        File file4;
        PackageInfo packageInfo;
        File file5 = null;
        try {
            C3478 c3478 = C2975.f9253;
            if (c3478 != null) {
                str = c3478.f10047;
                try {
                    PackageInfo packageInfo2 = C2975.m7932().getPackageInfo(C2975.f9253.f10046, 0);
                    i = packageInfo2.versionCode;
                    try {
                        r0 = C2500.m6994(new File(packageInfo2.applicationInfo.publicSourceDir));
                    } catch (Throwable th) {
                        th = th;
                        r8 = 0;
                        th.printStackTrace();
                        r0 = r8;
                        C2913 c2913 = new C2913(C2975.f9245.mo1874());
                        ArrayList arrayList = new ArrayList();
                        m8180 = m8180(arrayList);
                        C3727 c3727 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(r12, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                        C3727[] c3727Arr = {c3727};
                        arrayList.add(c3727);
                        if (file5 != null) {
                        }
                        arrayList.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                        arrayList.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                        arrayList.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                        arrayList.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                        arrayList.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                        if (m8180 != null) {
                        }
                        c2913.m7851().show();
                    }
                } catch (Throwable th2) {
                    th = th2;
                    r8 = 0;
                    i = 0;
                    th.printStackTrace();
                    r0 = r8;
                    C2913 c29132 = new C2913(C2975.f9245.mo1874());
                    ArrayList arrayList2 = new ArrayList();
                    m8180 = m8180(arrayList2);
                    C3727 c37272 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                    C3727[] c3727Arr2 = {c37272};
                    arrayList2.add(c37272);
                    if (file5 != null) {
                    }
                    arrayList2.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                    arrayList2.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                    arrayList2.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                    arrayList2.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                    arrayList2.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                    if (m8180 != null) {
                    }
                    c29132.m7851().show();
                }
            } else if (!z || file == null) {
                str = "";
                r0 = 0;
                i = 0;
            } else {
                try {
                    if (!file.exists() || !file.canRead()) {
                        str = "";
                        file2 = null;
                        i = 0;
                    } else {
                        if (!file.getName().toLowerCase().endsWith(".apk")) {
                            str2 = "";
                            str3 = str2;
                            r8 = 0;
                            i2 = 0;
                        } else {
                            str2 = C2500.m6968(file);
                            str3 = C2500.m6921(file.getAbsolutePath());
                            try {
                                i2 = C2500.m7013(file);
                                try {
                                    r8 = C2500.m6994(file);
                                } catch (Exception e) {
                                    e = e;
                                    file2 = null;
                                    str = str3;
                                    i = i2;
                                    try {
                                        e.printStackTrace();
                                        r0 = file5;
                                        file5 = file2;
                                    } catch (Throwable th3) {
                                        th = th3;
                                        r8 = file5;
                                        file5 = file2;
                                        th.printStackTrace();
                                        r0 = r8;
                                        C2913 c291322 = new C2913(C2975.f9245.mo1874());
                                        ArrayList arrayList22 = new ArrayList();
                                        m8180 = m8180(arrayList22);
                                        C3727 c372722 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr2, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                        C3727[] c3727Arr22 = {c372722};
                                        arrayList22.add(c372722);
                                        if (file5 != null) {
                                        }
                                        arrayList22.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                        arrayList22.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                        arrayList22.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                        arrayList22.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                        arrayList22.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                        if (m8180 != null) {
                                        }
                                        c291322.m7851().show();
                                    }
                                    C2913 c2913222 = new C2913(C2975.f9245.mo1874());
                                    ArrayList arrayList222 = new ArrayList();
                                    m8180 = m8180(arrayList222);
                                    C3727 c3727222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr22, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                    C3727[] c3727Arr222 = {c3727222};
                                    arrayList222.add(c3727222);
                                    if (file5 != null) {
                                    }
                                    arrayList222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                    arrayList222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                    arrayList222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                    arrayList222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                    arrayList222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                    if (m8180 != null) {
                                    }
                                    c2913222.m7851().show();
                                } catch (Throwable th4) {
                                    th = th4;
                                    r8 = 0;
                                    str = str3;
                                    i = i2;
                                    th.printStackTrace();
                                    r0 = r8;
                                    C2913 c29132222 = new C2913(C2975.f9245.mo1874());
                                    ArrayList arrayList2222 = new ArrayList();
                                    m8180 = m8180(arrayList2222);
                                    C3727 c37272222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                    C3727[] c3727Arr2222 = {c37272222};
                                    arrayList2222.add(c37272222);
                                    if (file5 != null) {
                                    }
                                    arrayList2222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                    arrayList2222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                    arrayList2222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                    arrayList2222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                    arrayList2222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                    if (m8180 != null) {
                                    }
                                    c29132222.m7851().show();
                                }
                            } catch (Exception e2) {
                                e = e2;
                                file2 = null;
                                str = str3;
                                i = 0;
                                e.printStackTrace();
                                r0 = file5;
                                file5 = file2;
                                C2913 c291322222 = new C2913(C2975.f9245.mo1874());
                                ArrayList arrayList22222 = new ArrayList();
                                m8180 = m8180(arrayList22222);
                                C3727 c372722222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr2222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                C3727[] c3727Arr22222 = {c372722222};
                                arrayList22222.add(c372722222);
                                if (file5 != null) {
                                }
                                arrayList22222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                arrayList22222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                arrayList22222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                arrayList22222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                arrayList22222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                if (m8180 != null) {
                                }
                                c291322222.m7851().show();
                            } catch (Throwable th5) {
                                th = th5;
                                r8 = 0;
                                str = str3;
                                i = 0;
                                th.printStackTrace();
                                r0 = r8;
                                C2913 c2913222222 = new C2913(C2975.f9245.mo1874());
                                ArrayList arrayList222222 = new ArrayList();
                                m8180 = m8180(arrayList222222);
                                C3727 c3727222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr22222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                C3727[] c3727Arr222222 = {c3727222222};
                                arrayList222222.add(c3727222222);
                                if (file5 != null) {
                                }
                                arrayList222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                arrayList222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                arrayList222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                arrayList222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                arrayList222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                if (m8180 != null) {
                                }
                                c2913222222.m7851().show();
                            }
                        }
                        try {
                            r8 = r8;
                            if (C2500.m7027(file.getName())) {
                                str = C2500.m6923(file);
                                try {
                                    i = C2500.m7013(C2500.m6928(file));
                                    try {
                                        r8 = C2500.m6994(C2500.m6928(file));
                                        str3 = str;
                                        str2 = C2500.m6968(C2500.m6928(file));
                                        i2 = i;
                                        r8 = r8;
                                    } catch (Exception e3) {
                                        e = e3;
                                        file2 = null;
                                        file4 = r8;
                                        file5 = file4;
                                        e.printStackTrace();
                                        r0 = file5;
                                        file5 = file2;
                                        C2913 c29132222222 = new C2913(C2975.f9245.mo1874());
                                        ArrayList arrayList2222222 = new ArrayList();
                                        m8180 = m8180(arrayList2222222);
                                        C3727 c37272222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr222222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                        C3727[] c3727Arr2222222 = {c37272222222};
                                        arrayList2222222.add(c37272222222);
                                        if (file5 != null) {
                                        }
                                        arrayList2222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                        arrayList2222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                        arrayList2222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                        arrayList2222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                        arrayList2222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                        if (m8180 != null) {
                                        }
                                        c29132222222.m7851().show();
                                    } catch (Throwable th6) {
                                        th = th6;
                                        th.printStackTrace();
                                        r0 = r8;
                                        C2913 c291322222222 = new C2913(C2975.f9245.mo1874());
                                        ArrayList arrayList22222222 = new ArrayList();
                                        m8180 = m8180(arrayList22222222);
                                        C3727 c372722222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr2222222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                        C3727[] c3727Arr22222222 = {c372722222222};
                                        arrayList22222222.add(c372722222222);
                                        if (file5 != null) {
                                        }
                                        arrayList22222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                        arrayList22222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                        arrayList22222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                        arrayList22222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                        arrayList22222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                        if (m8180 != null) {
                                        }
                                        c291322222222.m7851().show();
                                    }
                                } catch (Exception e4) {
                                    e = e4;
                                    file2 = null;
                                    file3 = r8;
                                    i = i2;
                                    file4 = file3;
                                    file5 = file4;
                                    e.printStackTrace();
                                    r0 = file5;
                                    file5 = file2;
                                    C2913 c2913222222222 = new C2913(C2975.f9245.mo1874());
                                    ArrayList arrayList222222222 = new ArrayList();
                                    m8180 = m8180(arrayList222222222);
                                    C3727 c3727222222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr22222222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                    C3727[] c3727Arr222222222 = {c3727222222222};
                                    arrayList222222222.add(c3727222222222);
                                    if (file5 != null) {
                                    }
                                    arrayList222222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                    arrayList222222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                    arrayList222222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                    arrayList222222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                    arrayList222222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                    if (m8180 != null) {
                                    }
                                    c2913222222222.m7851().show();
                                } catch (Throwable th7) {
                                    th = th7;
                                    i = i2;
                                    th.printStackTrace();
                                    r0 = r8;
                                    C2913 c29132222222222 = new C2913(C2975.f9245.mo1874());
                                    ArrayList arrayList2222222222 = new ArrayList();
                                    m8180 = m8180(arrayList2222222222);
                                    C3727 c37272222222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr222222222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                    C3727[] c3727Arr2222222222 = {c37272222222222};
                                    arrayList2222222222.add(c37272222222222);
                                    if (file5 != null) {
                                    }
                                    arrayList2222222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                    arrayList2222222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                    arrayList2222222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                    arrayList2222222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                    arrayList2222222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                    if (m8180 != null) {
                                    }
                                    c29132222222222.m7851().show();
                                }
                            }
                            try {
                                packageInfo = C2975.m7932().getPackageInfo(str2, 64);
                                C2975.m7942(Integer.valueOf(packageInfo.signatures[0].hashCode()));
                            } catch (PackageManager.NameNotFoundException unused) {
                            }
                            if (-672009692 != packageInfo.signatures[0].hashCode()) {
                                file2 = new File(packageInfo.applicationInfo.sourceDir);
                                if (file2 != null) {
                                    try {
                                        if (!file2.getName().toLowerCase().endsWith(".apk")) {
                                            file2 = null;
                                        }
                                    } catch (Exception e5) {
                                        e = e5;
                                        str = str3;
                                        file3 = r8;
                                        i = i2;
                                        file4 = file3;
                                        file5 = file4;
                                        e.printStackTrace();
                                        r0 = file5;
                                        file5 = file2;
                                        C2913 c291322222222222 = new C2913(C2975.f9245.mo1874());
                                        ArrayList arrayList22222222222 = new ArrayList();
                                        m8180 = m8180(arrayList22222222222);
                                        C3727 c372722222222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr2222222222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                        C3727[] c3727Arr22222222222 = {c372722222222222};
                                        arrayList22222222222.add(c372722222222222);
                                        if (file5 != null) {
                                        }
                                        arrayList22222222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                        arrayList22222222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                        arrayList22222222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                        arrayList22222222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                        arrayList22222222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                        if (m8180 != null) {
                                        }
                                        c291322222222222.m7851().show();
                                    } catch (Throwable th8) {
                                        th = th8;
                                        str = str3;
                                        i = i2;
                                        r8 = r8;
                                        file5 = file2;
                                        th.printStackTrace();
                                        r0 = r8;
                                        C2913 c2913222222222222 = new C2913(C2975.f9245.mo1874());
                                        ArrayList arrayList222222222222 = new ArrayList();
                                        m8180 = m8180(arrayList222222222222);
                                        C3727 c3727222222222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr22222222222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                                        C3727[] c3727Arr222222222222 = {c3727222222222222};
                                        arrayList222222222222.add(c3727222222222222);
                                        if (file5 != null) {
                                        }
                                        arrayList222222222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                        arrayList222222222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                                        arrayList222222222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                                        arrayList222222222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                                        arrayList222222222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                                        if (m8180 != null) {
                                        }
                                        c2913222222222222.m7851().show();
                                    }
                                }
                                str = str3;
                                i = i2;
                                file5 = r8;
                            } else {
                                C2975.m7942("Installed app have test signature. Skip option copy signature from insyalled app");
                                file2 = null;
                                if (file2 != null) {
                                }
                                str = str3;
                                i = i2;
                                file5 = r8;
                            }
                        } catch (Exception e6) {
                            e = e6;
                            file2 = null;
                        } catch (Throwable th9) {
                            th = th9;
                            str = str3;
                            i = i2;
                            th.printStackTrace();
                            r0 = r8;
                            C2913 c29132222222222222 = new C2913(C2975.f9245.mo1874());
                            ArrayList arrayList2222222222222 = new ArrayList();
                            m8180 = m8180(arrayList2222222222222);
                            C3727 c37272222222222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr222222222222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
                            C3727[] c3727Arr2222222222222 = {c37272222222222222};
                            arrayList2222222222222.add(c37272222222222222);
                            if (file5 != null) {
                            }
                            arrayList2222222222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                            arrayList2222222222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
                            arrayList2222222222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
                            arrayList2222222222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
                            arrayList2222222222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
                            if (m8180 != null) {
                            }
                            c29132222222222222.m7851().show();
                        }
                    }
                } catch (Exception e7) {
                    e = e7;
                    str = "";
                    file2 = null;
                }
                r0 = file5;
                file5 = file2;
            }
        } catch (Throwable th10) {
            th = th10;
            str = "";
        }
        C2913 c291322222222222222 = new C2913(C2975.f9245.mo1874());
        ArrayList arrayList22222222222222 = new ArrayList();
        m8180 = m8180(arrayList22222222222222);
        C3727 c372722222222222222 = new C3727(R.string.context_use_apk_for_original_signature, R.string.context_use_apk_for_original_signature_describe, R.string.button_select_original_apk_with_signature, (View.OnClickListener) new ViewOnClickListenerC3631(c3727Arr2222222222222, new ArrayAdapter[]{m8180}), "#ffffff00", false);
        C3727[] c3727Arr22222222222222 = {c372722222222222222};
        arrayList22222222222222.add(c372722222222222222);
        if (file5 != null) {
            arrayList22222222222222.add(new C3727(R.string.context_use_installed_apk_for_original_signature, R.string.context_use_installed_apk_for_original_signature_descr, "#ffffff00", false));
        }
        arrayList22222222222222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
        arrayList22222222222222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3635(), Integer.MAX_VALUE, "#ff00ff00", false));
        arrayList22222222222222.add(new C3727(R.string.change_minimumSDK, 0, "" + r0.f7645, (InputFilter) new C3639(), "#ff00ff00", false));
        arrayList22222222222222.add(new C3727(R.string.change_compileSDK, 0, "" + r0.f7644, (InputFilter) new C3641(), "#ff00ff00", false));
        arrayList22222222222222.add(new C3727(R.string.change_targetSDK, 0, "" + r0.f7643, (InputFilter) new C3644(), "#ff00ff00", false));
        if (m8180 != null) {
            m8180.setNotifyOnChange(true);
            c291322222222222222.m7863(true);
            c291322222222222222.m7862(m8180, new C3646(m8180));
            c291322222222222222.m7875(C2500.m7007(R.string.button_resign_app), new DialogInterfaceOnClickListenerC3648(m8180, file5, file));
        }
        c291322222222222222.m7851().show();
    }

    public static void m8182(String str, ListView listView, boolean z, boolean z2, String str2) {
        boolean z3;
        C2975.m7942("dir get");
        f10209 = str;
        f10207.setText("Location: " + str);
        ArrayList arrayList = new ArrayList();
        File file = new File(str);
        File[] listFiles = file.listFiles();
        if (listFiles == null) {
            C2975.m7942("null files for start dir list");
        }
        C2975.m7942("root " + f10206);
        C2975.m7942("current dir:'" + f10209 + "'");
        if ((!str.equals("") && !str.equals(InternalZipConstants.ZIP_FILE_SEPARATOR) && !str.equals(f10206) && !str.equals("/storage/emulated")) || !z) {
            if (file.getParent() != null) {
                arrayList.add(new C2624("../", file.getParent()));
            }
            if (listFiles != null && listFiles.length > 0) {
                for (File file2 : listFiles) {
                    Iterator it = arrayList.iterator();
                    boolean z4 = false;
                    while (it.hasNext()) {
                        if (((C2624) it.next()).f7520.equals(file2.getAbsolutePath())) {
                            z4 = true;
                        }
                    }
                    if (file2.canRead() && !z4 && (file2.isDirectory() || (!z2 && (((file2.toString().toLowerCase().endsWith(".apk") || C2500.m7027(file2.toString()) || file2.toString().toLowerCase().endsWith(".odex") || file2.toString().toLowerCase().endsWith(".jar") || file2.toString().toLowerCase().endsWith(".oat") || file2.toString().toLowerCase().endsWith(".lpzip")) && str2.equals("") && C2975.f9364) || ((!C2975.f9364 && file2.isFile()) || (!str2.equals("") && file2.getName().toLowerCase().endsWith(str2))))))) {
                        arrayList.add(new C2624(file2.toString()));
                    }
                }
            }
        } else {
            C2975.m7942("root " + f10206);
            if (!f10206.equals(C2975.f9251) && z) {
                new ArrayList().clear();
                ArrayList<File> m7002 = C2500.m7002();
                if (m7002 != null && m7002.size() > 0) {
                    Iterator<File> it2 = m7002.iterator();
                    while (it2.hasNext()) {
                        File next = it2.next();
                        arrayList.add(new C2624(next.getAbsolutePath()));
                        C2975.m7942("From var " + next.getAbsolutePath());
                    }
                }
                File[] listFiles2 = new File(f10206).listFiles();
                if (listFiles2 != null) {
                    for (File file3 : listFiles2) {
                        C2975.m7942(file3.getAbsolutePath());
                        if (file3.canRead()) {
                            if (m7002 != null && m7002.size() > 0) {
                                Iterator<File> it3 = m7002.iterator();
                                z3 = false;
                                while (it3.hasNext()) {
                                    if (it3.next().getAbsolutePath().equals(file3.getAbsolutePath())) {
                                        z3 = true;
                                    }
                                }
                            } else {
                                z3 = false;
                            }
                            if (!z3) {
                                if (z2) {
                                    if (file3.isDirectory()) {
                                        arrayList.add(new C2624(file3.getAbsolutePath()));
                                    }
                                } else {
                                    arrayList.add(new C2624(file3.getAbsolutePath()));
                                }
                            }
                        }
                    }
                }
                arrayList.add(new C2624(C2975.f9251));
                if (C2975.f9348.booleanValue()) {
                    arrayList.add(new C2624(C2975.f9349));
                }
            }
        }
        C3562 c3562 = new C3562(C2975.f9245.mo1874(), R.layout.file_browser_row, arrayList);
        if (C2975.f9365 == 0 || z2) {
            c3562.sort(new C2975.C3366());
        }
        if (C2975.f9365 == 1 && !z2) {
            c3562.sort(new C2975.C3371());
        }
        listView.setAdapter((ListAdapter) c3562);
        c3562.notifyDataSetChanged();
    }

    public static void m8183() {
        if (C2975.f9245 != null) {
            C2975.m7954(new RunnableC3645());
        }
    }

    public static ArrayAdapter m8184(ArrayList<C3727> arrayList, boolean z) {
        return new C3638(C2975.f9245.mo1874(), R.layout.icon_context_menu, arrayList, z);
    }

    public static void m8185(String str) {
        if (!C2975.f9323.booleanValue()) {
            try {
                C3746 c3746 = C2975.f9277;
                if (c3746 != null && c3746.m8243()) {
                    C2975.f9277.m8248(str);
                }
            } catch (Throwable unused) {
            }
        }
    }

    public static C3727 m8186(int i, ArrayAdapter<C3727> arrayAdapter) {
        for (int i2 = 0; i2 < arrayAdapter.getCount(); i2++) {
            if (arrayAdapter.getItem(i2).f10494 == i) {
                return arrayAdapter.getItem(i2);
            }
        }
        return null;
    }

    public static void m8187(File file) {
        C2975.f9282 = file.getAbsolutePath();
        C2975.m7956(new RunnableC3563(file.getName(), file, new ArrayList()));
    }

    public static void m8188() {
        ListView listView = f10208;
        if (listView != null) {
            m8182(f10209, listView, f10205, false, "");
        }
    }

    public static void m8189(boolean z, File file) {
        C2913 c2913 = new C2913(C2975.f9245.mo1874());
        c2913.m7860(C2500.m7007(R.string.title_files_observer));
        c2913.m7876(C2500.m7007(R.string.file_observer_describe));
        c2913.m7875(C2500.m7007(R.string.button_start), new DialogInterfaceOnClickListenerC3616());
        c2913.m7878(C2500.m7007(R.string.cancel), null);
        c2913.m7851().show();
    }

    public static void m8190() {
        C2975.m7954(new RunnableC3552());
    }

    public static void m8191(boolean z, File file) {
        String str;
        int i;
        ArrayAdapter m8180;
        C2635 c2635 = null;
        try {
            C3478 c3478 = C2975.f9253;
            try {
                try {
                    if (c3478 != null) {
                        str = c3478.f10047;
                        PackageInfo packageInfo = C2975.m7932().getPackageInfo(C2975.f9253.f10046, 0);
                        i = packageInfo.versionCode;
                        c2635 = C2500.m6994(new File(packageInfo.applicationInfo.publicSourceDir));
                    } else {
                        if (z && file != null) {
                            try {
                                if (file.exists() && file.canRead()) {
                                    if (!file.getName().toLowerCase().endsWith(".apk")) {
                                        str = "";
                                        i = 0;
                                    } else {
                                        str = C2500.m6921(file.getAbsolutePath());
                                        try {
                                            i = C2500.m7013(file);
                                        } catch (Exception e) {
                                            e = e;
                                            i = 0;
                                            e.printStackTrace();
                                            C2913 c2913 = new C2913(C2975.f9245.mo1874());
                                            ArrayList arrayList = new ArrayList();
                                            arrayList.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                            arrayList.add(new C3727(R.string.change_version_code, 0, "" + i, new C3550(), Integer.MAX_VALUE, "#ff00ff00", false));
                                            arrayList.add(new C3727(R.string.change_minimumSDK, 0, "" + c2635.f7645, (InputFilter) new C3594(), "#ff00ff00", false));
                                            arrayList.add(new C3727(R.string.change_compileSDK, 0, "" + c2635.f7644, (InputFilter) new C3618(), "#ff00ff00", false));
                                            arrayList.add(new C3727(R.string.change_targetSDK, 0, "" + c2635.f7643, (InputFilter) new C3620(), "#ff00ff00", false));
                                            arrayList.add(new C3727(R.string.change_sharedUserId, 0, "#ff00ff00", false));
                                            arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                                            arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                                            C3727 c3727 = new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, R.string.button_select_original_apk, (View.OnClickListener) new ViewOnClickListenerC3622(r3, r5), "#ffffff00", false);
                                            C3727[] c3727Arr = {c3727};
                                            arrayList.add(c3727);
                                            m8180 = m8180(arrayList);
                                            ArrayAdapter[] arrayAdapterArr = {m8180};
                                            if (m8180 != null) {
                                            }
                                            c2913.m7851().show();
                                        }
                                        try {
                                            c2635 = C2500.m6994(file);
                                        } catch (Exception e2) {
                                            e = e2;
                                            e.printStackTrace();
                                            C2913 c29132 = new C2913(C2975.f9245.mo1874());
                                            ArrayList arrayList2 = new ArrayList();
                                            arrayList2.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                                            arrayList2.add(new C3727(R.string.change_version_code, 0, "" + i, new C3550(), Integer.MAX_VALUE, "#ff00ff00", false));
                                            arrayList2.add(new C3727(R.string.change_minimumSDK, 0, "" + c2635.f7645, (InputFilter) new C3594(), "#ff00ff00", false));
                                            arrayList2.add(new C3727(R.string.change_compileSDK, 0, "" + c2635.f7644, (InputFilter) new C3618(), "#ff00ff00", false));
                                            arrayList2.add(new C3727(R.string.change_targetSDK, 0, "" + c2635.f7643, (InputFilter) new C3620(), "#ff00ff00", false));
                                            arrayList2.add(new C3727(R.string.change_sharedUserId, 0, "#ff00ff00", false));
                                            arrayList2.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                                            arrayList2.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                                            C3727 c37272 = new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, R.string.button_select_original_apk, (View.OnClickListener) new ViewOnClickListenerC3622(c3727Arr, arrayAdapterArr), "#ffffff00", false);
                                            C3727[] c3727Arr2 = {c37272};
                                            arrayList2.add(c37272);
                                            m8180 = m8180(arrayList2);
                                            ArrayAdapter[] arrayAdapterArr2 = {m8180};
                                            if (m8180 != null) {
                                            }
                                            c29132.m7851().show();
                                        }
                                    }
                                    if (C2500.m7027(file.getName())) {
                                        str = C2500.m6923(file);
                                        i = C2500.m7013(C2500.m6928(file));
                                        c2635 = C2500.m6994(C2500.m6928(file));
                                    }
                                }
                            } catch (Exception e3) {
                                e = e3;
                                str = "";
                            }
                        }
                        str = "";
                        i = 0;
                    }
                } catch (Throwable th) {
                    th = th;
                    i = 0;
                    th.printStackTrace();
                    C2913 c291322 = new C2913(C2975.f9245.mo1874());
                    ArrayList arrayList22 = new ArrayList();
                    arrayList22.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                    arrayList22.add(new C3727(R.string.change_version_code, 0, "" + i, new C3550(), Integer.MAX_VALUE, "#ff00ff00", false));
                    arrayList22.add(new C3727(R.string.change_minimumSDK, 0, "" + c2635.f7645, (InputFilter) new C3594(), "#ff00ff00", false));
                    arrayList22.add(new C3727(R.string.change_compileSDK, 0, "" + c2635.f7644, (InputFilter) new C3618(), "#ff00ff00", false));
                    arrayList22.add(new C3727(R.string.change_targetSDK, 0, "" + c2635.f7643, (InputFilter) new C3620(), "#ff00ff00", false));
                    arrayList22.add(new C3727(R.string.change_sharedUserId, 0, "#ff00ff00", false));
                    arrayList22.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                    arrayList22.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                    C3727 c372722 = new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, R.string.button_select_original_apk, (View.OnClickListener) new ViewOnClickListenerC3622(c3727Arr2, arrayAdapterArr2), "#ffffff00", false);
                    C3727[] c3727Arr22 = {c372722};
                    arrayList22.add(c372722);
                    m8180 = m8180(arrayList22);
                    ArrayAdapter[] arrayAdapterArr22 = {m8180};
                    if (m8180 != null) {
                    }
                    c291322.m7851().show();
                }
            } catch (Throwable th2) {
                th = th2;
                th.printStackTrace();
                C2913 c2913222 = new C2913(C2975.f9245.mo1874());
                ArrayList arrayList222 = new ArrayList();
                arrayList222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
                arrayList222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3550(), Integer.MAX_VALUE, "#ff00ff00", false));
                arrayList222.add(new C3727(R.string.change_minimumSDK, 0, "" + c2635.f7645, (InputFilter) new C3594(), "#ff00ff00", false));
                arrayList222.add(new C3727(R.string.change_compileSDK, 0, "" + c2635.f7644, (InputFilter) new C3618(), "#ff00ff00", false));
                arrayList222.add(new C3727(R.string.change_targetSDK, 0, "" + c2635.f7643, (InputFilter) new C3620(), "#ff00ff00", false));
                arrayList222.add(new C3727(R.string.change_sharedUserId, 0, "#ff00ff00", false));
                arrayList222.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                arrayList222.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                C3727 c3727222 = new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, R.string.button_select_original_apk, (View.OnClickListener) new ViewOnClickListenerC3622(c3727Arr22, arrayAdapterArr22), "#ffffff00", false);
                C3727[] c3727Arr222 = {c3727222};
                arrayList222.add(c3727222);
                m8180 = m8180(arrayList222);
                ArrayAdapter[] arrayAdapterArr222 = {m8180};
                if (m8180 != null) {
                }
                c2913222.m7851().show();
            }
        } catch (Throwable th3) {
            th = th3;
            str = "";
        }
        C2913 c29132222 = new C2913(C2975.f9245.mo1874());
        ArrayList arrayList2222 = new ArrayList();
        arrayList2222.add(new C3727(R.string.create_clone_new_app_name, 0, "" + str, (InputFilter) null, "#ff00ff00", false));
        arrayList2222.add(new C3727(R.string.change_version_code, 0, "" + i, new C3550(), Integer.MAX_VALUE, "#ff00ff00", false));
        arrayList2222.add(new C3727(R.string.change_minimumSDK, 0, "" + c2635.f7645, (InputFilter) new C3594(), "#ff00ff00", false));
        arrayList2222.add(new C3727(R.string.change_compileSDK, 0, "" + c2635.f7644, (InputFilter) new C3618(), "#ff00ff00", false));
        arrayList2222.add(new C3727(R.string.change_targetSDK, 0, "" + c2635.f7643, (InputFilter) new C3620(), "#ff00ff00", false));
        arrayList2222.add(new C3727(R.string.change_sharedUserId, 0, "#ff00ff00", false));
        arrayList2222.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
        arrayList2222.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
        C3727 c37272222 = new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, R.string.button_select_original_apk, (View.OnClickListener) new ViewOnClickListenerC3622(c3727Arr222, arrayAdapterArr222), "#ffffff00", false);
        C3727[] c3727Arr2222 = {c37272222};
        arrayList2222.add(c37272222);
        m8180 = m8180(arrayList2222);
        ArrayAdapter[] arrayAdapterArr2222 = {m8180};
        if (m8180 != null) {
            m8180.setNotifyOnChange(true);
            c29132222.m7863(true);
            c29132222.m7862(m8180, new C3625(m8180));
            c29132222.m7875(C2500.m7007(R.string.button_resign_app), new DialogInterfaceOnClickListenerC3628(m8180, file));
        }
        c29132222.m7851().show();
    }

    public static void m8192() {
        if (C2975.f9245 != null) {
            C2975.m7954(new RunnableC3647());
        }
    }

    public static void m8193(boolean z, File file) {
        String m7007;
        C2913 c2913 = new C2913(C2975.f9245.mo1874());
        ArrayList arrayList = new ArrayList();
        String str = "try_get_pkg_name";
        if (file != null) {
            try {
                if (file.exists() && file.canRead()) {
                    str = C2500.m6922(file.getAbsolutePath(), 1).packageName;
                }
            } catch (Throwable th) {
                th.printStackTrace();
            }
        } else {
            str = C2975.f9253.f10046;
        }
        if (C2500.m7033(str)) {
            arrayList.add(new C3727(R.string.contextcustompatch, 0, "#ffff99", false, R.drawable.context_custom_patch));
        }
        arrayList.add(new C3727(R.string.contextignore, 0, "#ff00ff00", false, R.drawable.context_lvl));
        arrayList.add(new C3727(R.string.contextads, 0, "#99cccc", false, R.drawable.context_ads));
        arrayList.add(new C3727(R.string.context_support_patch, 0, "#ff00ff00", false, R.drawable.context_lvl));
        if (z) {
            arrayList.add(new C3727(R.string.context_crt_apk_permission, 0, "#cc99cc", false, R.drawable.context_permissions));
        }
        ArrayAdapter m8184 = m8184(arrayList, true);
        if (m8184 != null) {
            m8184.setNotifyOnChange(true);
            c2913.m7863(true);
            c2913.m7862(m8184, new C3621(m8184));
            DialogInterfaceOnClickListenerC3649 dialogInterfaceOnClickListenerC3649 = new DialogInterfaceOnClickListenerC3649(z, file, m8184);
            if (!z) {
                m7007 = C2500.m7007(R.string.patch_ok);
            } else {
                m7007 = C2500.m7007(R.string.create_perm_ok);
            }
            c2913.m7875(m7007, dialogInterfaceOnClickListenerC3649);
        }
        c2913.m7851().show();
    }

    public static void m8194() {
        if (C2975.f9245 != null) {
            C2975.m7954(new RunnableC3640());
        }
    }

    public static void m8195(boolean z, File file, C2597 c2597) {
        String m7007;
        C2913 c2913 = new C2913(C2975.f9245.mo1874());
        ArrayList arrayList = new ArrayList();
        arrayList.add(new C3727(R.string.support_patch_header_lvl_inapp, true));
        arrayList.add(new C3727(R.string.support_patch_lvl_inapp, R.string.support_patch_lvl_and_inapp_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.support_patch_header_inapp, true));
        arrayList.add(new C3727(R.string.support_patch_billing_rebuild_dex, R.string.support_patch_billing_rebuild_dex_descr, "#ff00ff00", true));
        arrayList.add(new C3727(R.string.support_patch_billing_redirect_to_proxy, R.string.support_patch_billing_redirect_to_proxy_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.support_patch_header_additional, true));
        arrayList.add(new C3727(R.string.support_patch_billing_repatch_patched_app, R.string.support_patch_billing_repatch_patched_app_descr, "#ff00ff00", false));
        arrayList.add(new C3727(R.string.support_patch_header_options, true));
        if (!z && C2975.f9299 < 23) {
            arrayList.add(new C3727(R.string.contextpattlvl4, R.string.contextpattlvl4_descr, "#ffffff00", false));
        }
        if (file == null) {
            arrayList.add(new C3727(R.string.contextpattlvl5, R.string.contextpattlvl5_descr, "#ffffff00", false));
        }
        if (!z && C2975.f9299 < 23) {
            arrayList.add(new C3727(R.string.contextpattlvl6, R.string.contextpattlvl6_descr, "#ffff0000", false));
        }
        if (z) {
            if (c2597 != null) {
                if (c2597.f7292) {
                    c2597.f7290 = false;
                }
                arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", c2597.f7290));
                arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", c2597.f7292));
                arrayList.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", c2597.f7304));
                arrayList.add(new C3727(R.string.context_original_resign_app, C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), 0, "#ffffff00", c2597.f7302));
            } else {
                arrayList.add(new C3727(R.string.context_signature_verification_kill_option, R.string.context_signature_verification_kill_option_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_dex_verification_kill_option, R.string.context_dex_verification_kill_option_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_use_zip_crc_image, R.string.context_use_zip_crc_image_describe, "#ffffff00", false));
                arrayList.add(new C3727(R.string.context_original_resign_app, C2500.m7009(R.string.context_original_resign_app, C2500.m7007(R.string.contextcorepatch2)), 0, "#ffffff00", false));
            }
        }
        ArrayAdapter m8180 = m8180(arrayList);
        if (m8180 != null) {
            m8180.setNotifyOnChange(true);
            c2913.m7863(true);
            c2913.m7862(m8180, new C3597(m8180));
            DialogInterfaceOnClickListenerC3615 dialogInterfaceOnClickListenerC3615 = new DialogInterfaceOnClickListenerC3615(c2597, m8180, z, file);
            if (!z) {
                if (c2597 == null) {
                    m7007 = C2500.m7007(R.string.patch_ok);
                } else {
                    m7007 = C2500.m7007(R.string.multipatch_next_step);
                }
            } else if (c2597 == null) {
                m7007 = C2500.m7007(R.string.create_perm_ok);
            } else {
                m7007 = C2500.m7007(R.string.multipatch_next_step);
            }
            c2913.m7875(m7007, dialogInterfaceOnClickListenerC3615);
        }
        c2913.m7851().show();
    }

    public static void m8196(File file) {
        LinearLayout linearLayout;
        C2975.m7942("App Dialog create.");
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
        SpannableStringBuilder spannableStringBuilder2 = new SpannableStringBuilder();
        SpannableStringBuilder spannableStringBuilder3 = new SpannableStringBuilder();
        File[] fileArr = {null};
        LinearLayout linearLayout2 = (LinearLayout) View.inflate(C2975.f9245.mo1874(), R.layout.applicationdialog, null);
        LinearLayout linearLayout3 = (LinearLayout) linearLayout2.findViewById(R.id.appbodyscroll).findViewById(R.id.appdialogbody);
        ImageView imageView = (ImageView) linearLayout3.findViewById(R.id.app_imageView);
        TextView textView = (TextView) linearLayout3.findViewById(R.id.app_textView);
        TextView textView2 = (TextView) linearLayout3.findViewById(R.id.app_textView2);
        TextView textView3 = (TextView) linearLayout3.findViewById(R.id.app_textView3);
        TextView textView4 = (TextView) linearLayout3.findViewById(R.id.app_textView31);
        ProgressBar progressBar = (ProgressBar) linearLayout3.findViewById(R.id.progressBar1);
        ((LinearLayout) linearLayout3.findViewById(R.id.google_play_button)).setOnClickListener(new ViewOnClickListenerC3591(file, fileArr));
        textView2.setOnClickListener(new ViewOnClickListenerC3592(textView2));
        textView3.setOnClickListener(new ViewOnClickListenerC3593(textView3));
        textView4.setOnClickListener(new ViewOnClickListenerC3595(textView4));
        if (file == null && C2975.f9253 != null) {
            try {
                try {
                    imageView.setImageDrawable(C2975.m7932().getApplicationIcon(C2975.f9253.f10046));
                } catch (PackageManager.NameNotFoundException e) {
                    e.printStackTrace();
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            } catch (OutOfMemoryError e3) {
                e3.printStackTrace();
            }
            new Thread(new RunnableC3598(textView, textView2, spannableStringBuilder, spannableStringBuilder3, textView4, spannableStringBuilder2, fileArr, textView3, progressBar)).start();
            linearLayout = linearLayout2;
        } else {
            linearLayout = linearLayout2;
            new Thread(new RunnableC3603(spannableStringBuilder3, file, fileArr, imageView, textView, textView2, spannableStringBuilder, textView4, spannableStringBuilder2, textView3, progressBar)).start();
        }
        Dialog m7851 = new C2913(C2975.f9245.mo1874(), true).m7858(linearLayout).m7878(C2500.m7007(R.string.jadx_deobf_0x00000fab), new DialogInterfaceOnClickListenerC3611(fileArr, file)).m7875("OK", new DialogInterfaceOnClickListenerC3610()).m7851();
        m7851.setCancelable(true);
        m7851.setOnCancelListener(new DialogInterfaceOnCancelListenerC3614());
        m7851.show();
    }

    public static void m8197(ArrayAdapter<C3727> arrayAdapter) {
        if (C2975.f9319) {
            for (int i = 0; i < arrayAdapter.getCount(); i++) {
                C3727 item = arrayAdapter.getItem(i);
                item.f10499 = false;
                switch (item.f10494) {
                    case R.string.android_patches_dialog_remove_patch_3:
                        item.f10503 = true;
                        break;
                    case R.string.android_patches_dialog_remove_patches_1_and_2:
                        item.f10503 = true;
                        break;
                    case R.string.contextcorepatch1:
                        if (!C2975.f9378 && !C2975.f9381) {
                            item.f10503 = true;
                            break;
                        } else {
                            item.f10503 = false;
                            break;
                        }
                        break;
                    case R.string.contextcorepatch2:
                        if (!C2975.f9379 && !C2975.f9382) {
                            item.f10503 = true;
                            break;
                        } else {
                            item.f10503 = false;
                            break;
                        }
                    case R.string.contextcorepatch3:
                        if (!C2975.f9380 && !C2975.f9383) {
                            item.f10503 = true;
                            break;
                        } else {
                            item.f10503 = false;
                            break;
                        }
                }
            }
            arrayAdapter.notifyDataSetChanged();
            return;
        }
        boolean z = C2975.f9318;
        if (z) {
            for (int i2 = 0; i2 < arrayAdapter.getCount(); i2++) {
                C3727 item2 = arrayAdapter.getItem(i2);
                item2.f10499 = false;
                switch (item2.f10494) {
                    case R.string.android_patches_dialog_remove_patch_3:
                        if (!C2975.f9386) {
                            item2.f10503 = true;
                            break;
                        } else {
                            item2.f10503 = false;
                            break;
                        }
                    case R.string.android_patches_dialog_remove_patches_1_and_2:
                        if (!C2975.f9384 && !C2975.f9385) {
                            item2.f10503 = true;
                            break;
                        } else {
                            item2.f10503 = false;
                            break;
                        }
                        break;
                    case R.string.contextcorepatch1:
                        if (!C2975.f9384) {
                            item2.f10503 = true;
                            break;
                        } else {
                            item2.f10503 = false;
                            break;
                        }
                    case R.string.contextcorepatch2:
                        if (!C2975.f9385) {
                            item2.f10503 = true;
                            break;
                        } else {
                            item2.f10503 = false;
                            break;
                        }
                    case R.string.contextcorepatch3:
                        if (!C2975.f9386) {
                            item2.f10503 = true;
                            break;
                        } else {
                            item2.f10503 = false;
                            break;
                        }
                }
            }
            arrayAdapter.notifyDataSetChanged();
            return;
        }
        if (!z) {
            for (int i3 = 0; i3 < arrayAdapter.getCount(); i3++) {
                C3727 item3 = arrayAdapter.getItem(i3);
                item3.f10499 = false;
                switch (item3.f10494) {
                    case R.string.android_patches_dialog_remove_patch_3:
                        if (!C2975.f9380 && !C2975.f9383) {
                            item3.f10503 = true;
                            break;
                        } else {
                            item3.f10503 = false;
                            break;
                        }
                    case R.string.android_patches_dialog_remove_patches_1_and_2:
                        if (!C2975.f9379 && !C2975.f9378 && !C2975.f9381 && !C2975.f9382) {
                            item3.f10503 = true;
                            break;
                        } else {
                            item3.f10503 = false;
                            break;
                        }
                        break;
                    case R.string.contextcorepatch1:
                        if (!C2975.f9378 && !C2975.f9381) {
                            item3.f10503 = true;
                            break;
                        } else {
                            item3.f10503 = false;
                            break;
                        }
                    case R.string.contextcorepatch2:
                        if (!C2975.f9379 && !C2975.f9382) {
                            item3.f10503 = true;
                            break;
                        } else {
                            item3.f10503 = false;
                            break;
                        }
                    case R.string.contextcorepatch3:
                        if (!C2975.f9380 && !C2975.f9383) {
                            item3.f10503 = true;
                            break;
                        } else {
                            item3.f10503 = false;
                            break;
                        }
                }
            }
            arrayAdapter.notifyDataSetChanged();
        }
    }

    public static void m8198() {
        C2975.m7956(new RunnableC3662(new C2913(C2975.f9245.mo1874(), true)));
    }

    public static void m8199(String str, String str2, String str3, int i, int i2, boolean z) {
        C2975.m7954(new RunnableC3642(str2, z, i, i2, str, str3));
    }

    public static void m8200() {
        C2975.m7956(new RunnableC3680());
    }

    public static void m8201(Integer num) {
        C3746 c3746 = C2975.f9277;
        if (c3746 != null && c3746.m8243() && !C2975.f9323.booleanValue()) {
            C2975.f9277.m8249(num.intValue());
            C2975.f9277.m8246(false, C2975.f9245.mo1874());
        }
    }

    public static void m8202(Throwable th, boolean z) {
        if (z || th.toString().contains("No space left on device") || th.toString().contains("ENOSPC")) {
            C2975.m7954(new RunnableC3658());
        }
    }

    public static void m8203(String str) {
        f10205 = false;
        if (str.equals("")) {
            f10205 = true;
        }
        C2975.f9363 = C2975.m7928().getBoolean("file_browser_folders_first", true);
        C2975.f9364 = C2975.m7928().getBoolean("file_browser_only_used_files", true);
        C2975.f9365 = C2975.m7928().getInt("file_browser_file_sorting", 0);
        LinearLayout linearLayout = (LinearLayout) View.inflate(C2975.f9245.mo1874(), R.layout.file_browser, null);
        ((Button) linearLayout.findViewById(R.id.settings)).setOnClickListener(new ViewOnClickListenerC3553());
        C2913 m7858 = new C2913(C2975.f9245.mo1874(), true).m7875(C2500.m7007(R.string.exit), new DialogInterfaceOnClickListenerC3559()).m7878(C2500.m7007(R.string.home), new DialogInterfaceOnClickListenerC3557()).m7858(linearLayout);
        m7858.f9084 = true;
        Dialog m7851 = m7858.m7851();
        m7851.setCancelable(false);
        m7851.setOnKeyListener(new DialogInterfaceOnKeyListenerC3560());
        m7851.show();
        f10207 = (TextView) m7851.findViewById(R.id.path);
        if (!str.equals("")) {
            f10206 = str;
        } else {
            String parent = new File(C2975.f9292).getParent();
            while (new File(new File(parent).getParent()).getParent() != null) {
                try {
                    parent = new File(parent).getParent();
                    System.out.println("Parent directory:" + parent);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            f10206 = parent;
        }
        ((ListView) linearLayout.findViewById(R.id.list)).setOnItemClickListener(new C3561());
        f10208 = (ListView) linearLayout.findViewById(R.id.list);
        try {
            try {
                System.out.println(f10206);
                System.out.println(str);
                m8182(f10206, (ListView) linearLayout.findViewById(R.id.list), f10205, false, "");
            } catch (Exception unused) {
                String str2 = C2975.f9251;
                f10206 = str2;
                m8182(str2, (ListView) linearLayout.findViewById(R.id.list), f10205, false, "");
            }
        } catch (Exception unused2) {
            String parent2 = new File(C2975.f9251).getParent();
            f10206 = parent2;
            m8182(parent2, (ListView) linearLayout.findViewById(R.id.list), f10205, false, "");
        }
    }
}