MD5 校验值:47dc1c492bf2859d50823a0fe72087d7
PreferencesActivity.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.musicplayer.player.mp3player.white.start; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.preference.ListPreference; import android.preference.PreferenceActivity; import android.preference.PreferenceFragment; import android.preference.PreferenceManager; import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; import c.f.a.a.a.i; import c.f.a.a.a.i.v; import c.f.a.a.a.n.C0115ad; import c.f.a.a.a.n.C0120bd; import c.f.a.a.a.n.C0125cd; import c.f.a.a.a.n.Zc; import c.f.a.a.a.n._c; import c.f.a.a.a.n.dd; import c.f.a.a.a.n.ed; import c.f.a.a.a.n.fd; import c.f.a.a.a.n.gd; import c.f.a.a.a.n.hd; import c.f.a.a.a.n.id; import c.f.a.a.a.n.jd; import c.f.a.a.a.n.kd; import c.f.a.a.a.n.ld; import com.musicplayer.player.mp3player.white.R; import com.musicplayer.player.mp3player.white.colorpick.ColorPickerPreference; import java.util.ArrayList; import java.util.Iterator; public class PreferencesActivity extends PreferenceActivity { public static class a extends PreferenceFragment { public boolean f4113a = false; public SharedPreferences f4114b; @Override public void onCreate(Bundle bundle) { super.onCreate(bundle); this.f4114b = PreferenceManager.getDefaultSharedPreferences(getActivity()); this.f4113a = this.f4114b.getBoolean("key_blk_thme", false); addPreferencesFromResource(R.xml.preferences); ((ColorPickerPreference) findPreference(getResources().getString(R.string.key_primarycolor))).setOnPreferenceChangeListener(new ed(this)); ((ColorPickerPreference) findPreference(getResources().getString(R.string.key_secondarycolor))).setOnPreferenceChangeListener(new fd(this)); findPreference(getResources().getString(R.string.key_license)).setOnPreferenceClickListener(new gd(this)); findPreference(getResources().getString(R.string.key_follow)).setOnPreferenceClickListener(new hd(this)); findPreference(getResources().getString(R.string.key_pur)).setOnPreferenceClickListener(new id(this)); findPreference(getResources().getString(R.string.key_lib_order)).setOnPreferenceClickListener(new jd(this)); findPreference(getResources().getString(R.string.key_privacypolicy)).setOnPreferenceClickListener(new kd(this)); PreferencesActivity.a(getActivity(), (ListPreference) findPreference(getResources().getString(R.string.key_def_prefs))); findPreference(getResources().getString(R.string.key_scanlib)).setOnPreferenceClickListener(new ld(this)); } @Override public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View onCreateView = super.onCreateView(layoutInflater, viewGroup, bundle); if (this.f4113a) { onCreateView.setBackgroundColor(ContextCompat.getColor(getActivity(), android.R.color.black)); } else { onCreateView.setBackgroundColor(ContextCompat.getColor(getActivity(), android.R.color.white)); } return onCreateView; } } public static void a(Context context, ListPreference listPreference) { if (listPreference != null) { ArrayList<v> a2 = i.a(context.getContentResolver()); int i = 0; if (a2 == null) { listPreference.setEntries(new String[0]); listPreference.setEntryValues(new String[0]); return; } if (a2.size() < 1) { listPreference.setEntries(new String[0]); listPreference.setEntryValues(new String[0]); return; } String[] strArr = new String[a2.size()]; String[] strArr2 = new String[a2.size()]; Iterator<v> it = a2.iterator(); while (it.hasNext()) { v next = it.next(); strArr[i] = next.f955b; strArr2[i] = next.f955b; i++; } listPreference.setEntries(strArr); listPreference.setEntryValues(strArr2); listPreference.setSummary(listPreference.getValue()); } } public static void b(Context context) { try { context.getPackageManager().getPackageInfo("com.facebook.katana", 0); context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("fb://page/650024375178073"))); } catch (Exception unused) { context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://www.facebook.com/mytechnosoundmusicplayer"))); } } public static void d(Context context) { try { Intent intent = new Intent("android.intent.action.VIEW", a.a.a.a.b("uplayer.video.player")); if (a.a.a.a.a(context, "com.android.vending")) { intent.setPackage("com.android.vending"); } context.startActivity(intent); } catch (Exception e2) { e2.printStackTrace(); } } @Override public void attachBaseContext(Context context) { super.attachBaseContext(context); } @Override public void onCreate(Bundle bundle) { super.onCreate(bundle); addPreferencesFromResource(R.xml.preferences); findPreference(getResources().getString(R.string.key_license)).setOnPreferenceClickListener(new Zc(this)); findPreference(getResources().getString(R.string.key_follow)).setOnPreferenceClickListener(new _c(this)); findPreference(getResources().getString(R.string.key_pur)).setOnPreferenceClickListener(new C0115ad(this)); findPreference(getResources().getString(R.string.key_privacypolicy)).setOnPreferenceClickListener(new C0120bd(this)); findPreference(getResources().getString(R.string.key_videoplayer)).setOnPreferenceClickListener(new C0125cd(this)); a(this, (ListPreference) findPreference(getResources().getString(R.string.key_def_prefs))); getPreferenceScreen().removePreference(findPreference(getResources().getString(R.string.key_lib_order))); findPreference(getResources().getString(R.string.key_scanlib)).setOnPreferenceClickListener(new dd(this)); } public static AlertDialog a(Context context) { WebView webView = new WebView(context); webView.loadUrl("file:///android_asset/licenses.html"); return new AlertDialog.Builder(context).setTitle(R.string.license).setView(webView).setPositiveButton(android.R.string.ok, (DialogInterface.OnClickListener) null).create(); } }