MD5 校验值:45179d8346c2c80751c3a2c25cc20ace
d.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package j4; import a5.j; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.util.Log; import f2.i; import r4.a; public class d implements r4.a, j.c, s4.a { private j f7375m; private Context f7376n; private Activity f7377o; private g2.b f7378p; private void d(final j.d dVar) { Log.i("InAppReviewPlugin", "cacheReviewInfo: called"); if (l(dVar)) { return; } i<g2.b> a7 = g2.d.a(this.f7376n).a(); Log.i("InAppReviewPlugin", "cacheReviewInfo: Requesting review flow"); a7.b(new f2.d() { @Override public final void a(i iVar) { d.this.g(dVar, iVar); } }); } private void e(j.d dVar) { Log.i("InAppReviewPlugin", "isAvailable: called"); if (k()) { dVar.a(Boolean.FALSE); return; } boolean f7 = f(); boolean z6 = Build.VERSION.SDK_INT >= 21; Log.i("InAppReviewPlugin", "isAvailable: playStoreInstalled: " + f7); Log.i("InAppReviewPlugin", "isAvailable: lollipopOrLater: " + z6); if (f7 && z6) { Log.i("InAppReviewPlugin", "isAvailable: The Play Store is available and Android 5 or later is being used"); d(dVar); } else { Log.w("InAppReviewPlugin", "isAvailable: The Play Store must be installed and Android 5 or later must be used"); dVar.a(Boolean.FALSE); } } private boolean f() { try { this.f7376n.getPackageManager().getPackageInfo("com.android.vending", 0); return true; } catch (PackageManager.NameNotFoundException unused) { return false; } } public void g(j.d dVar, i iVar) { if (iVar.p()) { Log.i("InAppReviewPlugin", "onComplete: Successfully requested review flow"); this.f7378p = (g2.b) iVar.l(); dVar.a(Boolean.TRUE); } else { Log.w("InAppReviewPlugin", "onComplete: Unsuccessfully requested review flow"); dVar.a(Boolean.FALSE); } } public void i(j.d dVar, g2.c cVar, i iVar) { if (iVar.p()) { Log.i("InAppReviewPlugin", "onComplete: Successfully requested review flow"); j(dVar, cVar, (g2.b) iVar.l()); } else { Log.w("InAppReviewPlugin", "onComplete: Unsuccessfully requested review flow"); dVar.b("error", "In-App Review API unavailable", null); } } private void j(final j.d dVar, g2.c cVar, g2.b bVar) { Log.i("InAppReviewPlugin", "launchReviewFlow: called"); if (l(dVar)) { return; } cVar.b(this.f7377o, bVar).b(new f2.d() { @Override public final void a(i iVar) { j.d.this.a(null); } }); } private boolean k() { Log.i("InAppReviewPlugin", "noContextOrActivity: called"); if (this.f7376n == null) { Log.e("InAppReviewPlugin", "noContextOrActivity: Android context not available"); return true; } if (this.f7377o != null) { return false; } Log.e("InAppReviewPlugin", "noContextOrActivity: Android activity not available"); return true; } private boolean l(j.d dVar) { Log.i("InAppReviewPlugin", "noContextOrActivity: called"); if (this.f7376n == null) { Log.e("InAppReviewPlugin", "noContextOrActivity: Android context not available"); dVar.b("error", "Android context not available", null); return true; } if (this.f7377o != null) { return false; } Log.e("InAppReviewPlugin", "noContextOrActivity: Android activity not available"); dVar.b("error", "Android activity not available", null); return true; } private void m(j.d dVar) { Log.i("InAppReviewPlugin", "openStoreListing: called"); if (l(dVar)) { return; } this.f7377o.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + this.f7376n.getPackageName()))); dVar.a(null); } private void n(final j.d dVar) { Log.i("InAppReviewPlugin", "requestReview: called"); if (l(dVar)) { return; } final g2.c a7 = g2.d.a(this.f7376n); g2.b bVar = this.f7378p; if (bVar != null) { j(dVar, a7, bVar); return; } i<g2.b> a8 = a7.a(); Log.i("InAppReviewPlugin", "requestReview: Requesting review flow"); a8.b(new f2.d() { @Override public final void a(i iVar) { d.this.i(dVar, a7, iVar); } }); } @Override public void onAttachedToActivity(s4.c cVar) { this.f7377o = cVar.f(); } @Override public void onAttachedToEngine(a.b bVar) { j jVar = new j(bVar.b(), "dev.britannio.in_app_review"); this.f7375m = jVar; jVar.e(this); this.f7376n = bVar.a(); } @Override public void onDetachedFromActivity() { this.f7377o = null; } @Override public void onDetachedFromActivityForConfigChanges() { onDetachedFromActivity(); } @Override public void onDetachedFromEngine(a.b bVar) { this.f7375m.e(null); this.f7376n = null; } @Override public void onMethodCall(a5.i iVar, j.d dVar) { Log.i("InAppReviewPlugin", "onMethodCall: " + iVar.f83a); String str = iVar.f83a; str.hashCode(); char c7 = 65535; switch (str.hashCode()) { case 159262157: if (str.equals("openStoreListing")) { c7 = 0; break; } break; case 444517567: if (str.equals("isAvailable")) { c7 = 1; break; } break; case 1361080007: if (str.equals("requestReview")) { c7 = 2; break; } break; } switch (c7) { case 0: m(dVar); return; case 1: e(dVar); return; case 2: n(dVar); return; default: dVar.c(); return; } } @Override public void onReattachedToActivityForConfigChanges(s4.c cVar) { onAttachedToActivity(cVar); } }