Luскy*Patcher v11.1.8版本的 MD5 值为:260a307cc4cd8550bbc248b8d7c0bddc

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


package ru.sxbuIDfx.pFSOyagrF;

import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.res.Configuration;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.ActivityC0142;
import androidx.appcompat.app.C0130;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.AbstractC0758;
import com.google.android.finsky.billing.iab.InAppBillingService;
import com.xposed.XposedUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import org.jf.dexlib2.dexbacked.raw.ItemType;
import p064.C2880;
import p112.C3312;
import p112.C3313;
import p112.C3315;
import p112.C3316;
import p112.C3348;
import p112.C3853;
import p113.C3923;
import p113.C4035;

public class MainActivity extends ActivityC0142 {
    public static final int APP_DIALOG = 6;
    public static final int CONTEXT_DIALOG = 7;
    public static final int CREATE_APK = 0;
    public static final int CUSTOM2_DIALOG = 15;
    public static final int CUSTOM_PATCH = 1;
    public static final int DIALOG_REPORT_FORCE_CLOSE = 3535788;
    public static final int MARKET_INSTALL_DIALOG = 30;
    public static final int PROGRESS_DIALOG2 = 11;
    public static final int RESTORE_FROM_BACKUP = 28;
    private static final int SETTINGS_ORIENT_LANDSCAPE = 1;
    private static final int SETTINGS_ORIENT_PORTRET = 2;
    public static final int SETTINGS_VIEWSIZE_DEFAULT = 0;
    private static final int SETTINGS_VIEWSIZE_SMALL = 0;
    public static C3348 frag;
    public DrawerLayout mDrawerLayout = null;
    boolean mIsRestoredToTop = false;

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

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            new AsyncTask<Void, Void, Boolean>() {
                @Override
                protected void onPreExecute() {
                }

                @Override
                public Boolean doInBackground(Void... voidArr) {
                    return Boolean.valueOf(new File(C3348.f9876 + "/Log/error_log.txt").exists());
                }

                @Override
                public void onPostExecute(Boolean bool) {
                    if (bool.booleanValue()) {
                        C3348.f9912.m12303(MainActivity.this, "lp.chelpus@gmail.com", "Error Log " + C3348.f9898, "Lucky Patcher " + C2880.m11391(MainActivity.this.getPackageName()));
                        MainActivity.this.finish();
                        if (C3348.f9908) {
                            C3348.m12331();
                        }
                        System.exit(0);
                        return;
                    }
                    AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
                    builder.setTitle("Error").setMessage(C2880.m11423(ru.aaaaabbd.installer.R.string.error_collect_logs)).setNegativeButton("OK", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialogInterface2, int i2) {
                            MainActivity.this.finish();
                            if (C3348.f9908) {
                                C3348.m12331();
                            }
                            System.exit(0);
                        }
                    }).setOnCancelListener(new DialogInterface.OnCancelListener() {
                        @Override
                        public void onCancel(DialogInterface dialogInterface2) {
                            MainActivity.this.finish();
                            if (C3348.f9908) {
                                C3348.m12331();
                            }
                            System.exit(0);
                        }
                    });
                    builder.create().show();
                }
            }.execute(new Void[0]);
        }
    }

    final class byNameApkFile implements Comparator<C3312> {
        byNameApkFile() {
        }

        @Override
        public int compare(C3312 c3312, C3312 c33122) {
            if (c3312 != null && c33122 != null) {
                if (c3312.f9776.equals(c33122.f9776)) {
                    int i = c3312.f9780;
                    int i2 = c33122.f9780;
                    if (i > i2) {
                        return 1;
                    }
                    if (i < i2) {
                        return -1;
                    }
                    if (i == i2) {
                        return 0;
                    }
                }
                return c3312.f9777.compareToIgnoreCase(c33122.f9777);
            }
            throw new ClassCastException();
        }
    }

    private void showMessage(int i, boolean z) {
        C2880.m11521(this);
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle(C2880.m11423(ru.aaaaabbd.installer.R.string.warning)).setIcon(android.R.drawable.ic_dialog_alert).setMessage(C2880.m11423(i)).setOnCancelListener(new DialogInterface.OnCancelListener() {
            @Override
            public void onCancel(DialogInterface dialogInterface) {
                MainActivity.this.finish();
                if (C3348.f9908) {
                    C3348.m12331();
                }
                System.exit(0);
            }
        });
        if (z) {
            C3348.f9912 = new C3313();
            builder.setPositiveButton(C2880.m11423(ru.aaaaabbd.installer.R.string.Yes), new AnonymousClass3()).setNegativeButton(C2880.m11423(ru.aaaaabbd.installer.R.string.no), new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialogInterface, int i2) {
                    MainActivity.this.finish();
                    if (C3348.f9908) {
                        C3348.m12331();
                    }
                    System.exit(0);
                }
            });
        } else {
            builder.setNegativeButton(C2880.m11423(ru.aaaaabbd.installer.R.string.ok), new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialogInterface, int i2) {
                    MainActivity.this.finish();
                    if (C3348.f9908) {
                        C3348.m12331();
                    }
                    System.exit(0);
                }
            });
        }
        builder.create().show();
    }

    @Override
    public void attachBaseContext(Context context) {
        System.out.println("attachBaseContext");
        Context m11521 = C2880.m11521(context);
        if (m11521 != null) {
            super.attachBaseContext(m11521);
        } else {
            super.attachBaseContext(context);
        }
    }

    @Override
    public boolean dispatchKeyEvent(KeyEvent keyEvent) {
        if (keyEvent.getAction() == 0 && keyEvent.getKeyCode() == 82) {
            DrawerLayout drawerLayout = this.mDrawerLayout;
            if (drawerLayout != null && drawerLayout.m2309(8388611)) {
                this.mDrawerLayout.m2321();
                return true;
            }
            this.mDrawerLayout.m2320(8388611);
            return true;
        }
        return super.dispatchKeyEvent(keyEvent);
    }

    @Override
    @SuppressLint({"NewApi"})
    public void finish() {
        if (C3348.f9908) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    String m11408 = C2880.m11408();
                    System.out.println("EnfFinish: " + m11408);
                    if (m11408.equals("enforce")) {
                        try {
                            new C2880("").m11618("setenforce 1");
                        } catch (Exception unused) {
                        }
                    }
                    if (C3348.f9908) {
                        C3348.m12331();
                    }
                    System.exit(0);
                }
            }).start();
            super.finish();
        } else {
            super.finish();
            if (C3348.f9908) {
                C3348.m12331();
            }
            System.exit(0);
        }
        if (Build.VERSION.SDK_INT >= 19 && !isTaskRoot() && this.mIsRestoredToTop) {
            ((ActivityManager) getSystemService("activity")).moveTaskToFront(getTaskId(), 2);
        }
    }

    public void mod_market_check(View view) {
        C3348.f9870.m12387();
    }

    @Override
    public void onActivityResult(int i, int i2, Intent intent) {
        super.onActivityResult(i, i2, intent);
        C3348.m12349(i, i2, intent);
    }

    @Override
    public void onBackPressed() {
        System.out.println("backPressed");
        try {
            if (C3348.f9959) {
                C3348.f9870.m12428();
                return;
            }
            if (C3348.f9951) {
                C3348.m12357();
                return;
            }
            DrawerLayout drawerLayout = this.mDrawerLayout;
            if (drawerLayout != null && drawerLayout.m2309(8388611)) {
                this.mDrawerLayout.m2321();
            } else if (C3348.m12333().getBoolean("confirm_exit", true)) {
                DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        if (i != -1) {
                            return;
                        }
                        MainActivity.this.finish();
                    }
                };
                C2880.m11537(C2880.m11423(ru.aaaaabbd.installer.R.string.app_name), C2880.m11423(ru.aaaaabbd.installer.R.string.message_exit), onClickListener, onClickListener, null);
            } else {
                super.onBackPressed();
            }
        } catch (Exception e) {
            e.printStackTrace();
            super.onBackPressed();
        }
    }

    @Override
    public void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
        C3348.m12347("onConfigurationChanged");
        C2880.m11521(App.getInstance());
    }

    @Override
    @SuppressLint({"NewApi"})
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        System.out.println("LuckyPatcher: create activity");
        App.MainActivity = this;
        C3348.f9884 = this;
        String string = getSharedPreferences("config", 4).getString("force_close_info", "");
        if (getSharedPreferences("config", 4).getBoolean("force_close", false) && string.equals("")) {
            System.out.println("LP FC detected!");
            try {
                getSharedPreferences("config", 4).edit().putBoolean("force_close", false).commit();
                C3348.m12343(this);
                if (C3348.f9913 >= C3348.m12333().getInt("http_versionCode", 0)) {
                    showMessage(ru.aaaaabbd.installer.R.string.error_detect, true);
                } else {
                    showMessage(ru.aaaaabbd.installer.R.string.warning_force_close_please_update_lp, false);
                }
                return;
            } catch (Exception e) {
                e.printStackTrace();
                getSharedPreferences("config", 4).edit().putBoolean("force_close", false).commit();
                finish();
                if (C3348.f9908) {
                    C3348.m12331();
                }
                System.exit(0);
                return;
            }
        }
        C3348.f9919 = true;
        C3348.f9884 = this;
        C3348.f9895 = this;
        C3348.m12343(this);
        try {
            if (!string.equals("")) {
                if (string.equals("No space left on device") && !C2880.m11551(C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.warning_for_no_free_space_on_device))) {
                    showMessage(ru.aaaaabbd.installer.R.string.warning_for_no_free_space_on_device, false);
                }
                if (string.equals("OutOfMemoryError") && !C2880.m11551(C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.warning_for_out_of_memory_on_device))) {
                    showMessage(ru.aaaaabbd.installer.R.string.warning_for_out_of_memory_on_device, false);
                }
                if (string.equals("resources_error") && !C2880.m11551(C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.warning_for_resources_error))) {
                    showMessage(ru.aaaaabbd.installer.R.string.warning_for_resources_error, true);
                }
                getSharedPreferences("config", 4).edit().putString("force_close_info", "").commit();
                getSharedPreferences("config", 4).edit().putBoolean("force_close", false).commit();
                if (string.equals("resources_error")) {
                    return;
                }
            }
        } catch (Exception unused) {
            getSharedPreferences("config", 4).edit().putString("force_close_info", "").commit();
            getSharedPreferences("config", 4).edit().putBoolean("force_close", false).commit();
        }
        C2880.m11521(this);
        setContentView(ru.aaaaabbd.installer.R.layout.activity_main);
        this.mDrawerLayout = (DrawerLayout) findViewById(ru.aaaaabbd.installer.R.id.drawer_layout);
        Toolbar toolbar = (Toolbar) findViewById(ru.aaaaabbd.installer.R.id.toolbar_top);
        toolbar.setTitle("LP");
        setSupportActionBar(toolbar);
        C0130 c0130 = new C0130(C3348.f9884, this.mDrawerLayout, toolbar, ru.aaaaabbd.installer.R.string.navigation_drawer_open, ru.aaaaabbd.installer.R.string.navigation_drawer_close);
        this.mDrawerLayout.m2308(c0130);
        c0130.m619();
        C3348.m12363(this);
        getSupportFragmentManager().m2776().m2911(ru.aaaaabbd.installer.R.id.main_content, new C3348()).mo2512();
        try {
            if (C2880.m11423(ru.aaaaabbd.installer.R.string.busybox_not_found) == null) {
                finish();
            }
        } catch (Exception e2) {
            e2.printStackTrace();
            finish();
        }
        if (C3348.m12333().getInt("orientstion", 3) == 1) {
            setRequestedOrientation(0);
        }
        if (C3348.m12333().getInt("orientstion", 3) == 2) {
            setRequestedOrientation(1);
        }
        if (C3348.m12333().getInt("orientstion", 3) == 3) {
            setRequestedOrientation(-1);
        }
        getWindow().addFlags(128);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(ru.aaaaabbd.installer.R.menu.toolbar_menu, menu);
        return super.onCreateOptionsMenu(menu);
    }

    public void onMemoryLow() {
        C3348.f9899 = false;
        System.out.println("LuckyPatcher (onMemoryLow): started!");
    }

    @Override
    public void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        System.out.println("Lucky Patcher: on new intent activity.");
        C3348.f9884 = this;
        C3348.f9937 = new Handler();
        C3348.f9886 = true;
        C3348 c3348 = C3348.f9870;
        if (c3348 != null) {
            c3348.m12383(intent);
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        int itemId = menuItem.getItemId();
        if (itemId != ru.aaaaabbd.installer.R.id.action_help) {
            if (itemId != ru.aaaaabbd.installer.R.id.action_info) {
                if (itemId == ru.aaaaabbd.installer.R.id.action_search) {
                    toolbar_refresh_click(null);
                }
            } else {
                C3348 c3348 = C3348.f9870;
                if (c3348 != null) {
                    c3348.m12470();
                }
            }
        } else {
            C3923.m12593();
        }
        menuItem.getItemId();
        menuItem.getItemId();
        return super.onOptionsItemSelected(menuItem);
    }

    @Override
    public void onPause() {
        try {
            super.onPause();
        } catch (Throwable th) {
            th.printStackTrace();
        }
        System.out.println("Lucky Patcher: activity pause.");
        C3348.f9884 = this;
        C3348.f9937 = new Handler();
    }

    @Override
    protected void onRestoreInstanceState(Bundle bundle) {
        super.onRestoreInstanceState(bundle);
        C3348.m12347("onRestoreInstanceState");
    }

    @Override
    public void onResume() {
        try {
            super.onResume();
        } catch (Throwable th) {
            th.printStackTrace();
        }
        C2880.m11521(this);
        System.out.println("Lucky Patcher: activity resume.");
        C3348.f9884 = this;
        App.MainActivity = this;
        C3348.f9937 = new Handler();
    }

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        bundle.putString("WORKAROUND_FOR_BUG_19917_KEY", "WORKAROUND_FOR_BUG_19917_VALUE");
        super.onSaveInstanceState(bundle);
        System.out.println("onSaveInstanceState");
    }

    @Override
    public void onStart() {
        super.onStart();
        System.out.println("Lucky Patcher: start activity.");
        C3348.f9884 = this;
        App.MainActivity = this;
        C3348.f9937 = new Handler();
    }

    @Override
    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        System.out.println("onWindowFocusChanged");
        C3348.f9884 = this;
        C3348.f9937 = new Handler();
        if (z) {
            C2880.m11521(App.getInstance());
        }
        if (C3348.f9914 && z) {
            C3348.m12330();
            C3348.f9914 = false;
            if (C3348.f9878 != null) {
                C3348.m12333().edit().remove(C3348.f9878.f10669).commit();
            }
            C3853 c3853 = C3348.f9877;
            if (c3853 != null) {
                c3853.notifyDataSetChanged();
            }
            C3348.m12356(6);
            new Thread(new Runnable() {
                @Override
                public void run() {
                    int i = C3348.m12333().getInt("Install_location", 3);
                    if (i != 3) {
                        if (C3348.f9908) {
                            new C2880("").m11618("pm setInstallLocation " + i, "skipOut");
                            new C2880("").m11618("pm set-install-location " + i, "skipOut");
                            return;
                        }
                        int i2 = Build.VERSION.SDK_INT;
                        if (i2 < 19) {
                            C2880.m11464("pm setInstallLocation " + i, "skipOut");
                        }
                        if (i2 < 19) {
                            C2880.m11464("pm set-install-location " + i, "skipOut");
                        }
                    }
                }
            }).start();
        }
        C3853 c38532 = C3348.f9877;
        if (c38532 != null) {
            c38532.notifyDataSetChanged();
        }
        ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
        ((ActivityManager) C3348.m12334().getSystemService("activity")).getMemoryInfo(memoryInfo);
        long j = memoryInfo.availMem / 1048576;
        System.out.println("LuckyPatcher " + C3348.f9898 + " (FreeMemory): " + j + " lowMemory:" + memoryInfo.lowMemory + " TrashOld:" + (memoryInfo.threshold / 1048576));
        Boolean bool = C3348.f9915;
        if ((bool == null || bool.booleanValue()) && C3348.f9877 != null && z) {
            if (!C3348.f9906) {
                C3348.m12354(true);
            }
            C3348.f9915 = Boolean.FALSE;
        }
    }

    public void toolbar_backups_click(View view) {
        C3923.m12600();
    }

    public void toolbar_market_install_click(View view) {
        C3348.m12356(30);
        C3348.m12365(30);
    }

    public void toolbar_menu_click(View view) {
        frag.m2466().openOptionsMenu();
    }

    public void toolbar_options_show(View view) {
        try {
            C3348 c3348 = frag;
            if (c3348 != null) {
                c3348.m12442();
            }
        } catch (Throwable th) {
            th.printStackTrace();
        }
    }

    public void toolbar_rebuild_click(View view) {
        try {
            C3348.f9877.m12523();
            C3348.f9878 = null;
        } catch (Exception e) {
            e.printStackTrace();
        }
        C3923.m12605("");
    }

    public void toolbar_refresh_click(View view) {
        try {
            AbstractC0758 m2776 = getSupportFragmentManager().m2776();
            C4035 c4035 = C3348.f9939;
            if (c4035 == null) {
                C4035 c40352 = new C4035();
                C3348.f9939 = c40352;
                m2776.m2906(ru.aaaaabbd.installer.R.id.fragment_filter, c40352);
                m2776.mo2512();
            } else {
                m2776.mo2517(c4035);
                m2776.mo2512();
                C3348.f9939.mo2388();
                C3348.f9939 = null;
                C3348.f9877.m12517().filter("");
                C3348.f9877.notifyDataSetChanged();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void toolbar_settings_click() {
        if (C3348.f9959) {
            C3348.f9870.m12428();
            return;
        }
        ArrayList<C3315> arrayList = new ArrayList<>();
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.back, new ArrayList(), true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.viewmenu, new ArrayList(), 1, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.text_size, new ArrayList<Integer>() {
            {
                add(1);
            }
        }, 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.orientmenu, new ArrayList<Integer>() {
            {
                add(2);
            }
        }, 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.sortmenu, new ArrayList<Integer>() {
            {
                add(3);
            }
        }, 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.filter, ru.aaaaabbd.installer.R.string.filterdescr, new ArrayList<Integer>() {
            {
                add(4);
            }
        }, 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.others, new ArrayList(), 1, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.langmenu, new ArrayList(), 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.settings_force_root, ru.aaaaabbd.installer.R.string.settings_force_root_description, new ArrayList<Integer>() {
            {
                add(5);
            }
        }, 2, true));
        if (C3348.f9924 >= 21) {
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.settings_force_java_root_method, ru.aaaaabbd.installer.R.string.settings_force_java_root_method_description, new ArrayList<Integer>() {
                {
                    add(8);
                }
            }, 2, true));
        }
        if (C3348.f9908) {
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.settings_mode_apks_installer, ru.aaaaabbd.installer.R.string.settings_mode_apks_installer_description, new ArrayList<Integer>() {
                {
                    add(10);
                }
            }, 2, true));
        } else {
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.settings_mode_apk_installer, ru.aaaaabbd.installer.R.string.settings_mode_apk_installer_description, new ArrayList<Integer>() {
                {
                    add(11);
                }
            }, 2, true));
        }
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.dir_change, ru.aaaaabbd.installer.R.string.dir_change_descr, new ArrayList(), 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.days_on_up, ru.aaaaabbd.installer.R.string.days_on_up_descr, new ArrayList(), 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.setting_confirm_exit, ru.aaaaabbd.installer.R.string.setting_confirm_exit_descr, new ArrayList(), 3, true, "confirm_exit", true, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("confirm_exit", true)) {
                    C3348.m12333().edit().putBoolean("confirm_exit", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("confirm_exit", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.fast_start, ru.aaaaabbd.installer.R.string.fast_start_descr, new ArrayList(), 3, true, "fast_start", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("fast_start", true)) {
                    C3348.m12333().edit().putBoolean("fast_start", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("fast_start", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.no_icon, ru.aaaaabbd.installer.R.string.no_icon_descr, new ArrayList(), 3, true, "no_icon", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("no_icon", false)) {
                    C3348.m12333().edit().putBoolean("no_icon", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("no_icon", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.apk_create_option, ru.aaaaabbd.installer.R.string.apkdescr, new ArrayList<Integer>() {
            {
                add(6);
            }
        }, 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.change_icon_lp, ru.aaaaabbd.installer.R.string.change_icon_lp_descr, new ArrayList<Integer>() {
            {
                add(7);
            }
        }, 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.hide_notify, ru.aaaaabbd.installer.R.string.hide_notify_descr, new ArrayList(), 3, true, "hide_notify", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("hide_notify", false)) {
                    C3348.m12333().edit().putBoolean("hide_notify", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("hide_notify", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.disable_autoupdate, ru.aaaaabbd.installer.R.string.disable_autoupdate_descr, new ArrayList(), 3, true, "disable_autoupdate", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("disable_autoupdate", false)) {
                    C3348.m12333().edit().putBoolean("disable_autoupdate", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("disable_autoupdate", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.option_autoupdate_custom_patches, ru.aaaaabbd.installer.R.string.disable_autoupdate_descr, new ArrayList(), 3, true, "disable_autoupdate_custom_patches", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("disable_autoupdate_custom_patches", false)) {
                    C3348.m12333().edit().putBoolean("disable_autoupdate_custom_patches", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("disable_autoupdate_custom_patches", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.vibration, ru.aaaaabbd.installer.R.string.vibration_descr, new ArrayList(), 3, true, "vibration", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("vibration", false)) {
                    C3348.m12333().edit().putBoolean("vibration", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("vibration", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.option_remove_ads, ru.aaaaabbd.installer.R.string.option_remove_ads_descr, new ArrayList(), 3, true, "remove_ads", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("remove_ads", false)) {
                    C3348.m12333().edit().putBoolean("remove_ads", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("remove_ads", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.option_analytic, ru.aaaaabbd.installer.R.string.option_analytic_descr, new ArrayList(), 3, true, "analytics", true, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("analytics", true)) {
                    C3348.m12333().edit().putBoolean("analytics", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("analytics", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.option_disable_removing_magisk_module_after_change_firmware, ru.aaaaabbd.installer.R.string.option_disable_removing_magisk_module_after_change_firmware_descr, new ArrayList(), 3, true, "disable_removing_magisk_module_after_change_firmware", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("disable_removing_magisk_module_after_change_firmware", false)) {
                    C3348.m12333().edit().putBoolean("disable_removing_magisk_module_after_change_firmware", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("disable_removing_magisk_module_after_change_firmware", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.option_force_turn_off_magisk, ru.aaaaabbd.installer.R.string.option_force_turn_off_magisk_descr, new ArrayList(), 3, true, "option_force_turn_off_magisk", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("option_force_turn_off_magisk", false)) {
                    C3348.m12333().edit().putBoolean("option_force_turn_off_magisk", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("option_force_turn_off_magisk", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.option_SELinux_permissive, ru.aaaaabbd.installer.R.string.option_SELinux_permissive_descr, new ArrayList(), 3, true, "selinux_set_to_permissive", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("selinux_set_to_permissive", false)) {
                    C3348.m12333().edit().putBoolean("selinux_set_to_permissive", false).commit();
                } else {
                    C3348.m12333().edit().putBoolean("selinux_set_to_permissive", true).commit();
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.option_detailed_logs, ru.aaaaabbd.installer.R.string.option_detailed_logs_descr, new ArrayList(), 3, true, "showLog", false, new Runnable() {
            @Override
            public void run() {
                if (C3348.m12333().getBoolean("showLog", false)) {
                    C3348.m12333().edit().putBoolean("showLog", false).commit();
                    C3348.f9971 = Boolean.FALSE;
                } else {
                    C3348.m12333().edit().putBoolean("showLog", true).commit();
                    C3348.f9971 = Boolean.TRUE;
                }
                C3348.f9960.notifyDataSetChanged();
                C3348.f9868 = true;
            }
        }));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.reset_dialog_settings, new ArrayList(), 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.help, new ArrayList(), 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.update_lp, new ArrayList(), 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.sendlog, new ArrayList(), 2, true));
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.aboutmenu, new ArrayList(), 2, true));
        try {
            if (C3348.f9960 == null) {
                C3348.f9960 = new C3316(this, C3348.m12333().getInt("viewsize", 0), new ArrayList());
            }
            C3316 c3316 = C3348.f9960;
            if (c3316 != null) {
                c3316.m12305(arrayList);
                C3348.f9870.m12471();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void toolbar_switchers_click(View view) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                PackageInfo packageInfo;
                ArrayList arrayList;
                try {
                    packageInfo = C3348.m12337().getPackageInfo("com.android.vending", ItemType.CLASS_DATA_ITEM);
                } catch (PackageManager.NameNotFoundException e) {
                    e.printStackTrace();
                    packageInfo = null;
                    arrayList = new ArrayList();
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.billing_hack_menu));
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.billing_proxy_server_for_support_patch_inapp));
                    if (C3348.f9908) {
                        arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.proxyGP));
                    }
                    if (C3348.f9908) {
                        arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.disable_license_services_google));
                    }
                    if (C3348.f9908) {
                        arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.disable_inapp_services_google));
                    }
                    if (!C3348.f9972.booleanValue()) {
                    }
                    if (C3348.f9908) {
                    }
                    if (arrayList.size() != 0) {
                    }
                } catch (IllegalArgumentException e2) {
                    e2.printStackTrace();
                    packageInfo = null;
                    arrayList = new ArrayList();
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.billing_hack_menu));
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.billing_proxy_server_for_support_patch_inapp));
                    if (C3348.f9908) {
                    }
                    if (C3348.f9908) {
                    }
                    if (C3348.f9908) {
                    }
                    if (!C3348.f9972.booleanValue()) {
                    }
                    if (C3348.f9908) {
                    }
                    if (arrayList.size() != 0) {
                    }
                }
                arrayList = new ArrayList();
                arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.billing_hack_menu));
                arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.billing_proxy_server_for_support_patch_inapp));
                if (C3348.f9908 && packageInfo != null) {
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.proxyGP));
                }
                if (C3348.f9908 && packageInfo != null) {
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.disable_license_services_google));
                }
                if (C3348.f9908 && packageInfo != null) {
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.disable_inapp_services_google));
                }
                if (!C3348.f9972.booleanValue()) {
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.switcher_auto_backup));
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.switcher_auto_backup_only_gp));
                }
                if (C3348.f9908) {
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.switcher_auto_integrate_update));
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.switcher_auto_move_to_sd));
                    arrayList.add(Integer.valueOf(ru.aaaaabbd.installer.R.string.switcher_auto_move_to_internal));
                }
                if (arrayList.size() != 0) {
                    C3348.f9889 = new ArrayAdapter<Integer>(MainActivity.this, ru.aaaaabbd.installer.R.layout.switchers_context_menu, arrayList) {
                        ArrayAdapter<Integer> mAdapter = this;

                        @Override
                        public View getView(int i, View view2, ViewGroup viewGroup) {
                            PackageInfo packageInfo2;
                            String str;
                            ServiceInfo[] serviceInfoArr;
                            String str2;
                            PackageInfo packageInfo3;
                            View view3;
                            ServiceInfo[] serviceInfoArr2;
                            View view4;
                            Integer num = (Integer) getItem(i);
                            int i2 = 0;
                            View inflate = view2 == null ? ((LayoutInflater) C3348.m12334().getSystemService("layout_inflater")).inflate(ru.aaaaabbd.installer.R.layout.switchers_context_menu, viewGroup, false) : view2;
                            TextView textView = (TextView) inflate.findViewById(ru.aaaaabbd.installer.R.id.conttext);
                            ImageView imageView = (ImageView) inflate.findViewById(ru.aaaaabbd.installer.R.id.imgIcon);
                            imageView.setImageDrawable(null);
                            textView.setTextAppearance(getContext(), C3348.m12339());
                            textView.setCompoundDrawablePadding((int) ((C3348.m12338().getDisplayMetrics().density * 5.0f) + 0.5f));
                            textView.setTextColor(-1);
                            String str3 = "";
                            switch (num.intValue()) {
                                case ru.aaaaabbd.installer.R.string.billing_hack_menu:
                                    View view5 = inflate;
                                    if (C3348.m12334().getPackageManager().getComponentEnabledSetting(new ComponentName(C3348.m12334(), (Class<?>) InAppBillingService.class)) == 2) {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                        textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.billing_hack_menu), "#FF0000", "bold"));
                                    } else {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                        textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.billing_hack_menu), "#00FF00", "bold"));
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.billing_hack_menu_descr), "#AAAAAA", "")));
                                    return view5;
                                case ru.aaaaabbd.installer.R.string.billing_proxy_server_for_support_patch_inapp:
                                    View view6 = inflate;
                                    try {
                                        if (C3348.m12337().getPackageInfo(C3348.f9862, ItemType.CLASS_DATA_ITEM).applicationInfo.enabled) {
                                            imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                            textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.billing_proxy_server_for_support_patch_inapp), "#00FF00", "bold"));
                                        } else {
                                            imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                            textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.billing_proxy_server_for_support_patch_inapp), "#FF0000", "bold"));
                                        }
                                    } catch (PackageManager.NameNotFoundException unused) {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                        textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.billing_proxy_server_for_support_patch_inapp), "#FF0000", "bold"));
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.billing_proxy_server_for_support_patch_descr), "#AAAAAA", "")));
                                    return view6;
                                case ru.aaaaabbd.installer.R.string.disable_inapp_services_google:
                                    View view7 = inflate;
                                    textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.switchers_service_not_found), "#FF0000", "bold"));
                                    try {
                                        packageInfo2 = C3348.m12337().getPackageInfo("com.android.vending", 8708);
                                    } catch (PackageManager.NameNotFoundException e3) {
                                        e3.printStackTrace();
                                        packageInfo2 = null;
                                    }
                                    if (packageInfo2 == null || (serviceInfoArr = packageInfo2.services) == null || serviceInfoArr.length == 0) {
                                        str = "";
                                    } else {
                                        boolean z = false;
                                        while (true) {
                                            ServiceInfo[] serviceInfoArr3 = packageInfo2.services;
                                            if (i2 < serviceInfoArr3.length) {
                                                try {
                                                } catch (Exception e4) {
                                                    e = e4;
                                                    str2 = str3;
                                                }
                                                if (!serviceInfoArr3[i2].name.endsWith("InAppBillingService") && !packageInfo2.services[i2].name.endsWith("MarketBillingService")) {
                                                    str2 = str3;
                                                    if (!packageInfo2.services[i2].name.endsWith("InAppBillingService")) {
                                                        try {
                                                        } catch (Exception e5) {
                                                            e = e5;
                                                            e.printStackTrace();
                                                            i2++;
                                                            str3 = str2;
                                                        }
                                                        if (!packageInfo2.services[i2].name.endsWith("MarketBillingService")) {
                                                            i2++;
                                                            str3 = str2;
                                                        }
                                                    }
                                                    if (C3348.m12337().getComponentEnabledSetting(new ComponentName("com.android.vending", packageInfo2.services[i2].name)) != 1) {
                                                        try {
                                                            imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                                            textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.disable_inapp_services_google), "#00FF00", "bold"));
                                                            z = true;
                                                        } catch (Exception e6) {
                                                            e = e6;
                                                            e.printStackTrace();
                                                            i2++;
                                                            str3 = str2;
                                                        }
                                                    }
                                                    i2++;
                                                    str3 = str2;
                                                }
                                                str2 = str3;
                                                if (C3348.m12337().getComponentEnabledSetting(new ComponentName("com.android.vending", packageInfo2.services[i2].name)) != 1) {
                                                    imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                                    textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.disable_inapp_services_google), "#FF0000", "bold"));
                                                    z = true;
                                                }
                                                if (!packageInfo2.services[i2].name.endsWith("InAppBillingService")) {
                                                }
                                                if (C3348.m12337().getComponentEnabledSetting(new ComponentName("com.android.vending", packageInfo2.services[i2].name)) != 1) {
                                                }
                                                i2++;
                                                str3 = str2;
                                            } else {
                                                str = str3;
                                                if (!z) {
                                                    imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                                    textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.disable_inapp_services_google), "#FF0000", "bold"));
                                                }
                                            }
                                        }
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.disable_inapp_services_google_descr), "#AAAAAA", str)));
                                    return view7;
                                case ru.aaaaabbd.installer.R.string.disable_license_services_google:
                                    textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.switchers_service_not_found), "#FF0000", "bold"));
                                    try {
                                        packageInfo3 = C3348.m12337().getPackageInfo("com.android.vending", 8708);
                                    } catch (PackageManager.NameNotFoundException e7) {
                                        e7.printStackTrace();
                                        packageInfo3 = null;
                                    }
                                    if (packageInfo3 == null || (serviceInfoArr2 = packageInfo3.services) == null || serviceInfoArr2.length == 0) {
                                        view3 = inflate;
                                    } else {
                                        boolean z2 = false;
                                        while (true) {
                                            ServiceInfo[] serviceInfoArr4 = packageInfo3.services;
                                            if (i2 < serviceInfoArr4.length) {
                                                try {
                                                    if (serviceInfoArr4[i2].name.endsWith("LicensingService")) {
                                                        view4 = inflate;
                                                        try {
                                                            if (C3348.m12337().getComponentEnabledSetting(new ComponentName("com.android.vending", packageInfo3.services[i2].name)) != 1) {
                                                                imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                                                textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.disable_license_services_google), "#FF0000", "bold"));
                                                                z2 = true;
                                                            }
                                                        } catch (Exception e8) {
                                                            e = e8;
                                                            e.printStackTrace();
                                                            i2++;
                                                            inflate = view4;
                                                        }
                                                    } else {
                                                        view4 = inflate;
                                                    }
                                                    if (packageInfo3.services[i2].name.endsWith("LicensingService") && C3348.m12337().getComponentEnabledSetting(new ComponentName("com.android.vending", packageInfo3.services[i2].name)) == 1) {
                                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                                        textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.disable_license_services_google), "#00FF00", "bold"));
                                                        z2 = true;
                                                    }
                                                } catch (Exception e9) {
                                                    e = e9;
                                                    view4 = inflate;
                                                }
                                                i2++;
                                                inflate = view4;
                                            } else {
                                                view3 = inflate;
                                                if (!z2 && C3348.f9908) {
                                                    imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                                    textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.disable_license_services_google), "#FF0000", "bold"));
                                                }
                                            }
                                        }
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.disable_license_services_google_descr), "#AAAAAA", "")));
                                    return view3;
                                case ru.aaaaabbd.installer.R.string.proxyGP:
                                    if (!C2880.m11288()) {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                        textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.proxyGP), "#FF0000", "bold"));
                                    } else {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                        textView.setText(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.proxyGP), "#00FF00", "bold"));
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.proxyGP_descr), "#AAAAAA", "")));
                                    break;
                                case ru.aaaaabbd.installer.R.string.switcher_auto_backup:
                                    if (C3348.m12333().getBoolean("switch_auto_backup_apk", false)) {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#00FF00", "bold"));
                                    } else {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#FF0000", "bold"));
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.switcher_auto_backup_descr), "#AAAAAA", "")));
                                    break;
                                case ru.aaaaabbd.installer.R.string.switcher_auto_backup_only_gp:
                                    if (C3348.m12333().getBoolean("switch_auto_backup_apk_only_gp", false)) {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#00FF00", "bold"));
                                    } else {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#FF0000", "bold"));
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.switcher_auto_backup_only_gp_descr), "#AAAAAA", "")));
                                    break;
                                case ru.aaaaabbd.installer.R.string.switcher_auto_integrate_update:
                                    if (C3348.m12333().getBoolean("switch_auto_integrate_update", false)) {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#00FF00", "bold"));
                                    } else {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#FF0000", "bold"));
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.switcher_auto_integrate_update_descr), "#AAAAAA", "")));
                                    break;
                                case ru.aaaaabbd.installer.R.string.switcher_auto_move_to_internal:
                                    if (C3348.m12333().getBoolean("switch_auto_move_to_internal", false)) {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#00FF00", "bold"));
                                    } else {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#FF0000", "bold"));
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.switcher_auto_move_to_internal_descr), "#AAAAAA", "")));
                                    break;
                                case ru.aaaaabbd.installer.R.string.switcher_auto_move_to_sd:
                                    if (C3348.m12333().getBoolean("switch_auto_move_to_sd", false)) {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_on));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#00FF00", "bold"));
                                    } else {
                                        imageView.setImageDrawable(C3348.m12338().getDrawable(ru.aaaaabbd.installer.R.mipmap.vertical_switcher_off));
                                        textView.setText(C2880.m11350(C2880.m11423(num.intValue()), "#FF0000", "bold"));
                                    }
                                    textView.append("\n" + ((Object) C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.switcher_auto_move_to_sd_descr), "#AAAAAA", "")));
                                    break;
                            }
                            return inflate;
                        }
                    };
                    MainActivity.this.runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            int i = MainActivity.APP_DIALOG;
                            C3348.m12356(38);
                            C3348.m12365(38);
                        }
                    });
                } else {
                    MainActivity.this.runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            int i = MainActivity.APP_DIALOG;
                            C3348.m12367(C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.unknown_error));
                        }
                    });
                }
            }
        });
        thread.setPriority(10);
        thread.start();
    }

    public void toolbar_system_utils_click(View view) {
        if (C3348.f9959) {
            C3348.f9870.m12428();
            return;
        }
        ArrayList<C3315> arrayList = new ArrayList<>();
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.back, new ArrayList(), true));
        if (C3348.f9908) {
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.bootview, new ArrayList(), true));
        }
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.context_batch_operations, new ArrayList<Integer>() {
            {
                add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_backup_apk_selected_apps));
                if (C3348.f9908) {
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_backup_settings_selected_apps));
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_move_selected_apps_to_sdcard));
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_move_selected_apps_to_internal));
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_uninstall_selected_apps));
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_disable_package_for_selected_apps));
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_enable_package_for_selected_apps));
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_integrate_update_selected_apps));
                }
            }
        }, true));
        if (C3348.f9908) {
            List<ResolveInfo> queryIntentServices = C3348.m12337().queryIntentServices(new Intent("com.google.android.gms.ads.identifier.service.START"), 0);
            if (queryIntentServices != null && queryIntentServices.size() > 0) {
                arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.toolbar_adfree, new ArrayList<Integer>() {
                    {
                        add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_disable_google_ads));
                        add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_blockads));
                        add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_unblockads));
                        add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_clearhosts));
                    }
                }, true));
            } else {
                arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.toolbar_adfree, new ArrayList<Integer>() {
                    {
                        add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_enable_google_ads));
                        add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_blockads));
                        add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_unblockads));
                        add(Integer.valueOf(ru.aaaaabbd.installer.R.string.context_clearhosts));
                    }
                }, true));
            }
        }
        arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.remove_all_saved_purchases, new ArrayList(), true));
        if (C3348.f9908) {
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.dirbinder, new ArrayList(), true));
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.corepatches, new ArrayList(), true));
            if (XposedUtils.isXposedEnabled()) {
                arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.xposed_settings, new ArrayList(), true));
            }
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.mod_market_check, new ArrayList(), true));
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.market_install, new ArrayList(), true));
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.odex_all_system_app, new ArrayList(), true));
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.removefixes, new ArrayList(), true));
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.cleardalvik, new ArrayList(), true));
        }
        if (C3348.f9972.booleanValue() && XposedUtils.isXposedEnabled()) {
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.xposed_settings, new ArrayList(), true));
        }
        if (C3348.f9924 < 19 || C3348.f9908) {
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.set_default_to_install, new ArrayList<Integer>() {
                {
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.set_default_to_install_auto));
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.set_default_to_install_internal_memory));
                    add(Integer.valueOf(ru.aaaaabbd.installer.R.string.set_default_to_install_sdcard));
                }
            }, true));
        }
        if (C3348.f9908) {
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.reboot_to_bootloader, new ArrayList(), true));
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.reboot_to_recovery, new ArrayList(), true));
            arrayList.add(new C3315(ru.aaaaabbd.installer.R.string.reboot, new ArrayList(), true));
        }
        try {
            if (C3348.f9960 == null) {
                C3348.f9960 = new C3316(this, C3348.m12333().getInt("viewsize", 0), new ArrayList());
            }
            C3316 c3316 = C3348.f9960;
            if (c3316 != null) {
                c3316.m12305(arrayList);
                C3348.f9870.m12471();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}