Luскy*Patcher v11.1.8版本的 MD5 值为:260a307cc4cd8550bbc248b8d7c0bddc
以下内容为反编译后的 SetPrefs.java 源代码,内容仅作参考
package ru.sxbuIDfx.pFSOyagrF;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Locale;
import net.lingala.zip4j.util.InternalZipConstants;
import p064.C2880;
import p112.C3313;
import p112.C3348;
import p113.C3923;
public class SetPrefs extends PreferenceActivity {
public Context context;
Preference.OnPreferenceChangeListener numberCheckListener = new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences = C3348.m12334().getSharedPreferences("config", 4);
if (preference == SetPrefs.this.findPreference("days_on_up") && SetPrefs.this.numberCheck(obj)) {
sharedPreferences.edit().putInt("days_on_up", Integer.valueOf(obj.toString()).intValue()).commit();
preference.getEditor().putString("days_on_up", obj.toString());
sharedPreferences.edit().putBoolean("settings_change", true).commit();
sharedPreferences.edit().putBoolean("lang_change", true).commit();
return true;
}
return false;
}
};
class AnonymousClass21 implements Preference.OnPreferenceChangeListener {
ProgressDialog progress = null;
AnonymousClass21() {
}
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
final SharedPreferences sharedPreferences = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("path") && obj.toString().contains(InternalZipConstants.ZIP_FILE_SEPARATOR) && !obj.toString().equals(InternalZipConstants.ZIP_FILE_SEPARATOR)) {
final String str = "";
for (String str2 : obj.toString().trim().replaceAll("\\s+", ".").split("\\/+")) {
if (!str2.equals("")) {
str = str + InternalZipConstants.ZIP_FILE_SEPARATOR + str2;
}
}
if (!new File(str).exists()) {
if (SetPrefs.this.testPath(true, str) && !str.startsWith(SetPrefs.this.getDir("sdcard", 0).getAbsolutePath())) {
sharedPreferences.edit().putString("path", str).commit();
sharedPreferences.edit().putBoolean("manual_path", true).commit();
preference.getEditor().putString("path", str).commit();
sharedPreferences.edit().putBoolean("path_changed", true).commit();
final File file = new File(sharedPreferences.getString("basepath", "Noting"));
final File file2 = new File(str);
if (!file.exists()) {
C3348.m12347("Directory does not exist.");
} else {
ProgressDialog progressDialog = new ProgressDialog(SetPrefs.this);
this.progress = progressDialog;
progressDialog.setCancelable(false);
this.progress.setMessage(SetPrefs.this.getString(ru.aaaaabbd.installer.R.string.wait));
this.progress.show();
final Handler handler = new Handler() {
@Override
public void handleMessage(Message message) {
C3348.m12347("LuckyPatcher: message poluchil: !" + message);
try {
if (AnonymousClass21.this.progress.isShowing()) {
AnonymousClass21.this.progress.dismiss();
}
} catch (Exception e) {
e.printStackTrace();
}
if (message.what == 0) {
sharedPreferences.edit().putString("basepath", str).commit();
C3348.f9876 = str;
SetPrefs setPrefs = SetPrefs.this;
setPrefs.showMessage(setPrefs, C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.move_data) + str);
}
if (message.what == 1) {
SetPrefs setPrefs2 = SetPrefs.this;
setPrefs2.showMessage(setPrefs2, C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.no_space));
}
}
};
new Thread(new Runnable() {
@Override
public void run() {
try {
C2880.m11295(file, file2, null);
new C2880("").m11605(file);
handler.sendEmptyMessage(0);
} catch (Exception e) {
e.printStackTrace();
handler.sendEmptyMessage(1);
}
}
}).start();
}
return true;
}
} else {
SetPrefs setPrefs = SetPrefs.this;
setPrefs.showMessage(setPrefs, C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.error_path_exists));
}
} else {
SetPrefs setPrefs2 = SetPrefs.this;
setPrefs2.showMessage(setPrefs2, C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.error_path));
}
return false;
}
}
class AnonymousClass26 implements Preference.OnPreferenceClickListener {
Dialog dialog6;
AnonymousClass26() {
}
@Override
public boolean onPreferenceClick(Preference preference) {
C3348.m12338();
SetPrefs.this.getAssets().getLocales();
ArrayList arrayList = new ArrayList();
arrayList.add("en_US");
arrayList.add("ar");
arrayList.add("bg");
arrayList.add("cs");
arrayList.add("da");
arrayList.add("de");
arrayList.add("el");
arrayList.add("es");
arrayList.add("fa");
arrayList.add("fi");
arrayList.add("fr");
arrayList.add("he");
arrayList.add("hi");
arrayList.add("hu");
arrayList.add("id");
arrayList.add("in");
arrayList.add("it");
arrayList.add("iw");
arrayList.add("ja");
arrayList.add("km");
arrayList.add("km_KH");
arrayList.add("ko");
arrayList.add("lt");
arrayList.add("ml");
arrayList.add("my");
arrayList.add("nl");
arrayList.add("pl");
arrayList.add("pt");
arrayList.add("pt_BR");
arrayList.add("ro");
arrayList.add("ru");
arrayList.add("sk");
arrayList.add("tr");
arrayList.add("ug");
arrayList.add("uk");
arrayList.add("vi");
arrayList.add("zh_CN");
arrayList.add("zh_HK");
arrayList.add("zh_TW");
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(SetPrefs.this.context, ru.aaaaabbd.installer.R.layout.contextmenu, arrayList) {
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
View view2 = super.getView(i, view, viewGroup);
TextView textView = (TextView) view2.findViewById(ru.aaaaabbd.installer.R.id.conttext);
textView.setTextColor(-1);
String str = (String) getItem(i);
Locale locale = new Locale(str, str);
textView.setText(locale.getDisplayName(locale));
if (str.equals("my")) {
textView.setText("Malay translation");
}
textView.setTypeface(null, 1);
return view2;
}
};
ListView listView = new ListView(SetPrefs.this.context);
AlertDialog.Builder builder = new AlertDialog.Builder(SetPrefs.this.context);
arrayAdapter.setNotifyOnChange(true);
listView.setAdapter((ListAdapter) arrayAdapter);
listView.invalidateViews();
listView.setCacheColorHint(-16777216);
listView.setBackgroundColor(-16777216);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
Locale locale;
if (AnonymousClass26.this.dialog6.isShowing()) {
AnonymousClass26.this.dialog6.dismiss();
}
SharedPreferences sharedPreferences = C3348.m12334().getSharedPreferences("config", 0);
String[] split = ((String) adapterView.getItemAtPosition(i)).split("_");
if (split.length == 1) {
locale = new Locale(split[0]);
} else {
locale = null;
}
if (split.length == 2) {
locale = new Locale(split[0], split[1], "");
if (split[1].equals("rBR")) {
locale = new Locale(split[0], "BR");
}
}
if (split.length == 3) {
locale = new Locale(split[0], split[1], split[2]);
}
Locale.setDefault(locale);
Configuration configuration = new Configuration();
configuration.locale = locale;
C3348.m12338().updateConfiguration(configuration, C3348.m12338().getDisplayMetrics());
sharedPreferences.edit().putString("force_language", (String) adapterView.getItemAtPosition(i)).commit();
Intent intent = SetPrefs.this.getIntent();
intent.addFlags(131072);
SetPrefs.this.finish();
SetPrefs.this.startActivity(intent);
sharedPreferences.edit().putBoolean("settings_change", true).commit();
sharedPreferences.edit().putBoolean("lang_change", true).commit();
}
});
builder.setView(listView);
AlertDialog create = builder.create();
this.dialog6 = create;
create.show();
return true;
}
}
public static void copyFolder(File file, File file2) throws IOException {
if (file.isDirectory()) {
file.renameTo(file2);
String[] list = file.list();
if (list != null) {
for (String str : list) {
copyFolder(new File(file, str), new File(file2, str));
}
return;
}
return;
}
file.renameTo(file2);
}
public boolean numberCheck(Object obj) {
if (!obj.toString().equals("") && obj.toString().matches("\\d*")) {
return true;
}
showMessage(this, C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.is_an_invalid_number));
return false;
}
public void showMessage(Context context, String str, String str2) {
final Dialog dialog = new Dialog(context);
dialog.setTitle(str);
dialog.setContentView(ru.aaaaabbd.installer.R.layout.message);
((TextView) dialog.findViewById(ru.aaaaabbd.installer.R.id.messageText)).setText(str2);
((Button) dialog.findViewById(ru.aaaaabbd.installer.R.id.buttonOk)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dialog.dismiss();
}
});
dialog.show();
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.context = this;
SharedPreferences sharedPreferences = C3348.m12334().getSharedPreferences("config", 0);
SharedPreferences sharedPreferences2 = C3348.m12334().getSharedPreferences("SetPrefs", 0);
SharedPreferences.Editor edit = C3348.m12334().getSharedPreferences("config", 0).edit();
edit.putBoolean("Update0", true);
edit.commit();
C2880.m11521(App.getInstance());
if (sharedPreferences.getInt("orientstion", 3) == 1) {
setRequestedOrientation(0);
}
if (sharedPreferences.getInt("orientstion", 3) == 2) {
setRequestedOrientation(1);
}
if (sharedPreferences.getInt("orientstion", 3) == 3) {
setRequestedOrientation(-1);
}
PreferenceManager preferenceManager = getPreferenceManager();
preferenceManager.setSharedPreferencesName("SetPrefs");
preferenceManager.setSharedPreferencesMode(0);
sharedPreferences2.edit().putString("viewsize", "" + sharedPreferences.getInt("viewsize", 0)).commit();
sharedPreferences2.edit().putString("root_force", "" + sharedPreferences.getInt("root_force", 0)).commit();
sharedPreferences2.edit().putBoolean("confirm_exit", sharedPreferences.getBoolean("confirm_exit", true)).commit();
sharedPreferences2.edit().putString("orientstion", "" + sharedPreferences.getInt("orientstion", 3)).commit();
sharedPreferences2.edit().putString("sortby", "" + sharedPreferences.getInt("sortby", 2)).commit();
sharedPreferences2.edit().putString("language", "" + sharedPreferences.getInt("language", 1)).commit();
sharedPreferences2.edit().putBoolean("systemapp", sharedPreferences.getBoolean("systemapp", true)).commit();
sharedPreferences2.edit().putString("apkname", "" + sharedPreferences.getInt("apkname", 0)).commit();
sharedPreferences2.edit().putBoolean("lvlapp", sharedPreferences.getBoolean("lvlapp", true)).commit();
sharedPreferences2.edit().putBoolean("adsapp", sharedPreferences.getBoolean("adsapp", true)).commit();
sharedPreferences2.edit().putBoolean("customapp", sharedPreferences.getBoolean("customapp", true)).commit();
sharedPreferences2.edit().putBoolean("modifapp", sharedPreferences.getBoolean("modifapp", true)).commit();
sharedPreferences2.edit().putBoolean("hide_notify", sharedPreferences.getBoolean("hide_notify", false)).commit();
sharedPreferences2.edit().putBoolean("fixedapp", sharedPreferences.getBoolean("fixedapp", true)).commit();
sharedPreferences2.edit().putBoolean("noneapp", sharedPreferences.getBoolean("noneapp", true)).commit();
sharedPreferences2.edit().putString("path", sharedPreferences.getString("basepath", "Noting")).commit();
sharedPreferences2.edit().putString("extStorageDirectory", sharedPreferences.getString("extStorageDirectory", "Noting")).commit();
sharedPreferences2.edit().putBoolean("vibration", sharedPreferences.getBoolean("vibration", false)).commit();
sharedPreferences2.edit().putBoolean("disable_autoupdate", sharedPreferences.getBoolean("disable_autoupdate", false)).commit();
sharedPreferences2.edit().putBoolean("fast_start", sharedPreferences.getBoolean("fast_start", false)).commit();
sharedPreferences2.edit().putBoolean("no_icon", sharedPreferences.getBoolean("no_icon", false)).commit();
sharedPreferences2.edit().putBoolean("hide_title", sharedPreferences.getBoolean("hide_title", false)).commit();
sharedPreferences2.edit().putString("days_on_up", "" + sharedPreferences.getInt("days_on_up", 1)).commit();
addPreferencesFromResource(ru.aaaaabbd.installer.R.xml.preferences);
getPreferenceScreen().findPreference("days_on_up").setOnPreferenceChangeListener(this.numberCheckListener);
findPreference("viewsize").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("viewsize") && obj.equals("2")) {
sharedPreferences3.edit().putInt("viewsize", 2).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference == SetPrefs.this.findPreference("viewsize") && obj.equals("1")) {
sharedPreferences3.edit().putInt("viewsize", 1).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("viewsize") || !obj.equals("0")) {
return false;
}
sharedPreferences3.edit().putInt("viewsize", 0).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
});
findPreference("root_force").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("root_force") && obj.equals("2")) {
C3348.f9908 = false;
sharedPreferences3.edit().putInt("root_force", 2).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference == SetPrefs.this.findPreference("root_force") && obj.equals("1")) {
C3348.f9908 = true;
sharedPreferences3.edit().putInt("root_force", 1).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("root_force") || !obj.equals("0")) {
return false;
}
sharedPreferences3.edit().putInt("root_force", 0).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
});
findPreference("orientstion").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("orientstion") && obj.equals("2")) {
sharedPreferences3.edit().putInt("orientstion", 3).commit();
SetPrefs.this.setRequestedOrientation(1);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference == SetPrefs.this.findPreference("orientstion") && obj.equals("1")) {
sharedPreferences3.edit().putInt("orientstion", 1).commit();
SetPrefs.this.setRequestedOrientation(0);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("orientstion") || !obj.equals("3")) {
return false;
}
sharedPreferences3.edit().putInt("orientstion", 3).commit();
SetPrefs.this.setRequestedOrientation(-1);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
});
findPreference("sortby").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("sortby") && obj.equals("1")) {
sharedPreferences3.edit().putInt("sortby", 1).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference == SetPrefs.this.findPreference("sortby") && obj.equals("3")) {
sharedPreferences3.edit().putInt("sortby", 3).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("sortby") || !obj.equals("2")) {
return false;
}
sharedPreferences3.edit().putInt("sortby", 2).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
});
findPreference("language").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("language") && obj.equals("1")) {
Locale locale = Resources.getSystem().getConfiguration().locale;
Locale.setDefault(Locale.getDefault());
Configuration configuration = new Configuration();
configuration.locale = locale;
C3348.m12338().updateConfiguration(configuration, C3348.m12338().getDisplayMetrics());
sharedPreferences3.edit().putInt("language", 1).commit();
Intent intent = SetPrefs.this.getIntent();
intent.addFlags(131072);
SetPrefs.this.finish();
SetPrefs.this.startActivity(intent);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("language") || !obj.equals("2")) {
return false;
}
Locale locale2 = new Locale("en");
Locale.setDefault(locale2);
Configuration configuration2 = new Configuration();
configuration2.locale = locale2;
C3348.m12338().updateConfiguration(configuration2, C3348.m12338().getDisplayMetrics());
sharedPreferences3.edit().putInt("language", 2).commit();
Intent intent2 = SetPrefs.this.getIntent();
intent2.addFlags(131072);
SetPrefs.this.finish();
SetPrefs.this.startActivity(intent2);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
});
findPreference("systemapp").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("systemapp") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("systemapp", true).commit();
preference.getEditor().putBoolean("systemapp", true);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("systemapp") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("systemapp", false).commit();
preference.getEditor().putBoolean("systemapp", false);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
});
findPreference("confirm_exit").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("confirm_exit") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("confirm_exit", true).commit();
preference.getEditor().putBoolean("confirm_exit", true);
return true;
}
if (preference != SetPrefs.this.findPreference("confirm_exit") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("confirm_exit", false).commit();
preference.getEditor().putBoolean("confirm_exit", false);
return true;
}
});
findPreference("apkname").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("apkname") && obj.equals("0")) {
sharedPreferences3.edit().putInt("apkname", 0).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("apkname") || !obj.equals("1")) {
return false;
}
sharedPreferences3.edit().putInt("apkname", 1).commit();
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
return true;
}
});
findPreference("lvlapp").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("lvlapp") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("lvlapp", true).commit();
preference.getEditor().putBoolean("lvlapp", true);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("lvlapp") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("lvlapp", false).commit();
preference.getEditor().putBoolean("lvlapp", false);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
});
findPreference("adsapp").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("adsapp") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("adsapp", true).commit();
preference.getEditor().putBoolean("adsapp", true);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("adsapp") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("adsapp", false).commit();
preference.getEditor().putBoolean("adsapp", false);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
});
findPreference("customapp").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("customapp") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("customapp", true).commit();
preference.getEditor().putBoolean("customapp", true);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("customapp") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("customapp", false).commit();
preference.getEditor().putBoolean("customapp", false);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
});
findPreference("modifapp").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("modifapp") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("modifapp", true).commit();
preference.getEditor().putBoolean("modifapp", true);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("modifapp") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("modifapp", false).commit();
preference.getEditor().putBoolean("modifapp", false);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
});
findPreference("fixedapp").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("fixedapp") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("fixedapp", true).commit();
preference.getEditor().putBoolean("fixedapp", true);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("fixedapp") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("fixedapp", false).commit();
preference.getEditor().putBoolean("fixedapp", false);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
});
findPreference("noneapp").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("noneapp") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("noneapp", true).commit();
preference.getEditor().putBoolean("noneapp", true);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
if (preference != SetPrefs.this.findPreference("noneapp") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("noneapp", false).commit();
preference.getEditor().putBoolean("noneapp", false);
sharedPreferences3.edit().putBoolean("settings_change", true).commit();
sharedPreferences3.edit().putBoolean("lang_change", true).commit();
return true;
}
});
findPreference("hide_notify").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("hide_notify") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("hide_notify", true).commit();
preference.getEditor().putBoolean("hide_notify", true);
return true;
}
if (preference != SetPrefs.this.findPreference("hide_notify") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("hide_notify", false).commit();
preference.getEditor().putBoolean("hide_notify", false);
return true;
}
});
findPreference("vibration").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("vibration") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("vibration", true).commit();
preference.getEditor().putBoolean("vibration", true);
return true;
}
if (preference != SetPrefs.this.findPreference("vibration") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("vibration", false).commit();
preference.getEditor().putBoolean("vibration", false);
return true;
}
});
findPreference("disable_autoupdate").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("disable_autoupdate") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("disable_autoupdate", true).commit();
preference.getEditor().putBoolean("disable_autoupdate", true);
return true;
}
if (preference != SetPrefs.this.findPreference("disable_autoupdate") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("disable_autoupdate", false).commit();
preference.getEditor().putBoolean("disable_autoupdate", false);
return true;
}
});
findPreference("fast_start").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("fast_start") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("fast_start", true).commit();
preference.getEditor().putBoolean("fast_start", true);
return true;
}
if (preference != SetPrefs.this.findPreference("fast_start") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("fast_start", false).commit();
preference.getEditor().putBoolean("fast_start", false);
return true;
}
});
findPreference("no_icon").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("no_icon") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("no_icon", true).commit();
preference.getEditor().putBoolean("no_icon", true);
return true;
}
if (preference != SetPrefs.this.findPreference("no_icon") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("no_icon", false).commit();
preference.getEditor().putBoolean("no_icon", false);
return true;
}
});
findPreference("hide_title").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object obj) {
SharedPreferences sharedPreferences3 = C3348.m12334().getSharedPreferences("config", 0);
if (preference == SetPrefs.this.findPreference("hide_title") && ((Boolean) obj).booleanValue()) {
sharedPreferences3.edit().putBoolean("hide_title", true).commit();
preference.getEditor().putBoolean("hide_title", true);
return true;
}
if (preference != SetPrefs.this.findPreference("hide_title") || ((Boolean) obj).booleanValue()) {
return false;
}
sharedPreferences3.edit().putBoolean("hide_title", false).commit();
preference.getEditor().putBoolean("hide_title", false);
return true;
}
});
findPreference("path").setOnPreferenceChangeListener(new AnonymousClass21());
findPreference("help").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
C3923.m12593();
return true;
}
});
findPreference("upd").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
C3348 c3348 = C3348.f9870;
if (c3348 != null) {
c3348.m12456();
}
SetPrefs.this.finish();
return true;
}
});
findPreference("sendlog").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
new AsyncTask<Void, Void, Boolean>() {
ProgressDialog pd;
@Override
protected void onPreExecute() {
ProgressDialog progressDialog = new ProgressDialog(SetPrefs.this.context);
this.pd = progressDialog;
progressDialog.setTitle("Progress");
this.pd.setMessage(C2880.m11423(ru.aaaaabbd.installer.R.string.collect_logs));
this.pd.setIndeterminate(true);
this.pd.show();
}
@Override
public Boolean doInBackground(Void... voidArr) {
try {
if (C3348.f9912 == null) {
C3348.f9912 = new C3313();
}
return Boolean.valueOf(C3348.f9912.m12302(C3348.m12334(), true));
} catch (Exception e) {
e.printStackTrace();
return Boolean.FALSE;
}
}
@Override
public void onPostExecute(Boolean bool) {
try {
ProgressDialog progressDialog = this.pd;
if (progressDialog != null && progressDialog.isShowing()) {
this.pd.dismiss();
}
} catch (Exception e) {
e.printStackTrace();
}
if (bool.booleanValue()) {
C3348.f9912.m12303(C3348.m12334(), "lp.chelpus@gmail.com", "Error Log " + C3348.f9898, "Lucky Patcher " + C2880.m11391(C3348.f9870.mo2480().getPackageName()));
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder(SetPrefs.this.context);
builder.setTitle("Error").setMessage(C2880.m11423(ru.aaaaabbd.installer.R.string.error_collect_logs)).setNegativeButton("OK", (DialogInterface.OnClickListener) null);
builder.create().show();
}
}.execute(new Void[0]);
return true;
}
});
findPreference("about").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
LinearLayout linearLayout = (LinearLayout) View.inflate(SetPrefs.this.context, ru.aaaaabbd.installer.R.layout.aboutdialog, null);
LinearLayout linearLayout2 = (LinearLayout) linearLayout.findViewById(ru.aaaaabbd.installer.R.id.dialogbodyscroll).findViewById(ru.aaaaabbd.installer.R.id.dialogbody);
String str = C2880.m11423(ru.aaaaabbd.installer.R.string.vers) + C3348.f9898 + "\n";
TextView textView = (TextView) linearLayout2.findViewById(ru.aaaaabbd.installer.R.id.intonlydesc);
textView.append(C2880.m11350(str, "#ffffffff", "bold"));
textView.append(C2880.m11350("----------------------------------\n\n", "#ffffffff", "bold"));
textView.append(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.about_working_dir) + " " + C3348.f9876 + "\n\n", "#ffffffff", "bold"));
StringBuilder sb = new StringBuilder();
sb.append(C2880.m11423(ru.aaaaabbd.installer.R.string.punkt1));
sb.append("\n\n");
textView.append(C2880.m11350(sb.toString(), "#ffff0000", "bold"));
textView.append(C2880.m11350(C2880.m11423(ru.aaaaabbd.installer.R.string.aboutlp) + "\n", "#ffffff00", "bold"));
new AlertDialog.Builder(SetPrefs.this.context).setTitle(ru.aaaaabbd.installer.R.string.abouttitle).setCancelable(true).setIcon(android.R.drawable.ic_dialog_info).setPositiveButton(C2880.m11423(ru.aaaaabbd.installer.R.string.ok), (DialogInterface.OnClickListener) null).setNeutralButton("Changelog", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (new File(C3348.f9876 + "/Changes/changelog.txt").exists()) {
SetPrefs setPrefs = SetPrefs.this;
setPrefs.showMessage(setPrefs.context, C2880.m11423(ru.aaaaabbd.installer.R.string.changelog), C2880.m11486(new File(C3348.f9876 + "/Changes/changelog.txt")));
return;
}
SetPrefs setPrefs2 = SetPrefs.this;
setPrefs2.showMessage(setPrefs2.context, C2880.m11423(ru.aaaaabbd.installer.R.string.changelog), C2880.m11423(ru.aaaaabbd.installer.R.string.not_found_changelog));
}
}).setView(linearLayout).setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialogInterface) {
dialogInterface.dismiss();
}
}).create().show();
return true;
}
});
findPreference("language").setOnPreferenceClickListener(new AnonymousClass26());
}
public boolean testPath(boolean z, String str) {
C3348.m12347("test path.");
try {
if (!new File(str).exists()) {
new File(str).mkdirs();
}
if (!new File(str).exists()) {
showMessage(this, C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.messagePath));
return false;
}
if (new File(str + "/tmp.txt").createNewFile()) {
new File(str + "/tmp.txt").delete();
return true;
}
if (z) {
showMessage(this, C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.messagePath));
}
return false;
} catch (IOException unused) {
if (z) {
showMessage(this, C2880.m11423(ru.aaaaabbd.installer.R.string.warning), C2880.m11423(ru.aaaaabbd.installer.R.string.messagePath));
}
return false;
}
}
}