Idle Egg Factory v2.1.5版本的 MD5 值为:7d2ba6677008ca521af0101bb927d72a
以下内容为反编译后的 b.java 源代码,内容仅作参考
package com.com.bytedance.overseas.sdk.a;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import com.bytedance.sdk.component.utils.l;
import com.bytedance.sdk.openadsdk.c.j;
import com.bytedance.sdk.openadsdk.core.m;
import com.bytedance.sdk.openadsdk.core.model.n;
import com.bytedance.sdk.openadsdk.core.w;
import com.bytedance.sdk.openadsdk.l.aa;
import com.google.android.gms.drive.DriveFile;
import com.safedk.android.utils.Logger;
import com.tapjoy.TapjoyConstants;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicBoolean;
public class b implements c {
protected static n b;
protected static String c;
protected static Boolean e;
protected com.bytedance.sdk.openadsdk.core.model.c f3531a;
private WeakReference<Context> g;
protected boolean d = false;
protected final AtomicBoolean f = new AtomicBoolean(false);
private boolean h = false;
public static void safedk_Context_startActivity_97cb3195734cf5c9cc3418feeafa6dd6(Context p0, Intent p1) {
Logger.d("SafeDK-Special|SafeDK: Call> Landroid/content/Context;->startActivity(Landroid/content/Intent;)V");
if (p1 == null) {
return;
}
p0.startActivity(p1);
}
public b(Context context, n nVar, String str) {
this.g = new WeakReference<>(context);
b = nVar;
this.f3531a = nVar.ab();
c = str;
l.b("GPDownLoader", str, "====tag===" + str);
if (m.a() == null) {
m.a(context);
}
}
@Override
public void a(boolean z) {
this.h = z;
}
public boolean a(Context context, String str, String str2) {
return b(context, str, str2);
}
public static boolean b(Context context, String str, String str2) {
Intent launchIntentForPackage;
HashMap hashMap = new HashMap();
Boolean bool = e;
hashMap.put("storeOpenType", (bool == null || !bool.booleanValue()) ? "webview" : TapjoyConstants.TJC_APP_PLACEMENT);
if (!TextUtils.isEmpty(c) && c.contains("_landingpage")) {
c = c.replace("_landingpage", "");
}
if (!TextUtils.isEmpty(str) && str.contains("play.google.com/store/apps/details?id=")) {
try {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str));
intent.setFlags(DriveFile.MODE_READ_ONLY);
safedk_Context_startActivity_97cb3195734cf5c9cc3418feeafa6dd6(context, intent);
l.c("GPDownLoader", "Goto Google Play");
l.c("GPDownLoader", "download_url is : ->" + str);
com.bytedance.sdk.openadsdk.c.c.b(context, b, c, "store_open", hashMap);
l.b("GPDownLoader", c, hashMap.toString());
return true;
} catch (Throwable unused) {
}
}
if (context != null && str2 != null && !TextUtils.isEmpty(str2)) {
l.c("GPDownLoader", "gotoGooglePlay :market://details?id=" + str2);
try {
Intent intent2 = new Intent("android.intent.action.VIEW");
Uri parse = Uri.parse("market://details?id=" + str2);
intent2.setData(parse);
for (ResolveInfo resolveInfo : context.getPackageManager().queryIntentActivities(intent2, 65536)) {
if (resolveInfo.activityInfo.packageName.equals("com.android.vending") && (launchIntentForPackage = context.getPackageManager().getLaunchIntentForPackage("com.android.vending")) != null) {
launchIntentForPackage.setComponent(new ComponentName(resolveInfo.activityInfo.packageName, resolveInfo.activityInfo.name));
launchIntentForPackage.setData(parse);
if (Build.VERSION.SDK_INT >= 33) {
launchIntentForPackage.setAction("android.intent.action.VIEW");
launchIntentForPackage.removeCategory("android.intent.category.LAUNCHER");
}
if (!(context instanceof Activity)) {
launchIntentForPackage.setFlags(DriveFile.MODE_READ_ONLY);
}
safedk_Context_startActivity_97cb3195734cf5c9cc3418feeafa6dd6(context, launchIntentForPackage);
hashMap.put("storeOpenType", TapjoyConstants.TJC_APP_PLACEMENT);
com.bytedance.sdk.openadsdk.c.c.b(context, b, c, "store_open", hashMap);
return true;
}
}
} catch (Throwable unused2) {
}
try {
Intent intent3 = new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + str2));
intent3.setFlags(DriveFile.MODE_READ_ONLY);
safedk_Context_startActivity_97cb3195734cf5c9cc3418feeafa6dd6(context, intent3);
hashMap.put("storeOpenType", "webview");
com.bytedance.sdk.openadsdk.c.c.b(context, b, c, "store_open", hashMap);
return true;
} catch (Throwable unused3) {
}
}
return false;
}
public static void a(Context context) {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse("market://details"));
try {
Iterator<ResolveInfo> it = context.getPackageManager().queryIntentActivities(intent, 65536).iterator();
while (it.hasNext()) {
if (it.next().activityInfo.packageName.equals("com.android.vending")) {
e = true;
return;
}
}
} catch (Throwable unused) {
e = false;
}
e = false;
}
public Context c() {
WeakReference<Context> weakReference = this.g;
return (weakReference == null || weakReference.get() == null) ? m.a() : this.g.get();
}
@Override
public void d() {
if (c() == null) {
return;
}
if (b()) {
this.f.set(true);
} else {
if (a() || e() || b.ab() != null || b.P() == null) {
return;
}
w.a(c(), b.P(), b, aa.a(c), c, true);
}
}
public boolean b() {
if (b.ac() == null) {
return false;
}
String a2 = b.ac().a();
if (!TextUtils.isEmpty(a2)) {
Uri parse = Uri.parse(a2);
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(parse);
if (aa.a(c(), intent)) {
if (!(c() instanceof Activity)) {
intent.addFlags(DriveFile.MODE_READ_ONLY);
}
try {
com.bytedance.sdk.openadsdk.c.c.e(m.a(), b, c, "open_url_app", null);
safedk_Context_startActivity_97cb3195734cf5c9cc3418feeafa6dd6(c(), intent);
j.a().a(b, c);
return true;
} catch (Throwable th) {
th.printStackTrace();
}
}
}
if (this.d && !this.f.get()) {
return false;
}
this.d = true;
com.bytedance.sdk.openadsdk.c.c.e(c(), b, c, "open_fallback_url", null);
return false;
}
@Override
public boolean e() {
this.f.set(true);
return this.f3531a != null && a(c(), this.f3531a.a(), this.f3531a.c());
}
@Override
public boolean a() {
Intent a2;
if (this.f3531a == null) {
return false;
}
n nVar = b;
if (nVar != null && nVar.at() == 0) {
return false;
}
String c2 = this.f3531a.c();
if (TextUtils.isEmpty(c2) || !aa.b(c(), c2) || (a2 = aa.a(c(), c2)) == null) {
return false;
}
a2.putExtra("START_ONLY_FOR_ANDROID", true);
try {
safedk_Context_startActivity_97cb3195734cf5c9cc3418feeafa6dd6(c(), a2);
com.bytedance.sdk.openadsdk.c.c.e(c(), b, c, "click_open", null);
return true;
} catch (Throwable th) {
th.printStackTrace();
return false;
}
}
}