MD5 校验值:5b5c91fb96bf669521c42e375c79f86c
gz0.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package o; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.res.Configuration; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.util.Log; import android.util.SparseBooleanArray; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; import android.widget.Toast; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.StaggeredGridLayoutManager; import candybar.lib.R; import com.afollestad.materialdialogs.c; import com.android.billingclient.api.Purchase; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.pluscubed.recyclerfastscroll.RecyclerFastScroller; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import me.zhanghai.android.materialprogressbar.BuildConfig; import o.gz0; import o.he; import o.kz0; import o.pp1; import o.uy0; import org.json.JSONObject; public class gz0 extends Fragment implements View.OnClickListener { public static List k0; public RecyclerView b0; public FloatingActionButton c0; public RecyclerFastScroller d0; public ProgressBar e0; public MenuItem f0; public az0 g0; public StaggeredGridLayoutManager h0; public w7 i0; public boolean j0 = false; public class a extends HashMap { public a() { put("section", "icon_request"); } } public class b extends w7 { public com.afollestad.materialdialogs.c e; public boolean f = true; public String g; public b() { } public void p(com.afollestad.materialdialogs.c cVar, gr grVar) { Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(this.g)); intent.addFlags(4194304); gz0.this.x1().startActivity(intent); } @Override public void citrus() { } @Override public void k(boolean z) { this.e.dismiss(); a aVar = null; this.e = null; if (z) { if (!this.f) { new c.d(gz0.this.x1()).z(si1.b(gz0.this.x1()), si1.c(gz0.this.x1())).e(R.string.request_app_disabled).m(R.string.close).s(R.string.update).p(new c.g() { @Override public final void a(com.afollestad.materialdialogs.c cVar, gr grVar) { gz0.b.this.p(cVar, grVar); } @Override public void citrus() { } }).b(false).c(false).a().show(); gz0.this.g0.P(); if (gz0.this.f0 != null) { gz0.this.f0.setIcon(R.drawable.ic_toolbar_select_all); return; } return; } gz0 gz0Var = gz0.this; gz0Var.i0 = new d(gz0Var, aVar).g(); return; } new c.d(gz0.this.x1()).z(si1.b(gz0.this.x1()), si1.c(gz0.this.x1())).e(R.string.unable_to_load_config).c(false).s(R.string.close).a().show(); } @Override public void l() { com.afollestad.materialdialogs.c a = new c.d(gz0.this.x1()).z(si1.b(gz0.this.x1()), si1.c(gz0.this.x1())).e(R.string.request_fetching_data).b(false).c(false).u(true, 0).v(true).a(); this.e = a; a.show(); } @Override public boolean m() { BufferedReader bufferedReader; long j; if (!h()) { BufferedReader bufferedReader2 = null; try { try { bufferedReader = new BufferedReader(new InputStreamReader(new URL(he.b().g().a(gz0.this.x1())).openConnection().getInputStream())); } catch (Throwable th) { th = th; } } catch (Exception e) { e = e; } try { StringBuilder sb = new StringBuilder(); while (true) { String readLine = bufferedReader.readLine(); if (readLine == null) { break; } sb.append(readLine); } PackageInfo packageInfo = gz0.this.x1().getPackageManager().getPackageInfo(gz0.this.x1().getPackageName(), 0); JSONObject jSONObject = new JSONObject(sb.toString()); if (jSONObject.isNull("url")) { this.g = "https://play.google.com/store/apps/details?id=" + packageInfo.packageName; } else { this.g = jSONObject.getString("url"); } JSONObject jSONObject2 = jSONObject.getJSONObject("disableRequest"); long optLong = jSONObject2.optLong("below", 0L); String optString = jSONObject2.optString("on", BuildConfig.FLAVOR); if (Build.VERSION.SDK_INT >= 28) { j = packageInfo.getLongVersionCode(); } else { j = packageInfo.versionCode; } if (j >= optLong) { } this.f = false; try { bufferedReader.close(); } catch (IOException e2) { xh0.b(Log.getStackTraceString(e2)); } return true; } catch (Exception e3) { e = e3; bufferedReader2 = bufferedReader; xh0.b("Error loading Configuration JSON " + Log.getStackTraceString(e)); if (bufferedReader2 != null) { try { bufferedReader2.close(); } catch (IOException e4) { xh0.b(Log.getStackTraceString(e4)); } } return false; } catch (Throwable th2) { th = th2; bufferedReader2 = bufferedReader; if (bufferedReader2 != null) { try { bufferedReader2.close(); } catch (IOException e5) { xh0.b(Log.getStackTraceString(e5)); } } throw th; } } return false; } } public class c extends w7 { public List e; public c() { } @Override public void citrus() { } @Override public void k(boolean z) { if (gz0.this.n() != null && !gz0.this.n().isFinishing()) { gz0.this.i0 = null; gz0.this.e0.setVisibility(8); if (z) { gz0.this.J1(true); gz0 gz0Var = gz0.this; gz0Var.g0 = new az0(gz0Var.n(), this.e, gz0.this.h0.x2()); gz0.this.b0.setAdapter(gz0.this.g0); com.danimahardhika.android.helpers.animation.a.o(gz0.this.c0).h(new gg0()).i(); if (gz0.this.n().getResources().getBoolean(R.bool.show_intro)) { hc1.m(gz0.this.n(), gz0.this.b0); return; } return; } gz0.this.b0.setAdapter(null); Toast.makeText(gz0.this.n(), R.string.request_appfilter_failed, 1).show(); } } @Override public void l() { if (ef.P == null) { gz0.this.e0.setVisibility(0); } } @Override public boolean m() { if (!h()) { try { Thread.sleep(1L); if (ef.P == null) { ef.P = kz0.g(gz0.this.x1()); } this.e = ef.P; return true; } catch (Exception e) { xh0.b(Log.getStackTraceString(e)); } } return false; } public c(gz0 gz0Var, a aVar) { this(); } } public class d extends w7 { public com.afollestad.materialdialogs.c e; public boolean f; public String g; public boolean h; public boolean i; public String j; public d() { } @Override public void citrus() { } @Override public void k(boolean z) { int i; int i2; if (gz0.this.n() == null || gz0.this.n().isFinishing()) { return; } this.e.dismiss(); gz0.this.i0 = null; this.e = null; if (z) { boolean z2 = this.f; if (!z2 && !this.h) { va0.u2(gz0.this.n().P(), 0); } else { if (z2) { i2 = R.string.request_pacific_success; } else { i2 = R.string.request_custom_success; } Toast.makeText(gz0.this.n(), i2, 1).show(); ((nz0) gz0.this.n()).g(null, 0); } gz0.this.g0.P(); if (gz0.this.f0 != null) { gz0.this.f0.setIcon(R.drawable.ic_toolbar_select_all); return; } return; } boolean z3 = this.f; if (!z3 && !this.h) { if (gz0.this.j0) { Toast.makeText(gz0.this.n(), R.string.no_email_app, 1).show(); return; } else { Toast.makeText(gz0.this.n(), R.string.request_build_failed, 1).show(); return; } } if (z3) { i = R.string.request_pacific_error; } else { i = R.string.request_custom_error; } new c.d(gz0.this.n()).z(si1.b(gz0.this.n()), si1.c(gz0.this.n())).g(i, "\"" + this.j + "\"").b(true).c(false).s(R.string.close).a().show(); } @Override public void l() { if (ju0.b(gz0.this.x1()).A()) { this.i = true; this.h = kz0.k(gz0.this.x1()); this.f = kz0.l(gz0.this.x1()); this.g = kz0.h(gz0.this.x1()); } else { this.i = false; this.h = kz0.n(gz0.this.x1()); this.f = kz0.o(gz0.this.x1()); this.g = kz0.i(gz0.this.x1()); } com.afollestad.materialdialogs.c a = new c.d(gz0.this.x1()).z(si1.b(gz0.this.x1()), si1.c(gz0.this.x1())).e(R.string.request_building).b(false).c(false).u(true, 0).v(true).a(); this.e = a; a.show(); } @Override public boolean m() { Intent intent; String d; if (!h()) { try { Thread.sleep(2L); gz0.k0 = gz0.this.g0.J(); List<uy0> I = gz0.this.g0.I(); File cacheDir = gz0.this.x1().getCacheDir(); ArrayList arrayList = new ArrayList(); for (uy0 uy0Var : I) { Drawable c = ys.c(gz0.this.x1(), uy0Var.b()); if (this.f) { d = uy0Var.f(); } else { d = kz0.d(uy0Var.d()); } String h = r70.h(arrayList, cacheDir, c, d); if (h != null) { arrayList.add(h); } if (this.h) { uy0Var.l(ys.d(c)); } } if (this.f) { String q = kz0.q(I, arrayList, cacheDir, this.g); this.j = q; if (q == null) { Iterator it = I.iterator(); while (it.hasNext()) { xo.H(gz0.this.x1()).d(null, (uy0) it.next()); } } return this.j == null; } if (this.h) { String p = kz0.p(I, this.i); this.j = p; if (p == null) { Iterator it2 = I.iterator(); while (it2.hasNext()) { xo.H(gz0.this.x1()).d(null, (uy0) it2.next()); } } return this.j == null; } if (!gz0.this.R().getBoolean(R.bool.enable_non_mail_app_request)) { intent = new Intent("android.intent.action.SENDTO"); intent.setData(Uri.parse("mailto:")); } else { intent = new Intent("android.intent.action.SEND"); intent.setType("application/zip"); } if (gz0.this.x1().getPackageManager().queryIntentActivities(intent, 0).size() == 0) { gz0.this.j0 = true; return false; } if (ju0.b(gz0.this.x1()).A()) { final AtomicBoolean atomicBoolean = new AtomicBoolean(false); final CountDownLatch countDownLatch = new CountDownLatch(1); c90.g(gz0.this.x1()).h().g(c90.d, new ww0() { @Override public final void a(com.android.billingclient.api.a aVar, List list) { gz0.d.this.p(atomicBoolean, countDownLatch, aVar, list); } @Override public void citrus() { } }); countDownLatch.await(); if (!atomicBoolean.get()) { return false; } } File b = kz0.b(gz0.this.x1(), I, kz0.e.APPFILTER); File b2 = kz0.b(gz0.this.x1(), I, kz0.e.APPMAP); File b3 = kz0.b(gz0.this.x1(), I, kz0.e.THEME_RESOURCES); if (b != null) { arrayList.add(b.toString()); } if (b2 != null) { arrayList.add(b2.toString()); } if (b3 != null) { arrayList.add(b3.toString()); } he.e = gz.b(arrayList, new File(cacheDir.toString(), kz0.f("icon_request.zip"))); return true; } catch (InterruptedException e) { e = e; xh0.b(Log.getStackTraceString(e)); return false; } catch (RuntimeException e2) { e = e2; xh0.b(Log.getStackTraceString(e)); return false; } } return false; } public final void p(AtomicBoolean atomicBoolean, CountDownLatch countDownLatch, com.android.billingclient.api.a aVar, List list) { if (aVar.b() == 0) { String j = ju0.b(gz0.this.x1()).j(); Iterator it = list.iterator(); while (true) { if (!it.hasNext()) { break; } Purchase purchase = (Purchase) it.next(); if (purchase.c().contains(j)) { he.d = new uy0.c(null, purchase.a(), j); atomicBoolean.set(true); break; } xh0.b("Unable to find premiumRequestProductId in the Products"); } } else { xh0.b("Failed to load purchase data. Response Code: " + aVar.b()); } countDownLatch.countDown(); } public d(gz0 gz0Var, a aVar) { this(); } } public static pp1 f2(View view, pp1 pp1Var) { ((ViewGroup.MarginLayoutParams) view.getLayoutParams()).bottomMargin = pp1Var.f(pp1.m.d()).d + 50; return pp1.b; } private void i2(int i) { int dimensionPixelSize; if (this.b0 == null) { return; } if (R().getBoolean(com.danimahardhika.android.helpers.core.R.bool.android_helpers_tablet_mode) || i == 2) { dimensionPixelSize = x1().getResources().getDimensionPixelSize(R.dimen.content_padding); if (he.b().r() == he.h.PORTRAIT_FLAT_LANDSCAPE_FLAT) { dimensionPixelSize = x1().getResources().getDimensionPixelSize(R.dimen.card_margin); } } else { dimensionPixelSize = 0; } this.b0.setPadding(dimensionPixelSize, dimensionPixelSize, 0, x1().getResources().getDimensionPixelSize(R.dimen.fab_size) + (x1().getResources().getDimensionPixelSize(R.dimen.fab_margin_global) * 2)); } @Override public void A0() { w7 w7Var = this.i0; if (w7Var != null) { w7Var.c(true); } super.A0(); } @Override public boolean J0(MenuItem menuItem) { if (menuItem.getItemId() == R.id.menu_select_all) { this.f0 = menuItem; az0 az0Var = this.g0; if (az0Var == null) { return false; } if (az0Var.Q()) { menuItem.setIcon(R.drawable.ic_toolbar_select_all_selected); return true; } menuItem.setIcon(R.drawable.ic_toolbar_select_all); return true; } return super.J0(menuItem); } @Override public void U0(View view, Bundle bundle) { super.U0(view, bundle); he.b().d().b("view", new a()); J1(false); i2(R().getConfiguration().orientation); Drawable indeterminateDrawable = this.e0.getIndeterminateDrawable(); int a2 = com.danimahardhika.android.helpers.core.a.a(n(), com.google.android.material.R.attr.colorSecondary); PorterDuff.Mode mode = PorterDuff.Mode.SRC_IN; indeterminateDrawable.setColorFilter(a2, mode); int c2 = com.danimahardhika.android.helpers.core.a.c(com.danimahardhika.android.helpers.core.a.a(n(), com.google.android.material.R.attr.colorSecondary)); a aVar = null; Drawable e = n01.e(x1().getResources(), R.drawable.ic_fab_send, null); e.mutate().setColorFilter(c2, mode); this.c0.setImageDrawable(e); this.c0.setOnClickListener(this); if (!ju0.b(x1()).u()) { this.c0.setCompatElevation(0.0f); } androidx.recyclerview.widget.c cVar = new androidx.recyclerview.widget.c(); cVar.v(0L); this.b0.setItemAnimator(cVar); StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(x1().getResources().getInteger(R.integer.request_column_count), 1); this.h0 = staggeredGridLayoutManager; this.b0.setLayoutManager(staggeredGridLayoutManager); hm1.c(this.d0); this.d0.c(this.b0); this.i0 = new c(this, aVar).d(); } @Override public void citrus() { } public void g2() { if (this.i0 != null) { return; } this.i0 = new d(this, null).g(); } public void h2() { az0 az0Var = this.g0; if (az0Var == null) { k0 = null; return; } List list = k0; if (list == null) { az0Var.m(0); return; } Iterator it = list.iterator(); while (it.hasNext()) { this.g0.R(((Integer) it.next()).intValue(), true); } this.g0.l(); k0 = null; } @Override public void onClick(View view) { az0 az0Var; if (view.getId() != R.id.fab || (az0Var = this.g0) == null) { return; } int L = az0Var.L(); if (L > 0) { boolean z = R().getBoolean(R.bool.enable_icon_request_limit); boolean z2 = R().getBoolean(R.bool.enable_icon_request); boolean z3 = R().getBoolean(R.bool.enable_premium_request); if (ju0.b(x1()).A()) { if (L > ju0.b(x1()).i()) { kz0.u(x1(), L); return; } else { if (!kz0.m(x1())) { return; } try { ((h90) x1()).n(); return; } catch (Exception unused) { return; } } } if (!z2 && z3) { kz0.v(x1()); return; } if (z && L > x1().getResources().getInteger(R.integer.icon_request_limit) - ju0.b(x1()).l()) { kz0.r(x1()); return; } else if (x1().getResources().getBoolean(R.bool.json_check_before_request) && he.b().g().a(x1()).length() != 0) { this.i0 = new b().g(); return; } else { this.i0 = new d(this, null).g(); return; } } Toast.makeText(n(), R.string.request_not_selected, 1).show(); } @Override public void onConfigurationChanged(Configuration configuration) { super.onConfigurationChanged(configuration); i2(configuration.orientation); if (this.i0 != null) { return; } int[] m2 = this.h0.m2(null); SparseBooleanArray K = this.g0.K(); com.danimahardhika.android.helpers.core.b.a(this.b0, x1().getResources().getInteger(R.integer.request_column_count)); az0 az0Var = new az0(x1(), ef.P, this.h0.x2()); this.g0 = az0Var; this.b0.setAdapter(az0Var); this.g0.S(K); if (m2.length > 0) { this.b0.r1(m2[0]); } } @Override public void y0(Menu menu, MenuInflater menuInflater) { menuInflater.inflate(R.menu.menu_request, menu); super.y0(menu, menuInflater); } @Override public View z0(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View findViewById; View inflate = layoutInflater.inflate(R.layout.fragment_request, viewGroup, false); this.b0 = (RecyclerView) inflate.findViewById(R.id.request_list); this.c0 = (FloatingActionButton) inflate.findViewById(R.id.fab); this.d0 = (RecyclerFastScroller) inflate.findViewById(R.id.fastscroll); this.e0 = (ProgressBar) inflate.findViewById(R.id.progress); wl1.H0(this.c0, new mq0() { @Override public final pp1 a(View view, pp1 pp1Var) { pp1 f2; f2 = gz0.f2(view, pp1Var); return f2; } @Override public void citrus() { } }); if (!ju0.b(x1()).K() && (findViewById = inflate.findViewById(R.id.shadow)) != null) { findViewById.setVisibility(8); } return inflate; } }