- 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
391 lines
16 KiB
Java
391 lines
16 KiB
Java
package com.ironsource.mediationsdk;
|
|
|
|
import android.content.Context;
|
|
import android.text.TextUtils;
|
|
import android.util.Log;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewParent;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.RelativeLayout;
|
|
import com.ironsource.b7;
|
|
import com.ironsource.environment.ContextProvider;
|
|
import com.ironsource.environment.thread.IronSourceThreadManager;
|
|
import com.ironsource.i9;
|
|
import com.ironsource.ji;
|
|
import com.ironsource.kb;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.mediationsdk.utils.IronSourceConstants;
|
|
import com.ironsource.v7;
|
|
import com.vungle.ads.internal.protos.Sdk;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class l {
|
|
public static final String a = "BANNER";
|
|
public static final String b = "LARGE";
|
|
public static final String c = "RECTANGLE";
|
|
public static final String d = "LEADERBOARD";
|
|
public static final String e = "SMART";
|
|
public static final String f = "CUSTOM";
|
|
public static final String g = "MEDIUM_RECTANGLE";
|
|
public static final String h = "bannerAdSize";
|
|
public static final int i = 0;
|
|
public static final int j = 1;
|
|
public static final int k = 2;
|
|
public static final int l = 3;
|
|
public static final int m = 4;
|
|
public static final int n = 5;
|
|
public static final int o = 6;
|
|
public static final int p = -1;
|
|
public static final String q = "Adaptive=true";
|
|
|
|
public interface a {
|
|
void a(Map<String, Object> map, List<String> list, StringBuilder sb);
|
|
}
|
|
|
|
public interface b {
|
|
void a();
|
|
|
|
void a(String str);
|
|
}
|
|
|
|
public static int a(int i2) {
|
|
int i3 = -1;
|
|
for (AbstractAdapter abstractAdapter : c.b().a().values()) {
|
|
try {
|
|
int adaptiveHeight = abstractAdapter.getAdaptiveHeight(i2);
|
|
if (adaptiveHeight > i3) {
|
|
i3 = adaptiveHeight;
|
|
}
|
|
} catch (Throwable th) {
|
|
i9.d().a(th);
|
|
IronLog.INTERNAL.error("exception while calling getAdaptiveHeight for adapter - " + abstractAdapter.getProviderName());
|
|
}
|
|
}
|
|
return i3;
|
|
}
|
|
|
|
public static long a(long j2, long j3) {
|
|
return j3 - (new Date().getTime() - j2);
|
|
}
|
|
|
|
public static ISBannerSize a() {
|
|
return new ISBannerSize(d, 728, 90);
|
|
}
|
|
|
|
public static ISBannerSize a(String str, int i2, int i3) {
|
|
return new ISBannerSize(str, i2, i3);
|
|
}
|
|
|
|
public static String a(ISBannerSize iSBannerSize) {
|
|
return "Adaptive=true, size: " + iSBannerSize.containerParams.getWidth() + "x" + iSBannerSize.containerParams.getHeight() + "; fallback: " + iSBannerSize.getDescription() + ", size: " + iSBannerSize.getWidth() + "x" + iSBannerSize.getHeight() + ";";
|
|
}
|
|
|
|
private static void a(int i2, int i3) {
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (i3 == -1) {
|
|
jSONObject.put("errorCode", 2);
|
|
jSONObject.put("reason", "No networks found supporting adaptive banners");
|
|
} else {
|
|
jSONObject.put(IronSourceConstants.EVENTS_EXT1, "w:" + i2 + ",h:" + i3);
|
|
}
|
|
ji.i().a(new kb(IronSourceConstants.BN_GET_MAXIMAL_ADAPTIVE_HEIGHT, jSONObject));
|
|
} catch (Exception e2) {
|
|
i9.d().a(e2);
|
|
IronLog.INTERNAL.error(e2.toString());
|
|
}
|
|
}
|
|
|
|
public static void a(IronSourceBannerLayout ironSourceBannerLayout) {
|
|
if (ironSourceBannerLayout != null) {
|
|
ironSourceBannerLayout.a();
|
|
}
|
|
}
|
|
|
|
private static void a(IronSourceBannerLayout ironSourceBannerLayout, View view, Context context, ISBannerSize iSBannerSize) {
|
|
int dpToPixels = AdapterUtils.dpToPixels(context, iSBannerSize.containerParams.getWidth());
|
|
int dpToPixels2 = AdapterUtils.dpToPixels(context, iSBannerSize.containerParams.getHeight());
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(dpToPixels, dpToPixels2);
|
|
RelativeLayout relativeLayout = new RelativeLayout(context);
|
|
relativeLayout.setLayoutParams(layoutParams);
|
|
relativeLayout.setGravity(17);
|
|
relativeLayout.addView(view, 0);
|
|
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) ironSourceBannerLayout.getLayoutParams();
|
|
if (layoutParams2 == null) {
|
|
layoutParams2 = new FrameLayout.LayoutParams(dpToPixels, dpToPixels2);
|
|
}
|
|
layoutParams2.height = dpToPixels2;
|
|
layoutParams2.width = dpToPixels;
|
|
layoutParams2.gravity = 17;
|
|
ironSourceBannerLayout.setLayoutParams(layoutParams2);
|
|
IronLog.INTERNAL.verbose("containerParams height - " + iSBannerSize.containerParams.getHeight() + " width - " + iSBannerSize.containerParams.getWidth());
|
|
ironSourceBannerLayout.addView(relativeLayout, 0, layoutParams2);
|
|
}
|
|
|
|
public static void a(IronSourceBannerLayout ironSourceBannerLayout, View view, FrameLayout.LayoutParams layoutParams) {
|
|
a(ironSourceBannerLayout, view, layoutParams, (v7) null);
|
|
}
|
|
|
|
public static void a(final IronSourceBannerLayout ironSourceBannerLayout, final View view, final FrameLayout.LayoutParams layoutParams, final v7 v7Var) {
|
|
if (ironSourceBannerLayout == null || view == null || layoutParams == null) {
|
|
return;
|
|
}
|
|
final Context applicationContext = ContextProvider.getInstance().getApplicationContext();
|
|
final ISBannerSize size = ironSourceBannerLayout.getSize();
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new Runnable() { // from class: com.ironsource.mediationsdk.l$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
l.a(IronSourceBannerLayout.this, view, size, applicationContext, layoutParams, v7Var);
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ void a(IronSourceBannerLayout ironSourceBannerLayout, View view, ISBannerSize iSBannerSize, Context context, FrameLayout.LayoutParams layoutParams, v7 v7Var) {
|
|
try {
|
|
ironSourceBannerLayout.removeAllViews();
|
|
ViewParent parent = view.getParent();
|
|
if (parent instanceof ViewGroup) {
|
|
((ViewGroup) parent).removeView(view);
|
|
}
|
|
if (iSBannerSize != null) {
|
|
if (iSBannerSize.isAdaptive()) {
|
|
a(ironSourceBannerLayout, view, context, iSBannerSize);
|
|
} else {
|
|
ironSourceBannerLayout.addView(view, 0, layoutParams);
|
|
}
|
|
}
|
|
if (v7Var != null) {
|
|
v7Var.a();
|
|
}
|
|
} catch (Exception e2) {
|
|
i9.d().a(e2);
|
|
IronLog.INTERNAL.error("Error while binding a banner - " + Log.getStackTraceString(e2));
|
|
}
|
|
}
|
|
|
|
public static void a(IronSourceBannerLayout ironSourceBannerLayout, b7 b7Var, b bVar) {
|
|
String str;
|
|
if (c(ironSourceBannerLayout)) {
|
|
str = null;
|
|
} else {
|
|
Object[] objArr = new Object[1];
|
|
objArr[0] = ironSourceBannerLayout == null ? "banner is null" : "banner is destroyed";
|
|
str = String.format("can't load banner - %s", objArr);
|
|
}
|
|
if (b7Var == null || TextUtils.isEmpty(b7Var.getPlacementName())) {
|
|
Object[] objArr2 = new Object[1];
|
|
objArr2[0] = b7Var == null ? "placement is null" : "placement name is empty";
|
|
str = String.format("can't load banner - %s", objArr2);
|
|
}
|
|
if (TextUtils.isEmpty(str)) {
|
|
bVar.a();
|
|
} else {
|
|
IronLog.INTERNAL.error(str);
|
|
bVar.a(str);
|
|
}
|
|
}
|
|
|
|
public static void a(IronSourceBannerLayout ironSourceBannerLayout, b bVar) {
|
|
if (ironSourceBannerLayout != null && !ironSourceBannerLayout.isDestroyed()) {
|
|
bVar.a();
|
|
return;
|
|
}
|
|
Object[] objArr = new Object[1];
|
|
objArr[0] = ironSourceBannerLayout == null ? "banner is null" : "banner is destroyed";
|
|
bVar.a(String.format("can't destroy banner - %s", objArr));
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:19:0x00af A[Catch: Exception -> 0x001f, TryCatch #0 {Exception -> 0x001f, blocks: (B:4:0x0004, B:5:0x0011, B:16:0x0065, B:17:0x00a9, B:19:0x00af, B:21:0x00b9, B:22:0x00d5, B:27:0x008e, B:28:0x00a6, B:29:0x0093, B:30:0x0098, B:31:0x009d, B:32:0x00a2, B:33:0x0015, B:36:0x0022, B:39:0x002c, B:42:0x0036, B:45:0x0040, B:48:0x004a), top: B:3:0x0004 }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:26:? A[RETURN, SYNTHETIC] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public static void a(java.util.Map<java.lang.String, java.lang.Object> r8, com.ironsource.mediationsdk.ISBannerSize r9) {
|
|
/*
|
|
java.lang.String r0 = "ext1"
|
|
if (r9 == 0) goto Le9
|
|
java.lang.String r1 = r9.getDescription() // Catch: java.lang.Exception -> L1f
|
|
int r2 = r1.hashCode() // Catch: java.lang.Exception -> L1f
|
|
r3 = 2
|
|
r4 = 1
|
|
r5 = 4
|
|
r6 = 3
|
|
r7 = 5
|
|
switch(r2) {
|
|
case -387072689: goto L4a;
|
|
case 72205083: goto L40;
|
|
case 79011241: goto L36;
|
|
case 446888797: goto L2c;
|
|
case 1951953708: goto L22;
|
|
case 1999208305: goto L15;
|
|
default: goto L14;
|
|
} // Catch: java.lang.Exception -> L1f
|
|
L14:
|
|
goto L54
|
|
L15:
|
|
java.lang.String r2 = "CUSTOM"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L1f
|
|
if (r1 == 0) goto L54
|
|
r1 = r7
|
|
goto L55
|
|
L1f:
|
|
r8 = move-exception
|
|
goto Ld9
|
|
L22:
|
|
java.lang.String r2 = "BANNER"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L1f
|
|
if (r1 == 0) goto L54
|
|
r1 = 0
|
|
goto L55
|
|
L2c:
|
|
java.lang.String r2 = "LEADERBOARD"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L1f
|
|
if (r1 == 0) goto L54
|
|
r1 = r6
|
|
goto L55
|
|
L36:
|
|
java.lang.String r2 = "SMART"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L1f
|
|
if (r1 == 0) goto L54
|
|
r1 = r5
|
|
goto L55
|
|
L40:
|
|
java.lang.String r2 = "LARGE"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L1f
|
|
if (r1 == 0) goto L54
|
|
r1 = r4
|
|
goto L55
|
|
L4a:
|
|
java.lang.String r2 = "RECTANGLE"
|
|
boolean r1 = r1.equals(r2) // Catch: java.lang.Exception -> L1f
|
|
if (r1 == 0) goto L54
|
|
r1 = r3
|
|
goto L55
|
|
L54:
|
|
r1 = -1
|
|
L55:
|
|
java.lang.String r2 = "bannerAdSize"
|
|
if (r1 == 0) goto La2
|
|
if (r1 == r4) goto L9d
|
|
if (r1 == r3) goto L98
|
|
if (r1 == r6) goto L93
|
|
if (r1 == r5) goto L8e
|
|
if (r1 == r7) goto L64
|
|
goto La9
|
|
L64:
|
|
r1 = 6
|
|
java.lang.Integer r1 = java.lang.Integer.valueOf(r1) // Catch: java.lang.Exception -> L1f
|
|
r8.put(r2, r1) // Catch: java.lang.Exception -> L1f
|
|
java.lang.String r1 = "custom_banner_size"
|
|
java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L1f
|
|
r2.<init>() // Catch: java.lang.Exception -> L1f
|
|
int r3 = r9.getWidth() // Catch: java.lang.Exception -> L1f
|
|
r2.append(r3) // Catch: java.lang.Exception -> L1f
|
|
java.lang.String r3 = "x"
|
|
r2.append(r3) // Catch: java.lang.Exception -> L1f
|
|
int r3 = r9.getHeight() // Catch: java.lang.Exception -> L1f
|
|
r2.append(r3) // Catch: java.lang.Exception -> L1f
|
|
java.lang.String r2 = r2.toString() // Catch: java.lang.Exception -> L1f
|
|
r8.put(r1, r2) // Catch: java.lang.Exception -> L1f
|
|
goto La9
|
|
L8e:
|
|
java.lang.Integer r1 = java.lang.Integer.valueOf(r7) // Catch: java.lang.Exception -> L1f
|
|
goto La6
|
|
L93:
|
|
java.lang.Integer r1 = java.lang.Integer.valueOf(r5) // Catch: java.lang.Exception -> L1f
|
|
goto La6
|
|
L98:
|
|
java.lang.Integer r1 = java.lang.Integer.valueOf(r6) // Catch: java.lang.Exception -> L1f
|
|
goto La6
|
|
L9d:
|
|
java.lang.Integer r1 = java.lang.Integer.valueOf(r3) // Catch: java.lang.Exception -> L1f
|
|
goto La6
|
|
La2:
|
|
java.lang.Integer r1 = java.lang.Integer.valueOf(r4) // Catch: java.lang.Exception -> L1f
|
|
La6:
|
|
r8.put(r2, r1) // Catch: java.lang.Exception -> L1f
|
|
La9:
|
|
boolean r1 = r9.isAdaptive() // Catch: java.lang.Exception -> L1f
|
|
if (r1 == 0) goto Le9
|
|
java.lang.String r1 = a(r9) // Catch: java.lang.Exception -> L1f
|
|
boolean r2 = r8.containsKey(r0) // Catch: java.lang.Exception -> L1f
|
|
if (r2 == 0) goto Ld5
|
|
java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L1f
|
|
r1.<init>() // Catch: java.lang.Exception -> L1f
|
|
java.lang.Object r2 = r8.get(r0) // Catch: java.lang.Exception -> L1f
|
|
r1.append(r2) // Catch: java.lang.Exception -> L1f
|
|
java.lang.String r2 = " , "
|
|
r1.append(r2) // Catch: java.lang.Exception -> L1f
|
|
java.lang.String r9 = a(r9) // Catch: java.lang.Exception -> L1f
|
|
r1.append(r9) // Catch: java.lang.Exception -> L1f
|
|
java.lang.String r1 = r1.toString() // Catch: java.lang.Exception -> L1f
|
|
Ld5:
|
|
r8.put(r0, r1) // Catch: java.lang.Exception -> L1f
|
|
goto Le9
|
|
Ld9:
|
|
com.ironsource.i9 r9 = com.ironsource.i9.d()
|
|
r9.a(r8)
|
|
com.ironsource.mediationsdk.logger.IronLog r9 = com.ironsource.mediationsdk.logger.IronLog.INTERNAL
|
|
java.lang.String r8 = android.util.Log.getStackTraceString(r8)
|
|
r9.error(r8)
|
|
Le9:
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.ironsource.mediationsdk.l.a(java.util.Map, com.ironsource.mediationsdk.ISBannerSize):void");
|
|
}
|
|
|
|
public static boolean a(ISContainerParams iSContainerParams, int i2, int i3) {
|
|
if (iSContainerParams == null || iSContainerParams.getWidth() <= 0 || iSContainerParams.getHeight() <= 0) {
|
|
IronLog.API.warning("Container size is invalid: Default banner size will be used.");
|
|
return false;
|
|
}
|
|
if (iSContainerParams.getWidth() >= i2 && iSContainerParams.getHeight() >= i3) {
|
|
return true;
|
|
}
|
|
IronLog.API.warning("Container size too small: Banner may not display correctly.");
|
|
return true;
|
|
}
|
|
|
|
public static int b(int i2) {
|
|
int a2;
|
|
if (p.m().O()) {
|
|
a2 = a(i2);
|
|
} else {
|
|
IronLog.API.error("The mediation must be successfully initiated before calling this API");
|
|
a2 = -1;
|
|
}
|
|
a(i2, a2);
|
|
IronLog.API.verbose("maximal height - " + a2 + " for width - " + i2);
|
|
return a2;
|
|
}
|
|
|
|
public static ISBannerSize b() {
|
|
if (AdapterUtils.isLargeScreen(ContextProvider.getInstance().getApplicationContext())) {
|
|
a(e, 728, 90);
|
|
}
|
|
return a(e, Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE, 50);
|
|
}
|
|
|
|
public static void b(IronSourceBannerLayout ironSourceBannerLayout) {
|
|
ISBannerSize size;
|
|
if (ironSourceBannerLayout == null || (size = ironSourceBannerLayout.getSize()) == null || !size.isSmart()) {
|
|
return;
|
|
}
|
|
ISBannerSize b2 = b();
|
|
b2.setContainerParams(size.containerParams);
|
|
b2.setAdaptive(size.isAdaptive());
|
|
ironSourceBannerLayout.setBannerSize(b2);
|
|
}
|
|
|
|
public static boolean c(IronSourceBannerLayout ironSourceBannerLayout) {
|
|
return (ironSourceBannerLayout == null || ironSourceBannerLayout.isDestroyed()) ? false : true;
|
|
}
|
|
}
|