- 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
532 lines
16 KiB
Java
532 lines
16 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.os.Bundle;
|
|
import android.os.SystemClock;
|
|
import android.view.View;
|
|
import androidx.arch.core.util.Function;
|
|
import com.applovin.impl.sdk.utils.BundleUtils;
|
|
import com.applovin.impl.sdk.utils.JsonUtils;
|
|
import com.applovin.impl.sdk.utils.StringUtils;
|
|
import com.applovin.mediation.MaxAd;
|
|
import com.applovin.mediation.MaxAdFormat;
|
|
import com.applovin.mediation.MaxAdWaterfallInfo;
|
|
import com.applovin.mediation.nativeAds.MaxNativeAd;
|
|
import com.applovin.sdk.AppLovinSdkUtils;
|
|
import com.ironsource.mediationsdk.impressionData.ImpressionData;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Objects;
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class ge extends pe implements MaxAd {
|
|
private final int l;
|
|
private final AtomicBoolean m;
|
|
private final AtomicBoolean n;
|
|
protected com.applovin.impl.mediation.g o;
|
|
private final String p;
|
|
private MaxAdWaterfallInfo q;
|
|
private long r;
|
|
private String s;
|
|
private String t;
|
|
private cd u;
|
|
|
|
public com.applovin.impl.mediation.g A() {
|
|
return this.o;
|
|
}
|
|
|
|
public int J() {
|
|
return this.l;
|
|
}
|
|
|
|
public String M() {
|
|
return this.s;
|
|
}
|
|
|
|
public abstract ge a(com.applovin.impl.mediation.g gVar);
|
|
|
|
public void a(long j) {
|
|
this.r = j;
|
|
}
|
|
|
|
public void a(MaxAdWaterfallInfo maxAdWaterfallInfo) {
|
|
this.q = maxAdWaterfallInfo;
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getAdReviewCreativeId() {
|
|
return this.t;
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public long getRequestLatencyMillis() {
|
|
return this.r;
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public MaxAdWaterfallInfo getWaterfall() {
|
|
return this.q;
|
|
}
|
|
|
|
public void h(String str) {
|
|
this.t = str;
|
|
}
|
|
|
|
public void i(String str) {
|
|
this.s = str;
|
|
}
|
|
|
|
public void t() {
|
|
this.o = null;
|
|
this.q = null;
|
|
}
|
|
|
|
@Override // com.applovin.impl.pe
|
|
public String toString() {
|
|
return "MediatedAd{thirdPartyAdPlacementId=" + U() + ", adUnitId=" + getAdUnitId() + ", format=" + getFormat().getLabel() + ", networkName='" + getNetworkName() + "'}";
|
|
}
|
|
|
|
public AtomicBoolean u() {
|
|
return this.m;
|
|
}
|
|
|
|
public AtomicBoolean w() {
|
|
return this.n;
|
|
}
|
|
|
|
public String z() {
|
|
return this.p;
|
|
}
|
|
|
|
public static ge a(int i, Map map, JSONObject jSONObject, JSONObject jSONObject2, com.applovin.impl.sdk.j jVar) {
|
|
String string = JsonUtils.getString(jSONObject2, "ad_format", null);
|
|
MaxAdFormat formatFromString = MaxAdFormat.formatFromString(string);
|
|
Objects.requireNonNull(formatFromString, "Invalid ad format for string: " + string);
|
|
if (formatFromString.isAdViewAd()) {
|
|
return new he(i, map, jSONObject, jSONObject2, jVar);
|
|
}
|
|
if (formatFromString == MaxAdFormat.NATIVE) {
|
|
return new je(i, map, jSONObject, jSONObject2, jVar);
|
|
}
|
|
if (formatFromString.isFullscreenAd()) {
|
|
return new ie(i, map, jSONObject, jSONObject2, jVar);
|
|
}
|
|
throw new IllegalArgumentException("Unsupported ad format: " + string);
|
|
}
|
|
|
|
public ge(int i, Map map, JSONObject jSONObject, JSONObject jSONObject2, com.applovin.impl.mediation.g gVar, com.applovin.impl.sdk.j jVar) {
|
|
super(map, jSONObject, jSONObject2, jVar);
|
|
this.m = new AtomicBoolean();
|
|
this.n = new AtomicBoolean();
|
|
this.l = i;
|
|
this.o = gVar;
|
|
this.p = gVar != null ? gVar.b() : null;
|
|
}
|
|
|
|
public List W() {
|
|
return b("mwf_info_urls");
|
|
}
|
|
|
|
public String B() {
|
|
return a("bcode", "");
|
|
}
|
|
|
|
public long E() {
|
|
return a("bwt_ms", ((Long) this.a.a(ve.Q7)).longValue());
|
|
}
|
|
|
|
public long T() {
|
|
return a("twt_ms", ((Long) this.a.a(ve.R7)).longValue());
|
|
}
|
|
|
|
public int N() {
|
|
return a("mwalra", ((Integer) this.a.a(ve.I7)).intValue());
|
|
}
|
|
|
|
public long V() {
|
|
return a("walrad_ms", ((Long) this.a.a(ve.J7)).longValue());
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public MaxAdFormat getFormat() {
|
|
return MaxAdFormat.formatFromString(a("ad_format", b("ad_format", (String) null)));
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public AppLovinSdkUtils.Size getSize() {
|
|
int a = a("ad_width", -3);
|
|
int a2 = a("ad_height", -3);
|
|
if (a != -3 && a2 != -3) {
|
|
return new AppLovinSdkUtils.Size(a, a2);
|
|
}
|
|
return getFormat().getSize();
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getNetworkName() {
|
|
return a("network_name", "");
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getNetworkPlacement() {
|
|
return StringUtils.emptyIfNull(U());
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getCreativeId() {
|
|
return a(CampaignEx.JSON_KEY_CREATIVE_ID, (String) null);
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public double getRevenue() {
|
|
if (!((Boolean) this.a.a(ve.N7)).booleanValue() || !getFormat().isFullscreenAd() || u().get()) {
|
|
tl tlVar = this.i;
|
|
if (tlVar != null) {
|
|
return ((Double) tlVar.a(new Function() { // from class: com.applovin.impl.ge$$ExternalSyntheticLambda1
|
|
@Override // androidx.arch.core.util.Function
|
|
public final Object apply(Object obj) {
|
|
Double f;
|
|
f = ge.f((tl) obj);
|
|
return f;
|
|
}
|
|
})).doubleValue();
|
|
}
|
|
return JsonUtils.getDouble(a("revenue_parameters", (JSONObject) null), ImpressionData.IMPRESSION_DATA_KEY_REVENUE, -1.0d);
|
|
}
|
|
this.a.J();
|
|
if (!com.applovin.impl.sdk.n.a()) {
|
|
return 0.0d;
|
|
}
|
|
this.a.J().b("MediatedAd", "Attempting to retrieve revenue when not available yet");
|
|
return 0.0d;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ Double f(tl tlVar) {
|
|
return Double.valueOf(JsonUtils.getDouble(tlVar.a("revenue_parameters", (JSONObject) null), ImpressionData.IMPRESSION_DATA_KEY_REVENUE, -1.0d));
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getRevenuePrecision() {
|
|
tl tlVar = this.i;
|
|
if (tlVar != null) {
|
|
return (String) tlVar.a(new Function() { // from class: com.applovin.impl.ge$$ExternalSyntheticLambda4
|
|
@Override // androidx.arch.core.util.Function
|
|
public final Object apply(Object obj) {
|
|
String h;
|
|
h = ge.h((tl) obj);
|
|
return h;
|
|
}
|
|
});
|
|
}
|
|
return JsonUtils.getString(a("revenue_parameters", (JSONObject) null), "precision", "");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ String h(tl tlVar) {
|
|
return JsonUtils.getString(tlVar.a("revenue_parameters", (JSONObject) null), "precision", "");
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getDspName() {
|
|
return a("dsp_name", (String) null);
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getDspId() {
|
|
return a("dsp_id", (String) null);
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getAdValue(String str) {
|
|
return getAdValue(str, null);
|
|
}
|
|
|
|
public double O() {
|
|
return a("price", -1.0f);
|
|
}
|
|
|
|
public JSONObject x() {
|
|
tl tlVar = this.i;
|
|
if (tlVar != null) {
|
|
return (JSONObject) tlVar.a(new Function() { // from class: com.applovin.impl.ge$$ExternalSyntheticLambda6
|
|
@Override // androidx.arch.core.util.Function
|
|
public final Object apply(Object obj) {
|
|
JSONObject b;
|
|
b = ge.b((tl) obj);
|
|
return b;
|
|
}
|
|
});
|
|
}
|
|
return a("ad_values", new JSONObject());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ JSONObject b(tl tlVar) {
|
|
return JsonUtils.deepCopy(tlVar.a("ad_values", new JSONObject()));
|
|
}
|
|
|
|
public JSONObject P() {
|
|
tl tlVar = this.i;
|
|
if (tlVar != null) {
|
|
return (JSONObject) tlVar.a(new Function() { // from class: com.applovin.impl.ge$$ExternalSyntheticLambda5
|
|
@Override // androidx.arch.core.util.Function
|
|
public final Object apply(Object obj) {
|
|
JSONObject e;
|
|
e = ge.e((tl) obj);
|
|
return e;
|
|
}
|
|
});
|
|
}
|
|
return a("publisher_extra_info", new JSONObject());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ JSONObject e(tl tlVar) {
|
|
return JsonUtils.deepCopy(tlVar.a("publisher_extra_info", new JSONObject()));
|
|
}
|
|
|
|
public JSONObject R() {
|
|
tl tlVar = this.i;
|
|
if (tlVar != null) {
|
|
return (JSONObject) tlVar.a(new Function() { // from class: com.applovin.impl.ge$$ExternalSyntheticLambda2
|
|
@Override // androidx.arch.core.util.Function
|
|
public final Object apply(Object obj) {
|
|
JSONObject g;
|
|
g = ge.g((tl) obj);
|
|
return g;
|
|
}
|
|
});
|
|
}
|
|
return a("revenue_parameters", new JSONObject());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ JSONObject g(tl tlVar) {
|
|
return JsonUtils.deepCopy(tlVar.a("revenue_parameters", new JSONObject()));
|
|
}
|
|
|
|
public String Q() {
|
|
return JsonUtils.getString(R(), "revenue_event", "");
|
|
}
|
|
|
|
public String S() {
|
|
return b("event_id", "");
|
|
}
|
|
|
|
public String v() {
|
|
return a("adomain", (String) null);
|
|
}
|
|
|
|
public boolean c0() {
|
|
com.applovin.impl.mediation.g gVar = this.o;
|
|
return gVar != null && gVar.k() && this.o.j();
|
|
}
|
|
|
|
public Bundle F() {
|
|
JSONObject a;
|
|
tl tlVar = this.i;
|
|
if (tlVar != null) {
|
|
return (Bundle) tlVar.a(new Function() { // from class: com.applovin.impl.ge$$ExternalSyntheticLambda0
|
|
@Override // androidx.arch.core.util.Function
|
|
public final Object apply(Object obj) {
|
|
Bundle c;
|
|
c = ge.this.c((tl) obj);
|
|
return c;
|
|
}
|
|
});
|
|
}
|
|
if (c("credentials")) {
|
|
a = a("credentials", new JSONObject());
|
|
} else {
|
|
a = a("server_parameters", new JSONObject());
|
|
JsonUtils.putString(a, "placement_id", U());
|
|
}
|
|
return JsonUtils.toBundle(a);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ Bundle c(tl tlVar) {
|
|
JSONObject a;
|
|
if (tlVar.a("credentials")) {
|
|
a = tlVar.a("credentials", new JSONObject());
|
|
} else {
|
|
a = tlVar.a("server_parameters", new JSONObject());
|
|
JsonUtils.putString(a, "placement_id", U());
|
|
}
|
|
return JsonUtils.toBundle(a);
|
|
}
|
|
|
|
public String D() {
|
|
return a("bid_response", (String) null);
|
|
}
|
|
|
|
public boolean Z() {
|
|
return StringUtils.isValidString(D());
|
|
}
|
|
|
|
public long C() {
|
|
return a("bid_expiration_ms", BundleUtils.getLong("bid_expiration_ms", -1L, l()));
|
|
}
|
|
|
|
public boolean b0() {
|
|
return a("is_js_tag_ad", Boolean.FALSE).booleanValue();
|
|
}
|
|
|
|
public boolean d0() {
|
|
return a("only_load_when_initialized", Boolean.FALSE).booleanValue();
|
|
}
|
|
|
|
public boolean e0() {
|
|
return a("prefer_load_when_initialized", Boolean.TRUE).booleanValue();
|
|
}
|
|
|
|
public MaxAdFormat I() {
|
|
String a = a("haf", (String) null);
|
|
if (StringUtils.isValidString(a)) {
|
|
return MaxAdFormat.formatFromString(a);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public boolean a0() {
|
|
return I() != null;
|
|
}
|
|
|
|
public cd H() {
|
|
cd cdVar = this.u;
|
|
if (cdVar != null) {
|
|
return cdVar;
|
|
}
|
|
tl tlVar = this.i;
|
|
if (tlVar != null) {
|
|
this.u = (cd) tlVar.a(new Function() { // from class: com.applovin.impl.ge$$ExternalSyntheticLambda3
|
|
@Override // androidx.arch.core.util.Function
|
|
public final Object apply(Object obj) {
|
|
cd d;
|
|
d = ge.d((tl) obj);
|
|
return d;
|
|
}
|
|
});
|
|
} else {
|
|
this.u = new cd(a("hybrid_ad_config", (JSONObject) null));
|
|
}
|
|
return this.u;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ cd d(tl tlVar) {
|
|
return new cd(tlVar.a("hybrid_ad_config", (JSONObject) null));
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public String getAdValue(String str, String str2) {
|
|
JSONObject x = x();
|
|
if (x.has(str)) {
|
|
return JsonUtils.getString(x, str, str2);
|
|
}
|
|
Bundle l = l();
|
|
if (l.containsKey(str)) {
|
|
return l.getString(str);
|
|
}
|
|
JSONObject P = P();
|
|
if (P.has(str)) {
|
|
return JsonUtils.getString(P, str, str2);
|
|
}
|
|
return a(str, str2);
|
|
}
|
|
|
|
public View y() {
|
|
com.applovin.impl.mediation.g gVar;
|
|
if (!c0() || (gVar = this.o) == null) {
|
|
return null;
|
|
}
|
|
return gVar.d();
|
|
}
|
|
|
|
@Override // com.applovin.mediation.MaxAd
|
|
public MaxNativeAd getNativeAd() {
|
|
com.applovin.impl.mediation.g gVar = this.o;
|
|
if (gVar != null) {
|
|
return gVar.e();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public String U() {
|
|
return a("third_party_ad_placement_id", (String) null);
|
|
}
|
|
|
|
public String X() {
|
|
return b("waterfall_name", "");
|
|
}
|
|
|
|
public String Y() {
|
|
return b("waterfall_test_name", "");
|
|
}
|
|
|
|
public long G() {
|
|
if (L() > 0) {
|
|
return K() - L();
|
|
}
|
|
return -1L;
|
|
}
|
|
|
|
private long L() {
|
|
return a("load_started_time_ms", 0L);
|
|
}
|
|
|
|
public void g0() {
|
|
c("load_started_time_ms", SystemClock.elapsedRealtime());
|
|
}
|
|
|
|
public long K() {
|
|
return a("load_completed_time_ms", 0L);
|
|
}
|
|
|
|
public void f0() {
|
|
c("load_completed_time_ms", SystemClock.elapsedRealtime());
|
|
}
|
|
|
|
public void a(JSONObject jSONObject) {
|
|
if (jSONObject == null || jSONObject.length() == 0) {
|
|
return;
|
|
}
|
|
JSONObject x = x();
|
|
JsonUtils.putAll(x, jSONObject);
|
|
a("ad_values", (Object) x);
|
|
}
|
|
|
|
public void b(JSONObject jSONObject) {
|
|
if (jSONObject == null || jSONObject.length() == 0) {
|
|
return;
|
|
}
|
|
JSONObject P = P();
|
|
JsonUtils.putAll(P, jSONObject);
|
|
a("publisher_extra_info", (Object) P);
|
|
}
|
|
|
|
public void a(Bundle bundle) {
|
|
if (bundle == null) {
|
|
return;
|
|
}
|
|
if (bundle.containsKey("ad_values")) {
|
|
a(BundleUtils.toJSONObject(bundle.getBundle("ad_values")));
|
|
}
|
|
if (bundle.containsKey(CampaignEx.JSON_KEY_CREATIVE_ID) && !c(CampaignEx.JSON_KEY_CREATIVE_ID)) {
|
|
c(CampaignEx.JSON_KEY_CREATIVE_ID, BundleUtils.getString(CampaignEx.JSON_KEY_CREATIVE_ID, bundle));
|
|
}
|
|
if (bundle.containsKey("ad_width") && !c("ad_width") && bundle.containsKey("ad_height") && !c("ad_height")) {
|
|
int i = BundleUtils.getInt("ad_width", bundle);
|
|
int i2 = BundleUtils.getInt("ad_height", bundle);
|
|
c("ad_width", i);
|
|
c("ad_height", i2);
|
|
}
|
|
if (bundle.containsKey("publisher_extra_info")) {
|
|
b(BundleUtils.toJSONObject(bundle.getBundle("publisher_extra_info")));
|
|
}
|
|
}
|
|
}
|