正在查看: Aplazo v2.4.68 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Aplazo v2.4.68 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package He;
import Ue.e;
import af.InterfaceC0345a;
import af.InterfaceC0346b;
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 androidx.fragment.app.L;
import com.google.android.gms.common.d;
import com.google.android.gms.tasks.Task;
import com.google.android.play.core.review.ReviewInfo;
import df.C1372p;
import df.C1375s;
import df.InterfaceC1373q;
import df.InterfaceC1374r;
import java.util.ArrayList;
import java.util.Arrays;
public class c implements Ze.b, InterfaceC1373q, InterfaceC0345a {
public C1375s c;
public Context d;
public L e;
public ReviewInfo f;
public final boolean a() {
ArrayList arrayList = new ArrayList(Arrays.asList("com.android.vending"));
String installerPackageName = this.d.getPackageManager().getInstallerPackageName(this.d.getPackageName());
Log.i("InAppReviewPlugin", "appInstalledBySupportedStore: installer: " + installerPackageName);
return installerPackageName != null && arrayList.contains(installerPackageName);
}
public final boolean b(Z7.a aVar) {
Log.i("InAppReviewPlugin", "noContextOrActivity: called");
if (this.d == null) {
Log.e("InAppReviewPlugin", "noContextOrActivity: Android context not available");
aVar.c("error", "Android context not available", (Object) null);
return true;
}
if (this.e != null) {
return false;
}
Log.e("InAppReviewPlugin", "noContextOrActivity: Android activity not available");
aVar.c("error", "Android activity not available", (Object) null);
return true;
}
@Override
public final void onAttachedToActivity(InterfaceC0346b interfaceC0346b) {
this.e = ((e) interfaceC0346b).a;
}
@Override
public final void onAttachedToEngine(Ze.a aVar) {
C1375s c1375s = new C1375s(aVar.b, "dev.britannio.in_app_review");
this.c = c1375s;
c1375s.b(this);
this.d = aVar.a;
}
@Override
public final void onDetachedFromActivity() {
this.e = null;
}
@Override
public final void onDetachedFromActivityForConfigChanges() {
this.e = null;
}
@Override
public final void onDetachedFromEngine(Ze.a aVar) {
this.c.b(null);
this.d = null;
}
@Override
public final void onMethodCall(C1372p c1372p, InterfaceC1374r interfaceC1374r) {
boolean z;
z = true;
Log.i("InAppReviewPlugin", "onMethodCall: " + c1372p.a);
String str = c1372p.a;
str.getClass();
switch (str) {
case "openStoreListing":
Log.i("InAppReviewPlugin", "openStoreListing: called");
Z7.a aVar = (Z7.a) interfaceC1374r;
if (!b(aVar)) {
this.e.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + this.d.getPackageName())));
aVar.a((Object) null);
break;
}
break;
case "isAvailable":
Log.i("InAppReviewPlugin", "isAvailable: called");
Log.i("InAppReviewPlugin", "noContextOrActivity: called");
if (this.d != null) {
if (this.e != null) {
if (!a()) {
Log.w("InAppReviewPlugin", "The app should be installed by the Play Store to test in_app_review. See https://pub.dev/packages/in_app_review#testing-read-carefully for more information.");
}
try {
if (Build.VERSION.SDK_INT >= 33) {
C2.c.t(this.d.getPackageManager(), C2.c.d());
} else {
this.d.getPackageManager().getPackageInfo("com.android.vending", 0);
}
} catch (PackageManager.NameNotFoundException unused) {
Log.i("InAppReviewPlugin", "Play Store not installed.");
}
if (com.google.android.gms.common.c.d.d(this.d, d.a) != 0) {
Log.i("InAppReviewPlugin", "Google Play Services not available");
z = false;
}
Log.i("InAppReviewPlugin", "isAvailable: playStoreAndPlayServicesAvailable: " + z);
Log.i("InAppReviewPlugin", "isAvailable: lollipopOrLater: true");
if (!z) {
Log.w("InAppReviewPlugin", "isAvailable: The Play Store must be installed, Play Services must be available and Android 5 or later must be used");
((Z7.a) interfaceC1374r).a(Boolean.FALSE);
break;
} else {
Log.i("InAppReviewPlugin", "isAvailable: Play Store, Play Services and Android version requirements met");
Log.i("InAppReviewPlugin", "cacheReviewInfo: called");
Z7.a aVar2 = (Z7.a) interfaceC1374r;
if (!b(aVar2)) {
Context context = this.d;
Context applicationContext = context.getApplicationContext();
if (applicationContext != null) {
context = applicationContext;
}
Task b = new com.google.android.play.core.review.b(new lb.c(context)).b();
Log.i("InAppReviewPlugin", "cacheReviewInfo: Requesting review flow");
b.addOnCompleteListener(new A9.e(12, this, aVar2));
break;
}
}
} else {
Log.e("InAppReviewPlugin", "noContextOrActivity: Android activity not available");
}
} else {
Log.e("InAppReviewPlugin", "noContextOrActivity: Android context not available");
}
((Z7.a) interfaceC1374r).a(Boolean.FALSE);
break;
case "requestReview":
Log.i("InAppReviewPlugin", "requestReview: called");
Z7.a aVar3 = (Z7.a) interfaceC1374r;
if (!b(aVar3)) {
if (!a()) {
Log.w("InAppReviewPlugin", "The app should be installed by the Play Store to test in_app_review. See https://pub.dev/packages/in_app_review#testing-read-carefully for more information.");
}
Context context2 = this.d;
Context applicationContext2 = context2.getApplicationContext();
if (applicationContext2 != null) {
context2 = applicationContext2;
}
com.google.android.play.core.review.b bVar = new com.google.android.play.core.review.b(new lb.c(context2));
ReviewInfo reviewInfo = this.f;
if (reviewInfo == null) {
Task b2 = bVar.b();
Log.i("InAppReviewPlugin", "requestReview: Requesting review flow");
b2.addOnCompleteListener(new a(this, aVar3, bVar, 0));
break;
} else {
Log.i("InAppReviewPlugin", "launchReviewFlow: called");
if (!b(aVar3)) {
bVar.a(this.e, reviewInfo).addOnCompleteListener(new b(aVar3, 0));
break;
}
}
}
break;
default:
((Z7.a) interfaceC1374r).b();
break;
}
}
@Override
public final void onReattachedToActivityForConfigChanges(InterfaceC0346b interfaceC0346b) {
onAttachedToActivity(interfaceC0346b);
}
}