- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
360 lines
14 KiB
Java
360 lines
14 KiB
Java
package com.ironsource.mediationsdk.integration;
|
|
|
|
import android.content.Context;
|
|
import android.content.pm.PackageManager;
|
|
import android.text.TextUtils;
|
|
import android.util.Log;
|
|
import com.ironsource.i9;
|
|
import com.ironsource.mediationsdk.IntegrationData;
|
|
import com.ironsource.mediationsdk.p;
|
|
import com.ironsource.mediationsdk.utils.IronSourceUtils;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class IntegrationHelper {
|
|
private static final String a = "IntegrationHelper";
|
|
private static final String b = "4.1";
|
|
private static final String c = "4.3";
|
|
|
|
public class a extends Thread {
|
|
final /* synthetic */ Context a;
|
|
|
|
public a(Context context) {
|
|
this.a = context;
|
|
}
|
|
|
|
@Override // java.lang.Thread, java.lang.Runnable
|
|
public void run() {
|
|
try {
|
|
Log.w(IntegrationHelper.a, "--------------- Google Play Services --------------");
|
|
if (this.a.getPackageManager().getApplicationInfo(this.a.getPackageName(), 128).metaData.containsKey("com.google.android.gms.version")) {
|
|
String b = p.m().b(this.a);
|
|
if (!TextUtils.isEmpty(b)) {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("GAID is: ");
|
|
sb.append(b);
|
|
sb.append(" (use this for test devices)");
|
|
}
|
|
} else {
|
|
Log.e(IntegrationHelper.a, "Google Play Services - MISSING");
|
|
}
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
Log.e(IntegrationHelper.a, "Google Play Services - MISSING");
|
|
}
|
|
}
|
|
}
|
|
|
|
private static IntegrationData a(Context context, String str) {
|
|
String str2;
|
|
try {
|
|
IntegrationData integrationData = (IntegrationData) Class.forName(str).getMethod("getIntegrationData", Context.class).invoke(null, context);
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("Adapter ");
|
|
sb.append(integrationData.version);
|
|
sb.append(" - VERIFIED");
|
|
return integrationData;
|
|
} catch (ClassNotFoundException e) {
|
|
i9.d().a(e);
|
|
str2 = "Adapter - MISSING";
|
|
Log.e(a, str2);
|
|
return null;
|
|
} catch (Exception e2) {
|
|
i9.d().a(e2);
|
|
str2 = "Adapter version - NOT VERIFIED";
|
|
Log.e(a, str2);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
private static void a(Context context) {
|
|
new a(context).start();
|
|
}
|
|
|
|
private static void a(String str) {
|
|
try {
|
|
String str2 = (String) Class.forName(str).getMethod("getAdapterSDKVersion", new Class[0]).invoke(null, new Object[0]);
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("SDK Version - ");
|
|
sb.append(str2);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
Log.w("validateSDKVersion", "Unable to get SDK version");
|
|
}
|
|
}
|
|
|
|
private static boolean a(IntegrationData integrationData) {
|
|
if (integrationData.version.startsWith(b) || integrationData.version.startsWith(c)) {
|
|
return true;
|
|
}
|
|
Log.e(a, integrationData.name + " adapter " + integrationData.version + " is incompatible with SDK version " + IronSourceUtils.getSDKVersion() + ", please update your adapter to version " + b + ".*");
|
|
return false;
|
|
}
|
|
|
|
private static void b(Context context) {
|
|
PackageManager packageManager = context.getPackageManager();
|
|
if (packageManager.checkPermission("android.permission.INTERNET", context.getPackageName()) != 0) {
|
|
Log.e(a, "android.permission.INTERNET - MISSING");
|
|
}
|
|
if (packageManager.checkPermission("android.permission.ACCESS_NETWORK_STATE", context.getPackageName()) == 0) {
|
|
return;
|
|
}
|
|
Log.e(a, "android.permission.ACCESS_NETWORK_STATE - MISSING");
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:12:0x003e A[ADDED_TO_REGION] */
|
|
/* JADX WARN: Removed duplicated region for block: B:17:0x007c A[RETURN] */
|
|
/* JADX WARN: Removed duplicated region for block: B:19:0x007d A[Catch: Exception -> 0x0025, TryCatch #0 {Exception -> 0x0025, blocks: (B:3:0x0001, B:14:0x0042, B:15:0x0054, B:19:0x007d, B:21:0x0085, B:24:0x008c, B:27:0x001b, B:30:0x0027, B:33:0x0031), top: B:2:0x0001 }] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private static boolean b(android.content.Context r6, java.lang.String r7) {
|
|
/*
|
|
r0 = 0
|
|
java.lang.String r1 = com.ironsource.environment.StringUtils.toLowerCase(r7) // Catch: java.lang.Exception -> L25
|
|
int r2 = r1.hashCode() // Catch: java.lang.Exception -> L25
|
|
r3 = -805296079(0xffffffffd0002831, float:-8.600471E9)
|
|
r4 = 2
|
|
r5 = 1
|
|
if (r2 == r3) goto L31
|
|
r3 = 92668925(0x58603fd, float:1.2602765E-35)
|
|
if (r2 == r3) goto L27
|
|
r3 = 497130182(0x1da19ac6, float:4.2776377E-21)
|
|
if (r2 == r3) goto L1b
|
|
goto L3b
|
|
L1b:
|
|
java.lang.String r2 = "facebook"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L25
|
|
if (r1 == 0) goto L3b
|
|
r1 = r0
|
|
goto L3c
|
|
L25:
|
|
r6 = move-exception
|
|
goto L90
|
|
L27:
|
|
java.lang.String r2 = "admob"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L25
|
|
if (r1 == 0) goto L3b
|
|
r1 = r5
|
|
goto L3c
|
|
L31:
|
|
java.lang.String r2 = "vungle"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L25
|
|
if (r1 == 0) goto L3b
|
|
r1 = r4
|
|
goto L3c
|
|
L3b:
|
|
r1 = -1
|
|
L3c:
|
|
if (r1 == 0) goto L54
|
|
if (r1 == r5) goto L54
|
|
if (r1 == r4) goto L54
|
|
java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L25
|
|
r1.<init>() // Catch: java.lang.Exception -> L25
|
|
java.lang.String r2 = "--------------- "
|
|
r1.append(r2) // Catch: java.lang.Exception -> L25
|
|
r1.append(r7) // Catch: java.lang.Exception -> L25
|
|
java.lang.String r2 = " --------------"
|
|
r1.append(r2) // Catch: java.lang.Exception -> L25
|
|
L54:
|
|
java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L25
|
|
r1.<init>() // Catch: java.lang.Exception -> L25
|
|
java.lang.String r2 = "com.ironsource.adapters."
|
|
r1.append(r2) // Catch: java.lang.Exception -> L25
|
|
java.lang.String r2 = com.ironsource.environment.StringUtils.toLowerCase(r7) // Catch: java.lang.Exception -> L25
|
|
r1.append(r2) // Catch: java.lang.Exception -> L25
|
|
java.lang.String r2 = "."
|
|
r1.append(r2) // Catch: java.lang.Exception -> L25
|
|
r1.append(r7) // Catch: java.lang.Exception -> L25
|
|
java.lang.String r2 = "Adapter"
|
|
r1.append(r2) // Catch: java.lang.Exception -> L25
|
|
java.lang.String r1 = r1.toString() // Catch: java.lang.Exception -> L25
|
|
com.ironsource.mediationsdk.IntegrationData r6 = a(r6, r1) // Catch: java.lang.Exception -> L25
|
|
if (r6 != 0) goto L7d
|
|
return r0
|
|
L7d:
|
|
java.lang.String r2 = "IronSource"
|
|
boolean r2 = r7.equalsIgnoreCase(r2) // Catch: java.lang.Exception -> L25
|
|
if (r2 != 0) goto L8c
|
|
boolean r6 = a(r6) // Catch: java.lang.Exception -> L25
|
|
if (r6 != 0) goto L8c
|
|
return r0
|
|
L8c:
|
|
a(r1) // Catch: java.lang.Exception -> L25
|
|
return r5
|
|
L90:
|
|
com.ironsource.i9 r1 = com.ironsource.i9.d()
|
|
r1.a(r6)
|
|
java.lang.StringBuilder r1 = new java.lang.StringBuilder
|
|
r1.<init>()
|
|
java.lang.String r2 = "isAdapterValid "
|
|
r1.append(r2)
|
|
r1.append(r7)
|
|
java.lang.String r7 = r1.toString()
|
|
java.lang.String r1 = "IntegrationHelper"
|
|
android.util.Log.e(r1, r7, r6)
|
|
return r0
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.ironsource.mediationsdk.integration.IntegrationHelper.b(android.content.Context, java.lang.String):boolean");
|
|
}
|
|
|
|
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
|
|
/* JADX WARN: Code restructure failed: missing block: B:15:0x0066, code lost:
|
|
|
|
if (r5.equals("facebook") == false) goto L9;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:30:0x00a2, code lost:
|
|
|
|
if (r5.equals("facebook") == false) goto L25;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public static void validateIntegration(android.content.Context r24) {
|
|
/*
|
|
b(r24)
|
|
java.lang.String r0 = "AppLovin"
|
|
java.lang.String r1 = "APS"
|
|
java.lang.String r2 = "BidMachine"
|
|
java.lang.String r3 = "Bigo"
|
|
java.lang.String r4 = "Chartboost"
|
|
java.lang.String r5 = "Fyber"
|
|
java.lang.String r6 = "AdMob"
|
|
java.lang.String r7 = "HyprMX"
|
|
java.lang.String r8 = "InMobi"
|
|
java.lang.String r9 = "IronSource"
|
|
java.lang.String r10 = "Vungle"
|
|
java.lang.String r11 = "Maio"
|
|
java.lang.String r12 = "Facebook"
|
|
java.lang.String r13 = "Mintegral"
|
|
java.lang.String r14 = "MobileFuse"
|
|
java.lang.String r15 = "Moloco"
|
|
java.lang.String r16 = "MyTarget"
|
|
java.lang.String r17 = "Ogury"
|
|
java.lang.String r18 = "Pangle"
|
|
java.lang.String r19 = "Smaato"
|
|
java.lang.String r20 = "SuperAwesome"
|
|
java.lang.String r21 = "UnityAds"
|
|
java.lang.String r22 = "Verve"
|
|
java.lang.String r23 = "Yandex"
|
|
java.lang.String[] r0 = new java.lang.String[]{r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23}
|
|
r1 = 0
|
|
r2 = r1
|
|
L39:
|
|
r3 = 24
|
|
if (r2 >= r3) goto Ld6
|
|
r3 = r0[r2]
|
|
r4 = r24
|
|
boolean r5 = b(r4, r3)
|
|
java.lang.String r6 = ">>>> "
|
|
r7 = 2
|
|
java.lang.String r8 = "facebook"
|
|
java.lang.String r9 = "admob"
|
|
java.lang.String r10 = "vungle"
|
|
r11 = -1
|
|
r12 = 1
|
|
if (r5 == 0) goto L8e
|
|
java.lang.String r5 = com.ironsource.environment.StringUtils.toLowerCase(r3)
|
|
r5.hashCode()
|
|
int r13 = r5.hashCode()
|
|
switch(r13) {
|
|
case -805296079: goto L72;
|
|
case 92668925: goto L69;
|
|
case 497130182: goto L62;
|
|
default: goto L60;
|
|
}
|
|
L60:
|
|
r7 = r11
|
|
goto L7a
|
|
L62:
|
|
boolean r5 = r5.equals(r8)
|
|
if (r5 != 0) goto L7a
|
|
goto L60
|
|
L69:
|
|
boolean r5 = r5.equals(r9)
|
|
if (r5 != 0) goto L70
|
|
goto L60
|
|
L70:
|
|
r7 = r12
|
|
goto L7a
|
|
L72:
|
|
boolean r5 = r5.equals(r10)
|
|
if (r5 != 0) goto L79
|
|
goto L60
|
|
L79:
|
|
r7 = r1
|
|
L7a:
|
|
switch(r7) {
|
|
case 0: goto Ld2;
|
|
case 1: goto Ld2;
|
|
case 2: goto Ld2;
|
|
default: goto L7d;
|
|
}
|
|
L7d:
|
|
java.lang.StringBuilder r5 = new java.lang.StringBuilder
|
|
r5.<init>()
|
|
r5.append(r6)
|
|
r5.append(r3)
|
|
java.lang.String r3 = " - VERIFIED"
|
|
r5.append(r3)
|
|
goto Ld2
|
|
L8e:
|
|
java.lang.String r5 = com.ironsource.environment.StringUtils.toLowerCase(r3)
|
|
r5.hashCode()
|
|
int r13 = r5.hashCode()
|
|
switch(r13) {
|
|
case -805296079: goto Lae;
|
|
case 92668925: goto La5;
|
|
case 497130182: goto L9e;
|
|
default: goto L9c;
|
|
}
|
|
L9c:
|
|
r7 = r11
|
|
goto Lb6
|
|
L9e:
|
|
boolean r5 = r5.equals(r8)
|
|
if (r5 != 0) goto Lb6
|
|
goto L9c
|
|
La5:
|
|
boolean r5 = r5.equals(r9)
|
|
if (r5 != 0) goto Lac
|
|
goto L9c
|
|
Lac:
|
|
r7 = r12
|
|
goto Lb6
|
|
Lae:
|
|
boolean r5 = r5.equals(r10)
|
|
if (r5 != 0) goto Lb5
|
|
goto L9c
|
|
Lb5:
|
|
r7 = r1
|
|
Lb6:
|
|
switch(r7) {
|
|
case 0: goto Ld2;
|
|
case 1: goto Ld2;
|
|
case 2: goto Ld2;
|
|
default: goto Lb9;
|
|
}
|
|
Lb9:
|
|
java.lang.StringBuilder r5 = new java.lang.StringBuilder
|
|
r5.<init>()
|
|
r5.append(r6)
|
|
r5.append(r3)
|
|
java.lang.String r3 = " - NOT VERIFIED"
|
|
r5.append(r3)
|
|
java.lang.String r3 = r5.toString()
|
|
java.lang.String r5 = "IntegrationHelper"
|
|
android.util.Log.e(r5, r3)
|
|
Ld2:
|
|
int r2 = r2 + 1
|
|
goto L39
|
|
Ld6:
|
|
r4 = r24
|
|
a(r24)
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.ironsource.mediationsdk.integration.IntegrationHelper.validateIntegration(android.content.Context):void");
|
|
}
|
|
}
|