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

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


package p086;

import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.ComponentName;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.drawable.GradientDrawable;
import android.os.AsyncTask;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.xposed.XposedUtils;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import javaroot.utils.C1559;
import javaroot.utils.C1633;
import net.lingala.zip4j.util.InternalZipConstants;
import org.jf.dexlib2.dexbacked.raw.ItemType;
import org.json.JSONException;
import org.json.JSONObject;
import p037.C2500;
import p038.C2597;
import p042.C2641;
import p085.C2913;
import p085.C2931;
import p085.C2934;
import p085.C2935;
import p085.C2936;
import p085.C2939;
import p085.C2975;
import p085.C3477;
import p085.C3478;
import p085.C3479;
import ru.aaaaabbt.installer.R;
import ru.sxbuIDfx.pFSOyagrF.MainActivity;

public class C3506 {

    public int f10137 = 255;

    public ArrayAdapter f10138 = null;

    Dialog f10139 = null;

    public class DialogInterfaceOnClickListenerC3507 implements DialogInterface.OnClickListener {

        final C3478 f10140;

        class RunnableC3508 implements Runnable {
            RunnableC3508() {
            }

            @Override
            public void run() {
                String str = "/dbdata/system/packages.xml";
                String str2 = "/data/system/packages.xml";
                String str3 = null;
                try {
                    if (!C2500.m6898("/data/system/packages.xml")) {
                        str2 = null;
                    }
                    str3 = str2;
                } catch (Exception e) {
                    C2975.m7942("LuckyPatcher (Get packages.xml Error): " + e);
                }
                try {
                    if (!C2500.m6898("/dbdata/system/packages.xml")) {
                        str = str3;
                    }
                    str3 = str;
                } catch (Exception e2) {
                    C2975.m7942("LuckyPatcher (Get packages.xml Error): " + e2);
                }
                try {
                    C2500.m6971(str3).equals("");
                } catch (Exception unused) {
                }
                C2500.m6877(C2975.f9245.mo1874().getDir("packages", 0).getAbsolutePath() + "/packages.xml", str3, false, false);
                C2500.m7093("chmod 777 " + str3);
                C2500.m7093("chown 1000.1000 " + str3);
                C2500.m7093("chown 1000:1000 " + str3);
                C2975.f9252.m8115(DialogInterfaceOnClickListenerC3507.this.f10140.f10046).f10060 = true;
                C2975.m7928().edit().putBoolean(C2975.f9252.m8115(DialogInterfaceOnClickListenerC3507.this.f10140.f10046).f10046, true).commit();
                C2500.m7073();
                C2500.m7093("killall -9 zygote");
            }
        }

        DialogInterfaceOnClickListenerC3507(C3478 c3478) {
            this.f10140 = c3478;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            String str = C2975.f9234;
            C2975.m7956(new RunnableC3508());
        }
    }

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

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            String str = C2975.f9234;
            C2975.m7951(26);
            C2975.f9245.m8047(C2975.f9253, ((C2939) C2975.f9263.getItem(i)).f9156);
        }
    }

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

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C2975.f9245.m8048((C2939) C2975.f9263.getItem(i));
        }
    }

    public class RunnableC3511 implements Runnable {
        RunnableC3511() {
        }

        @Override
        public void run() {
            for (String str : C2500.m6995()) {
                try {
                    C2500.m6907(str + InternalZipConstants.ZIP_FILE_SEPARATOR + C2975.f9356);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }

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

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C2936 c2936 = (C2936) C3506.this.f10138.getItem(i);
            C2975.m7942("" + c2936.f9145);
            if (c2936.f9145) {
                c2936.f9145 = false;
            } else {
                c2936.f9145 = true;
            }
            C2975.m7942("" + ((C2936) C3506.this.f10138.getItem(i)).f9145);
            C3506.this.f10138.notifyDataSetChanged();
        }
    }

    public class DialogInterfaceOnClickListenerC3513 implements DialogInterface.OnClickListener {

        final CheckBox f10147;

        class RunnableC3514 implements Runnable {

            class RunnableC3515 implements Runnable {

                final JSONObject f10150;

                RunnableC3515(JSONObject jSONObject) {
                    this.f10150 = jSONObject;
                }

                @Override
                public void run() {
                    C2975.m7942("write:" + this.f10150.toString());
                    String m7294 = C2641.m7294(this.f10150.toString().getBytes());
                    if (C2975.f9283) {
                        new C2500("").m7211(C2975.f9284 + C1633.class.getName() + " " + m7294);
                    }
                    if (C2975.f9348.booleanValue()) {
                        C1633.main(new String[]{m7294});
                    }
                }
            }

            RunnableC3514() {
            }

            @Override
            public void run() {
                long j;
                int count = C3506.this.f10138.getCount();
                JSONObject jSONObject = new JSONObject();
                for (int i = 0; i < count; i++) {
                    C2936 c2936 = (C2936) C3506.this.f10138.getItem(i);
                    C2975.m7942("" + c2936.f9145);
                    if (i == 0) {
                        try {
                            jSONObject.put("patch1", c2936.f9145);
                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    }
                    if (i == 1) {
                        try {
                            jSONObject.put("patch2", c2936.f9145);
                        } catch (JSONException e2) {
                            e2.printStackTrace();
                        }
                    }
                    if (i == 2) {
                        try {
                            jSONObject.put("patch3", c2936.f9145);
                        } catch (JSONException e3) {
                            e3.printStackTrace();
                        }
                    }
                    if (i == 3) {
                        try {
                            PackageInfo m6974 = C2500.m6974("com.android.vending", 0);
                            if (m6974 != null) {
                                try {
                                    j = new File(C2500.m6976(m6974.applicationInfo.sourceDir, false)).length();
                                } catch (Exception unused) {
                                    j = 0;
                                }
                                if (j <= 1048576 && j != 0) {
                                    try {
                                        new C2500("").m7211(C2975.f9284 + C1559.class.getName() + " " + m6974.applicationInfo.sourceDir + " " + C2975.f9250 + " " + String.valueOf(m6974.applicationInfo.uid) + " recovery");
                                        C2500.m7056(true);
                                        C2500.m7058(true);
                                        C2500.m7053("com.android.vending");
                                    } catch (Exception e4) {
                                        e4.printStackTrace();
                                    }
                                }
                            }
                            jSONObject.put("patch4", c2936.f9145);
                        } catch (JSONException e5) {
                            e5.printStackTrace();
                        }
                    }
                    if (i == 4) {
                        try {
                            jSONObject.put("hide", c2936.f9145);
                        } catch (JSONException e6) {
                            e6.printStackTrace();
                        }
                    }
                }
                try {
                    jSONObject.put("module_on", DialogInterfaceOnClickListenerC3513.this.f10147.isChecked());
                } catch (JSONException e7) {
                    e7.printStackTrace();
                }
                C2975.m7956(new RunnableC3515(jSONObject));
            }
        }

        DialogInterfaceOnClickListenerC3513(CheckBox checkBox) {
            this.f10147 = checkBox;
        }

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

    public class C3516 implements CompoundButton.OnCheckedChangeListener {
        C3516() {
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            if (z) {
                C2500.m7152(C2975.f9361);
            } else {
                C2500.m7150(C2975.f9361);
            }
        }
    }

    public class DialogInterfaceOnClickListenerC3517 implements DialogInterface.OnClickListener {

        final CheckBox f10153;

        DialogInterfaceOnClickListenerC3517(CheckBox checkBox) {
            this.f10153 = checkBox;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            if (this.f10153.isChecked()) {
                C2500.m7152(C2975.f9361);
            } else {
                C2500.m7150(C2975.f9361);
            }
        }
    }

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

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3478 c3478 = (C3478) C2975.f9267.getItem(i);
            if (c3478.f10046.equals(C2500.m7007(R.string.android_patches_for_bootlist))) {
                C2500.m7151();
            } else {
                try {
                    C2975.m7932().getPackageInfo(c3478.f10046, ItemType.CLASS_DATA_ITEM);
                    int i2 = 0;
                    while (true) {
                        C3478[] c3478Arr = C2975.f9252.f10079;
                        if (i2 >= c3478Arr.length) {
                            break;
                        }
                        if (c3478Arr[i2].f10046.equals(c3478.f10046)) {
                            C3478 c34782 = C2975.f9252.f10079[i2];
                            c34782.f10052 = false;
                            c34782.f10053 = false;
                            if (c34782.f10054) {
                                if (new File(C2975.f9245.mo1874().getDir("bootlist", 0) + InternalZipConstants.ZIP_FILE_SEPARATOR + C2975.f9252.f10079[i2].f10046).exists()) {
                                    new File(C2975.f9245.mo1874().getDir("bootlist", 0) + InternalZipConstants.ZIP_FILE_SEPARATOR + C2975.f9252.f10079[i2].f10046).delete();
                                }
                                C2975.f9252.f10079[i2].f10054 = false;
                            }
                            C3479 c3479 = C2975.f9252;
                            C3478 c34783 = c3479.f10079[i2];
                            c34783.f10055 = false;
                            c3479.m8117(c34783);
                        }
                        i2++;
                    }
                } catch (PackageManager.NameNotFoundException unused) {
                    if (new File(C2975.f9245.mo1874().getDir("bootlist", 0) + InternalZipConstants.ZIP_FILE_SEPARATOR + c3478.f10046).exists()) {
                        new File(C2975.f9245.mo1874().getDir("bootlist", 0) + InternalZipConstants.ZIP_FILE_SEPARATOR + c3478.f10046).delete();
                    }
                }
                StringBuilder sb = new StringBuilder();
                int i3 = 0;
                while (true) {
                    C3478[] c3478Arr2 = C2975.f9252.f10079;
                    if (i3 >= c3478Arr2.length) {
                        break;
                    }
                    C3478 c34784 = c3478Arr2[i3];
                    if (c34784.f10052 || c34784.f10054 || c34784.f10053 || c34784.f10055) {
                        sb.append(c34784.f10046);
                        if (C2975.f9252.f10079[i3].f10052) {
                            sb.append("%ads");
                        }
                        if (C2975.f9252.f10079[i3].f10053) {
                            sb.append("%lvl");
                        }
                        if (C2975.f9252.f10079[i3].f10054) {
                            sb.append("%custom");
                        }
                        if (C2975.f9252.f10079[i3].f10055) {
                            sb.append("%object");
                        }
                        sb.append(",");
                    }
                    i3++;
                }
                sb.append("\n");
                try {
                    FileOutputStream fileOutputStream = new FileOutputStream(new File(C2975.f9245.mo1874().getDir("bootlist", 0) + "/bootlist"));
                    fileOutputStream.write(sb.toString().getBytes());
                    fileOutputStream.close();
                } catch (FileNotFoundException | Exception unused2) {
                }
            }
            C2975.f9252.notifyDataSetChanged();
            C2975.m7942("asd1");
            C2975.m7960(3);
        }
    }

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

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

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

        @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 class DialogInterfaceOnClickListenerC3521 implements DialogInterface.OnClickListener {

        class AsyncTaskC3522 extends AsyncTask<Void, Void, Boolean> {
            AsyncTaskC3522() {
            }

            @Override
            protected void onPreExecute() {
                String str = C2975.f9234;
                C2975.m7960(3255);
            }

            @Override
            public Boolean doInBackground(Void... voidArr) {
                return Boolean.valueOf(C2975.f9287.m7897(C2975.f9245.mo1874(), true));
            }

            @Override
            public void onPostExecute(Boolean bool) {
                String str = C2975.f9234;
                C2975.m7951(3255);
                if (bool.booleanValue()) {
                    C2975.f9287.m7898(C2975.f9245.mo1874(), "lp.chelpus@gmail.com", "Error Log " + C2975.f9273, "Lucky Patcher " + C2500.m6975(C2975.f9245.mo1874().getPackageName()));
                    return;
                }
                C2975.m7960(3535122);
            }
        }

        DialogInterfaceOnClickListenerC3521() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            new AsyncTaskC3522().execute(new Void[0]);
        }
    }

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

        @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.getCount(); i2++) {
                C3477 item = C2975.f9265.getItem(i2);
                if (!item.f10045 && !item.f10044.contains("chelpus_")) {
                    arrayList.add(item.f10044);
                }
                if (item.f10045 && item.f10044.startsWith("chelpa_per_")) {
                    arrayList.add(item.f10044.replace("chelpa_per_", ""));
                    C2975.m7942(item.f10044.replace("chelpa_per_", ""));
                }
                if (!item.f10045 && item.f10044.contains("chelpus_") && !item.f10044.contains("disabled_")) {
                    arrayList2.add(item.f10044.replace("chelpus_", ""));
                    C2975.m7942("" + item.f10044.replace("chelpus_", ""));
                }
                if (item.f10045 && item.f10044.contains("chelpus_disabled_")) {
                    arrayList2.add(item.f10044.replace("chelpus_", ""));
                    C2975.m7942("" + item.f10044.replace("chelpus_", ""));
                }
            }
            C2597 c2597 = new C2597();
            c2597.f7284 = arrayList;
            c2597.f7285 = arrayList2;
            c2597.f7317 = true;
            c2597.f7342 = true;
            if (!C2975.f9282.equals("")) {
                c2597.f7329 = new File(C2975.f9282);
            }
            C2975.m7953(C2975.f9253, c2597);
        }
    }

    public class C3524 implements AdapterView.OnItemClickListener {

        final C3478 f10161;

        C3524(C3478 c3478) {
            this.f10161 = c3478;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C3477 item = C2975.f9265.getItem(i);
            if (!item.f10045) {
                new C2500("").m7211("pm enable '" + this.f10161.f10046 + InternalZipConstants.ZIP_FILE_SEPARATOR + item.f10044 + "'");
            } else {
                new C2500("").m7211("pm disable '" + this.f10161.f10046 + InternalZipConstants.ZIP_FILE_SEPARATOR + item.f10044 + "'");
            }
            if (C2975.m7932().getComponentEnabledSetting(new ComponentName(this.f10161.f10046, item.f10044)) == 2) {
                item.f10045 = false;
            } else {
                item.f10045 = true;
            }
            C2975.f9265.notifyDataSetChanged();
            this.f10161.f10060 = true;
            C2975.f9252.m8117(C2975.f9253);
            C2975.m7928().edit().putBoolean(this.f10161.f10046, true).commit();
        }
    }

    public class DialogInterfaceOnClickListenerC3525 implements DialogInterface.OnClickListener {

        final C3478 f10163;

        class RunnableC3526 implements Runnable {
            RunnableC3526() {
            }

            @Override
            public void run() {
                try {
                    C2500.m7053(C2975.m7929().getPackageManager().getPackageInfo(DialogInterfaceOnClickListenerC3525.this.f10163.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.processName);
                } catch (PackageManager.NameNotFoundException e) {
                    e.printStackTrace();
                }
                C2500.m7140(DialogInterfaceOnClickListenerC3525.this.f10163.f10046);
            }
        }

        DialogInterfaceOnClickListenerC3525(C3478 c3478) {
            this.f10163 = c3478;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            try {
                Intent launchIntentForPackage = C2975.m7932().getLaunchIntentForPackage(this.f10163.f10046);
                if (C2975.f9283) {
                    new Thread(new RunnableC3526()).start();
                } else {
                    MainActivity mainActivity = C2975.f9259;
                    if (mainActivity != null) {
                        mainActivity.startActivity(launchIntentForPackage);
                    }
                }
            } catch (Exception unused) {
                Toast.makeText(C2975.f9245.mo1874(), C2500.m7007(R.string.error_launch), 1).show();
            }
            C2975.m7951(29);
        }
    }

    public class C3527 implements AdapterView.OnItemClickListener {

        final ArrayList f10166;

        C3527(ArrayList arrayList) {
            this.f10166 = arrayList;
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            C2935 item = C2975.f9266.getItem(i);
            if (!item.f9143) {
                if (item.f9137) {
                    item.f9137 = false;
                } else {
                    item.f9137 = true;
                }
            }
            this.f10166.add(item);
        }
    }

    public class DialogInterfaceOnClickListenerC3528 implements DialogInterface.OnClickListener {

        final ArrayList f10168;

        final C3478 f10169;

        class RunnableC3529 implements Runnable {

            class RunnableC3530 implements Runnable {
                RunnableC3530() {
                }

                @Override
                public void run() {
                    C2975.f9266.notifyDataSetChanged();
                    DialogInterfaceOnClickListenerC3528.this.f10169.f10060 = true;
                    C2975.f9252.m8117(C2975.f9253);
                    C2975.m7928().edit().putBoolean(DialogInterfaceOnClickListenerC3528.this.f10169.f10046, true).commit();
                }
            }

            RunnableC3529() {
            }

            @Override
            public void run() {
                ArrayList arrayList = DialogInterfaceOnClickListenerC3528.this.f10168;
                if (arrayList != null && arrayList.size() > 0) {
                    Iterator it = DialogInterfaceOnClickListenerC3528.this.f10168.iterator();
                    while (it.hasNext()) {
                        C2935 c2935 = (C2935) it.next();
                        boolean z = c2935.f9143;
                        if (!z && c2935.f9137) {
                            new C2500("").m7211("pm enable '" + DialogInterfaceOnClickListenerC3528.this.f10169.f10046 + InternalZipConstants.ZIP_FILE_SEPARATOR + c2935.f9136 + "'");
                        } else if (!z) {
                            new C2500("").m7211("pm disable '" + DialogInterfaceOnClickListenerC3528.this.f10169.f10046 + InternalZipConstants.ZIP_FILE_SEPARATOR + c2935.f9136 + "'");
                        }
                    }
                }
                C2975.m7954(new RunnableC3530());
            }
        }

        DialogInterfaceOnClickListenerC3528(ArrayList arrayList, C3478 c3478) {
            this.f10168 = arrayList;
            this.f10169 = c3478;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            try {
                C2975.m7956(new RunnableC3529());
            } catch (Throwable th) {
                th.printStackTrace();
            }
        }
    }

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

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            try {
                dialogInterface.dismiss();
            } catch (Throwable th) {
                th.printStackTrace();
            }
        }
    }

    public class DialogInterfaceOnClickListenerC3532 implements DialogInterface.OnClickListener {

        final C3478 f10174;

        class RunnableC3533 implements Runnable {
            RunnableC3533() {
            }

            @Override
            public void run() {
                try {
                    C2500.m7053(C2975.m7929().getPackageManager().getPackageInfo(DialogInterfaceOnClickListenerC3532.this.f10174.f10046, ItemType.CLASS_DATA_ITEM).applicationInfo.processName);
                } catch (PackageManager.NameNotFoundException e) {
                    e.printStackTrace();
                }
                C2500.m7140(DialogInterfaceOnClickListenerC3532.this.f10174.f10046);
            }
        }

        DialogInterfaceOnClickListenerC3532(C3478 c3478) {
            this.f10174 = c3478;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            try {
                Intent launchIntentForPackage = C2975.m7932().getLaunchIntentForPackage(this.f10174.f10046);
                if (C2975.f9283) {
                    new Thread(new RunnableC3533()).start();
                } else {
                    MainActivity mainActivity = C2975.f9259;
                    if (mainActivity != null) {
                        mainActivity.startActivity(launchIntentForPackage);
                    }
                }
            } catch (Exception unused) {
                Toast.makeText(C2975.f9245.mo1874(), C2500.m7007(R.string.error_launch), 1).show();
            }
            try {
                dialogInterface.dismiss();
            } catch (Throwable th) {
                th.printStackTrace();
            }
            String str = C2975.f9234;
            C2975.m7951(31);
        }
    }

    public class C3534 implements AdapterView.OnItemClickListener {

        class RunnableC3535 implements Runnable {

            final int f10178;

            class RunnableC3536 implements Runnable {
                RunnableC3536() {
                }

                @Override
                public void run() {
                    String str = C2975.f9234;
                    C2975.m7951(10);
                    C2975.m7960(10);
                }
            }

            RunnableC3535(int i) {
                this.f10178 = i;
            }

            @Override
            public void run() {
                C2975.f9245.m8009(C2975.f9253, C2975.f9265.getItem(this.f10178));
                C2975.f9245.m7996();
                C2975.m7954(new RunnableC3536());
            }
        }

        C3534() {
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
            String str = C2975.f9234;
            C2975.m7956(new RunnableC3535(i));
        }
    }

    public class C3537 implements Comparator<C3478> {
        public C3537() {
        }

        @Override
        public int compare(C3478 c3478, C3478 c34782) {
            if (c3478 != null && c34782 != null) {
                boolean z = c3478.f10049;
                if (!z && !c34782.f10049) {
                    return c3478.toString().compareToIgnoreCase(c34782.toString());
                }
                int compareTo = Boolean.valueOf(z).compareTo(Boolean.valueOf(c34782.f10049));
                if (compareTo == 0) {
                    return c3478.toString().compareToIgnoreCase(c34782.toString());
                }
                return compareTo;
            }
            throw new ClassCastException();
        }
    }

    public void m8144() {
        Dialog dialog = this.f10139;
        if (dialog != null) {
            dialog.dismiss();
            this.f10139 = null;
        }
    }

    public boolean m8145() {
        Dialog dialog = this.f10139;
        if (dialog != null) {
            return dialog.isShowing();
        }
        return false;
    }

    public Dialog m8146() {
        String m7007;
        int i;
        String m70072;
        int i2;
        String str;
        int i3;
        String m70073;
        C2975.m7942("Create dialog");
        this.f10137 = C2975.f9244;
        C3478 c3478 = C2975.f9253;
        C2975 c2975 = C2975.f9245;
        if (c2975 == null || c2975.mo1874() == null) {
            m8144();
        }
        try {
            C2975.m7942("All Dialog create.");
            int i4 = 0;
            switch (C2975.f9244) {
                case 3:
                    C2913 c2913 = new C2913(C2975.f9245.mo1874());
                    C2975.f9245.m8042();
                    C2934 c2934 = new C2934(C2975.f9245.mo1874(), R.layout.bootlistitemview, C2975.m7928().getInt("viewsize", 0), C2975.f9260);
                    C2975.f9267 = c2934;
                    c2934.f9130 = new C3537();
                    try {
                        C2975.f9252.notifyDataSetChanged();
                    } catch (Exception e) {
                        C2975.m7942("LuckyPatcher(Bootlist dialog): " + e);
                    }
                    C2975.f9267.notifyDataSetChanged();
                    c2913.m7860(C2500.m7007(R.string.delboot));
                    c2913.m7862(C2975.f9267, new C3518());
                    C2975.m7942("asd2");
                    return c2913.m7851();
                case 10:
                    C2975.f9362 = new ArrayList<>();
                    C2913 c29132 = new C2913(C2975.f9245.mo1874());
                    C2931<C3477> c2931 = C2975.f9265;
                    if (c2931 != null) {
                        c2931.setNotifyOnChange(true);
                        c29132.m7863(true);
                        c29132.m7864(C2975.f9265, new C3534());
                        c29132.m7875(C2500.m7007(R.string.perm_ok), new DialogInterfaceOnClickListenerC3507(c3478));
                    }
                    return c29132.m7851();
                case 21:
                    C2913 c29133 = new C2913(C2975.f9245.mo1874());
                    C2931<C3477> c29312 = C2975.f9265;
                    if (c29312 != null) {
                        c29312.setNotifyOnChange(true);
                        c29133.m7863(true);
                        c29133.m7864(C2975.f9265, new C3520());
                        c29133.m7875(C2500.m7007(R.string.create_perm_ok), new DialogInterfaceOnClickListenerC3523());
                    }
                    return c29133.m7851();
                case 26:
                    C2913 c29134 = new C2913(C2975.f9245.mo1874());
                    ArrayAdapter arrayAdapter = C2975.f9263;
                    if (arrayAdapter != null) {
                        arrayAdapter.setNotifyOnChange(true);
                        c29134.m7862(C2975.f9263, new C3509());
                    }
                    return c29134.m7851();
                case 29:
                    C2913 c29135 = new C2913(C2975.f9245.mo1874());
                    C2931<C3477> c29313 = C2975.f9265;
                    if (c29313 != null) {
                        c29313.setNotifyOnChange(true);
                        c29135.m7863(true);
                        c29135.m7864(C2975.f9265, new C3524(c3478));
                        c29135.m7875(C2500.m7007(R.string.launchbutton), new DialogInterfaceOnClickListenerC3525(c3478));
                    }
                    return c29135.m7851();
                case 31:
                    ArrayList arrayList = new ArrayList();
                    C2913 c29136 = new C2913(C2975.f9245.mo1874());
                    C2931<C2935> c29314 = C2975.f9266;
                    if (c29314 != null) {
                        c29314.setNotifyOnChange(true);
                        c29136.m7863(true);
                        c29136.m7864(C2975.f9266, new C3527(arrayList));
                        c29136.f9084 = true;
                        c29136.m7878(C2500.m7007(R.string.usepatch), new DialogInterfaceOnClickListenerC3528(arrayList, c3478));
                        c29136.m7880(C2500.m7007(R.string.close), new DialogInterfaceOnClickListenerC3531());
                        c29136.m7875(C2500.m7007(R.string.launchbutton), new DialogInterfaceOnClickListenerC3532(c3478));
                    }
                    return c29136.m7851();
                case 37:
                    LinearLayout linearLayout = (LinearLayout) View.inflate(C2975.f9245.mo1874(), R.layout.core_patch_result, null);
                    TextView textView = (TextView) linearLayout.findViewById(R.id.textResults);
                    CheckBox checkBox = (CheckBox) linearLayout.findViewById(R.id.CheckBox1);
                    textView.setText(C2500.m7007(R.string.core_only_dalvik_cache_finished));
                    if (C2975.f9361.contains("_patch1")) {
                        if (!C2975.f9248.contains("Core patched!") && !C2975.f9248.contains("Core 2 patched!")) {
                            str = C2500.m7007(R.string.core_patch_nopatch);
                            i3 = -65536;
                            textView.append(C2500.m7007(R.string.contextcorepatch1) + " " + i4 + "/2 ");
                            StringBuilder sb = new StringBuilder();
                            sb.append(str);
                            sb.append("\n");
                            textView.append(C2500.m6933(sb.toString(), i3, ""));
                        }
                        String m70074 = C2500.m7007(R.string.core_patch_apply);
                        ?? contains = C2975.f9248.contains("Core patched!");
                        int i5 = contains;
                        if (C2975.f9248.contains("Core 2 patched!")) {
                            i5 = contains + 1;
                        }
                        i4 = i5;
                        str = m70074;
                        i3 = -16711936;
                        textView.append(C2500.m7007(R.string.contextcorepatch1) + " " + i4 + "/2 ");
                        StringBuilder sb2 = new StringBuilder();
                        sb2.append(str);
                        sb2.append("\n");
                        textView.append(C2500.m6933(sb2.toString(), i3, ""));
                    }
                    if (C2975.f9361.contains("_patch2")) {
                        if (C2975.f9248.contains("Core unsigned install patched!")) {
                            m70072 = C2500.m7007(R.string.core_patch_apply);
                            i2 = -16711936;
                        } else {
                            m70072 = C2500.m7007(R.string.core_patch_nopatch);
                            i2 = -65536;
                        }
                        textView.append(C2500.m7007(R.string.contextcorepatch2) + " ");
                        textView.append(C2500.m6933(m70072 + "\n", i2, ""));
                    }
                    if (C2975.f9361.contains("_patch3")) {
                        if (C2975.f9248.contains("Core4 patched!")) {
                            m7007 = C2500.m7007(R.string.core_patch_apply);
                            i = -16711936;
                        } else {
                            m7007 = C2500.m7007(R.string.core_patch_apply);
                            i = -65536;
                        }
                        textView.append(C2500.m7007(R.string.contextcorepatch3) + " ");
                        textView.append(C2500.m6933(m7007 + "\n", i, ""));
                    }
                    if (C2975.f9361.contains("restore")) {
                        checkBox.setChecked(false);
                        checkBox.setEnabled(false);
                        C2500.m7151();
                        if (C2975.f9248.contains("Core restored!") || C2975.f9248.contains("Core 2 restored!")) {
                            String m70075 = C2500.m7007(R.string.restored);
                            textView.append(C2500.m7007(R.string.contextcorepatch1) + " ");
                            textView.append(C2500.m6933(m70075 + "\n", -16711936, ""));
                        }
                        if (C2975.f9248.contains("Core unsigned install restored!")) {
                            String m70076 = C2500.m7007(R.string.restored);
                            textView.append(C2500.m7007(R.string.contextcorepatch2) + " ");
                            textView.append(C2500.m6933(m70076 + "\n", -16711936, ""));
                        }
                        if (C2975.f9248.contains("Core4 restored!")) {
                            String m70077 = C2500.m7007(R.string.restored);
                            textView.append(C2500.m7007(R.string.contextcorepatch3) + " ");
                            textView.append(C2500.m6933(m70077 + "\n", -16711936, ""));
                        }
                    }
                    textView.append("\n" + C2500.m7007(R.string.core_only_dalvik_cache_end));
                    checkBox.setChecked(false);
                    checkBox.setText(C2500.m7007(R.string.core_result_checkbox));
                    if (checkBox.isChecked()) {
                        C2500.m7152(C2975.f9361);
                    } else {
                        C2500.m7150(C2975.f9361);
                    }
                    checkBox.setOnCheckedChangeListener(new C3516());
                    C2913 c29137 = new C2913(C2975.f9245.mo1874());
                    c29137.m7858(linearLayout);
                    c29137.m7875(C2500.m7007(R.string.ok), new DialogInterfaceOnClickListenerC3517(checkBox)).m7854(R.string.information);
                    return c29137.m7851();
                case 39:
                    LinearLayout linearLayout2 = (LinearLayout) View.inflate(C2975.f9245.mo1874(), R.layout.corepatch_layout, null);
                    CheckBox checkBox2 = (CheckBox) linearLayout2.findViewById(R.id.checkBoxDalvik);
                    JSONObject m7071 = C2500.m7071();
                    if (m7071 == null) {
                        new Thread(new RunnableC3511()).start();
                    }
                    if (m7071 != null) {
                        checkBox2.setChecked(m7071.getBoolean("module_on"));
                    } else {
                        checkBox2.setChecked(true);
                    }
                    if (XposedUtils.isXposedEnabled()) {
                        checkBox2.setEnabled(true);
                        checkBox2.setText(C2500.m7007(R.string.xposed_module_option));
                    } else {
                        checkBox2.setEnabled(false);
                        checkBox2.setChecked(false);
                        checkBox2.setText(C2500.m7007(R.string.xposed_option_off));
                    }
                    checkBox2.setMaxLines(2);
                    C2913 c29138 = new C2913(C2975.f9245.mo1874());
                    ArrayAdapter arrayAdapter2 = this.f10138;
                    if (arrayAdapter2 != null) {
                        arrayAdapter2.setNotifyOnChange(true);
                        ListView listView = (ListView) linearLayout2.findViewById(R.id.coreListView);
                        listView.setAdapter((ListAdapter) this.f10138);
                        listView.setDivider(new GradientDrawable(GradientDrawable.Orientation.RIGHT_LEFT, new int[]{-1715492012, -4215980, -1715492012}));
                        listView.setDividerHeight(1);
                        if (XposedUtils.isXposedEnabled()) {
                            listView.setOnItemClickListener(new C3512());
                        }
                        c29138.m7858(linearLayout2);
                        if (!XposedUtils.isXposedEnabled()) {
                            c29138.m7875(C2500.m7007(R.string.ok), null);
                        } else {
                            c29138.m7875(C2500.m7007(R.string.usepatch), new DialogInterfaceOnClickListenerC3513(checkBox2));
                        }
                    }
                    return c29138.m7851();
                case 42:
                    C2913 c29139 = new C2913(C2975.f9245.mo1874());
                    ArrayAdapter arrayAdapter3 = C2975.f9263;
                    if (arrayAdapter3 != null) {
                        arrayAdapter3.setNotifyOnChange(true);
                        c29139.m7862(C2975.f9263, new C3510());
                    }
                    return c29139.m7851();
                case 3255:
                    ProgressDialog progressDialog = new ProgressDialog(C2975.f9245.mo1874());
                    progressDialog.setTitle("Progress");
                    progressDialog.setMessage(C2500.m7007(R.string.collect_logs));
                    progressDialog.setIndeterminate(true);
                    return progressDialog;
                case 345350:
                case MainActivity.DIALOG_REPORT_FORCE_CLOSE:
                    C2913 c291310 = new C2913(C2975.f9245.mo1874());
                    if (C2975.f9244 == 345350) {
                        m70073 = C2500.m7007(R.string.send_logs);
                    } else {
                        m70073 = C2500.m7007(R.string.error_detect);
                    }
                    c291310.m7860(C2500.m7007(R.string.warning)).m7872(R.drawable.ic_bolen).m7876(m70073).m7875(C2500.m7007(R.string.Yes), new DialogInterfaceOnClickListenerC3521()).m7878(C2500.m7007(R.string.no), new DialogInterfaceOnClickListenerC3519());
                    return c291310.m7851();
                case 3535122:
                    C2913 c291311 = new C2913(C2975.f9245.mo1874());
                    c291311.m7860("Error").m7876(C2500.m7007(R.string.error_collect_logs)).m7878("OK", null);
                    return c291311.m7851();
                default:
                    return null;
            }
        } catch (Exception e2) {
            C2975.m7942("LuckyPatcher (Create Dialog): " + e2);
            e2.printStackTrace();
            C2913 c291312 = new C2913(C2975.f9245.mo1874());
            c291312.m7860("Error").m7876("Sorry...\nShow Dialog - Error...").m7878("OK", null);
            return c291312.m7851();
        }
        C2975.m7942("LuckyPatcher (Create Dialog): " + e2);
        e2.printStackTrace();
        C2913 c2913122 = new C2913(C2975.f9245.mo1874());
        c2913122.m7860("Error").m7876("Sorry...\nShow Dialog - Error...").m7878("OK", null);
        return c2913122.m7851();
    }

    public void m8147() {
        if (this.f10139 == null) {
            this.f10139 = m8146();
        }
        Dialog dialog = this.f10139;
        if (dialog != null) {
            dialog.show();
        }
    }
}