正在查看: CallApp v2.226 应用的 t5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CallApp v2.226 应用的 t5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.impl;
import android.app.Activity;
import android.content.Context;
import android.os.SystemClock;
import com.applovin.impl.mediation.MaxAdWaterfallInfoImpl;
import com.applovin.impl.mediation.MaxErrorImpl;
import com.applovin.impl.mediation.MaxNetworkResponseInfoImpl;
import com.applovin.impl.mediation.ads.a;
import com.applovin.impl.r5;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.mediation.MaxAd;
import com.applovin.mediation.MaxAdFormat;
import com.applovin.mediation.MaxError;
import com.applovin.mediation.MaxErrorCode;
import com.applovin.mediation.MaxNetworkResponseInfo;
import com.applovin.sdk.AppLovinSdkUtils;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONArray;
import org.json.JSONObject;
public class t5 extends w4 {
private static final AtomicBoolean f10679p = new AtomicBoolean();
private final String f10680g;
private final MaxAdFormat f10681h;
private final JSONObject f10682i;
private final List f10683j;
private final a.InterfaceC0065a f10684k;
private final WeakReference f10685l;
private final String f10686m;
private long f10687n;
private final List f10688o;
public class b extends w4 {
private final long f10689g;
private final int f10690h;
private final q2 f10691i;
private final List f10692j;
public class a extends z2 {
public a(a.InterfaceC0065a interfaceC0065a) {
super(interfaceC0065a);
}
@Override
public void onAdLoadFailed(String str, MaxError maxError) {
long elapsedRealtime = SystemClock.elapsedRealtime() - b.this.f10689g;
com.applovin.impl.sdk.n unused = b.this.f10903c;
if (com.applovin.impl.sdk.n.a()) {
com.applovin.impl.sdk.n nVar = b.this.f10903c;
String str2 = b.this.f10902b;
StringBuilder g9 = s4.y.g(elapsedRealtime, "Ad failed to load in ", " ms for ");
g9.append(t5.this.f10681h.getLabel());
g9.append(" ad unit ");
g9.append(t5.this.f10680g);
g9.append(" with error: ");
g9.append(maxError);
nVar.a(str2, g9.toString());
}
b.this.b("failed to load ad: " + maxError.getCode());
b bVar = b.this;
bVar.a(bVar.f10691i, MaxNetworkResponseInfo.AdLoadState.FAILED_TO_LOAD, elapsedRealtime, maxError);
if (b.this.f10690h >= b.this.f10692j.size() - 1) {
t5.this.b(new MaxErrorImpl(-5001, "MAX returned eligible ads from mediated networks, but all ads failed to load. Inspect getWaterfall() for more info."));
} else {
b bVar2 = b.this;
b.this.f10901a.j0().a((w4) new b(bVar2.f10690h + 1, b.this.f10692j), r5.b.MEDIATION);
}
}
@Override
public void onAdLoaded(MaxAd maxAd) {
b.this.b("loaded ad");
long elapsedRealtime = SystemClock.elapsedRealtime() - b.this.f10689g;
com.applovin.impl.sdk.n unused = b.this.f10903c;
if (com.applovin.impl.sdk.n.a()) {
com.applovin.impl.sdk.n nVar = b.this.f10903c;
String str = b.this.f10902b;
StringBuilder g9 = s4.y.g(elapsedRealtime, "Ad loaded in ", "ms for ");
g9.append(t5.this.f10681h.getLabel());
g9.append(" ad unit ");
g9.append(t5.this.f10680g);
nVar.a(str, g9.toString());
}
q2 q2Var = (q2) maxAd;
b.this.a(q2Var, MaxNetworkResponseInfo.AdLoadState.AD_LOADED, elapsedRealtime, null);
int i8 = b.this.f10690h;
while (true) {
i8++;
if (i8 >= b.this.f10692j.size()) {
t5.this.b(q2Var);
return;
} else {
b bVar = b.this;
bVar.a((q2) bVar.f10692j.get(i8), MaxNetworkResponseInfo.AdLoadState.AD_LOAD_NOT_ATTEMPTED, -1L, null);
}
}
}
}
public void b(String str) {
}
@Override
public void run() {
if (com.applovin.impl.sdk.n.a()) {
this.f10903c.a(this.f10902b, "Loading ad " + (this.f10690h + 1) + " of " + this.f10692j.size() + " from " + this.f10691i.c() + " for " + t5.this.f10681h.getLabel() + " ad unit " + t5.this.f10680g);
}
b("started to load ad");
Context context = (Context) t5.this.f10685l.get();
Activity n02 = context instanceof Activity ? (Activity) context : this.f10901a.n0();
this.f10901a.T().b(this.f10691i);
this.f10901a.Q().loadThirdPartyMediatedAd(t5.this.f10680g, this.f10691i, n02, new a(t5.this.f10684k));
}
private b(int i8, List list) {
super(t5.this.f10902b, t5.this.f10901a, t5.this.f10680g);
this.f10689g = SystemClock.elapsedRealtime();
this.f10690h = i8;
this.f10691i = (q2) list.get(i8);
this.f10692j = list;
}
public void a(q2 q2Var, MaxNetworkResponseInfo.AdLoadState adLoadState, long j8, MaxError maxError) {
t5.this.f10688o.add(new MaxNetworkResponseInfoImpl(adLoadState, l3.a(q2Var.b()), q2Var.F(), q2Var.S(), j8, q2Var.C(), maxError));
}
}
public t5(String str, MaxAdFormat maxAdFormat, Map map, JSONObject jSONObject, Context context, com.applovin.impl.sdk.j jVar, a.InterfaceC0065a interfaceC0065a) {
super("TaskProcessMediationWaterfall", jVar, str);
this.f10680g = str;
this.f10681h = maxAdFormat;
this.f10682i = jSONObject;
this.f10684k = interfaceC0065a;
this.f10685l = new WeakReference(context);
this.f10686m = JsonUtils.getString(jSONObject, "mcode", "");
JSONArray x8 = com.amazon.device.ads.l.x("ads", jSONObject);
this.f10683j = new ArrayList(x8.length());
for (int i8 = 0; i8 < x8.length(); i8++) {
this.f10683j.add(q2.a(map, JsonUtils.getJSONObject(x8, i8, (JSONObject) null), jSONObject, jVar));
}
this.f10688o = new ArrayList(this.f10683j.size());
}
@Override
public void run() {
MaxErrorImpl maxErrorImpl;
this.f10687n = SystemClock.elapsedRealtime();
int i8 = 0;
if (this.f10682i.optBoolean("is_testing", false) && !this.f10901a.l0().c() && f10679p.compareAndSet(false, true)) {
AppLovinSdkUtils.runOnUiThread(new n8(this, 10));
}
if (this.f10683j.size() > 0) {
if (com.applovin.impl.sdk.n.a()) {
this.f10903c.a(this.f10902b, "Starting waterfall for " + this.f10681h.getLabel() + " ad unit " + this.f10680g + " with " + this.f10683j.size() + " ad(s)...");
}
this.f10901a.j0().a(new b(i8, this.f10683j));
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f10903c.k(this.f10902b, "No ads were returned from the server for " + this.f10681h.getLabel() + " ad unit " + this.f10680g);
}
z6.a(this.f10680g, this.f10681h, this.f10682i, this.f10901a);
JSONObject jSONObject = JsonUtils.getJSONObject(this.f10682i, "settings", new JSONObject());
long j8 = JsonUtils.getLong(jSONObject, "alfdcs", 0L);
if (l3.a(this.f10682i, this.f10680g, this.f10901a)) {
maxErrorImpl = new MaxErrorImpl(MaxErrorCode.INVALID_AD_UNIT_ID, a1.d0.s(new StringBuilder("Ad Unit ID "), this.f10680g, " is invalid or disabled.\nMake sure to use an Ad Unit ID from the MAX dashboard that is enabled and configured for the current application.\nFor more information, see https://developers.applovin.com/en/getting-started#step-2-create-an-ad-unit\nNote: New ad units cannot load ads until 30-60 minutes after they are created"));
if (z6.c(this.f10901a) && ((Boolean) this.f10901a.a(l4.O5)).booleanValue()) {
j8 = 0;
}
} else {
maxErrorImpl = new MaxErrorImpl(204, "MAX returned no eligible ads from any mediated networks for this app/device");
}
if (j8 <= 0) {
b(maxErrorImpl);
return;
}
long millis = TimeUnit.SECONDS.toMillis(j8);
i8 i8Var = new i8(21, this, maxErrorImpl);
if (JsonUtils.getBoolean(jSONObject, "alfdcs_iba", Boolean.FALSE).booleanValue()) {
c0.a(millis, this.f10901a, i8Var);
} else {
AppLovinSdkUtils.runOnUiThreadDelayed(i8Var, millis);
}
}
public void e() {
z6.a("MAX SDK Not Initialized In Test Mode", "Test ads may not load. Please force close and restart the app if you experience issues.", this.f10901a.n0());
}
public void b(q2 q2Var) {
this.f10901a.T().c(q2Var);
long elapsedRealtime = SystemClock.elapsedRealtime() - this.f10687n;
if (com.applovin.impl.sdk.n.a()) {
com.applovin.impl.sdk.n nVar = this.f10903c;
String str = this.f10902b;
StringBuilder g9 = s4.y.g(elapsedRealtime, "Waterfall loaded in ", "ms from ");
g9.append(q2Var.c());
g9.append(" for ");
g9.append(this.f10681h.getLabel());
g9.append(" ad unit ");
g9.append(this.f10680g);
nVar.d(str, g9.toString());
}
q2Var.a(new MaxAdWaterfallInfoImpl(q2Var, elapsedRealtime, this.f10688o, this.f10686m));
l2.f(this.f10684k, q2Var);
}
public void b(MaxError maxError) {
if (maxError.getCode() == 204) {
this.f10901a.E().c(v1.f10799u);
} else if (maxError.getCode() == -5001) {
this.f10901a.E().c(v1.f10800v);
} else {
this.f10901a.E().c(v1.f10801w);
}
ArrayList arrayList = new ArrayList(this.f10688o.size());
for (MaxNetworkResponseInfo maxNetworkResponseInfo : this.f10688o) {
if (maxNetworkResponseInfo.getAdLoadState() == MaxNetworkResponseInfo.AdLoadState.FAILED_TO_LOAD) {
arrayList.add(maxNetworkResponseInfo);
}
}
if (arrayList.size() > 0) {
StringBuilder sb = new StringBuilder("======FAILED AD LOADS======\n");
int i8 = 0;
while (i8 < arrayList.size()) {
MaxNetworkResponseInfo maxNetworkResponseInfo2 = (MaxNetworkResponseInfo) arrayList.get(i8);
i8++;
sb.append(i8);
sb.append(") ");
sb.append(maxNetworkResponseInfo2.getMediatedNetwork().getName());
sb.append("\n..code: ");
sb.append(maxNetworkResponseInfo2.getError().getCode());
sb.append("\n..message: ");
sb.append(maxNetworkResponseInfo2.getError().getMessage());
sb.append("\n");
}
((MaxErrorImpl) maxError).setAdLoadFailureInfo(sb.toString());
}
long elapsedRealtime = SystemClock.elapsedRealtime() - this.f10687n;
if (com.applovin.impl.sdk.n.a()) {
com.applovin.impl.sdk.n nVar = this.f10903c;
String str = this.f10902b;
StringBuilder g9 = s4.y.g(elapsedRealtime, "Waterfall failed in ", "ms for ");
g9.append(this.f10681h.getLabel());
g9.append(" ad unit ");
g9.append(this.f10680g);
g9.append(" with error: ");
g9.append(maxError);
nVar.d(str, g9.toString());
}
((MaxErrorImpl) maxError).setWaterfall(new MaxAdWaterfallInfoImpl(null, JsonUtils.getString(this.f10682i, "waterfall_name", ""), JsonUtils.getString(this.f10682i, "waterfall_test_name", ""), elapsedRealtime, this.f10688o, JsonUtils.optList(JsonUtils.getJSONArray(this.f10682i, "mwf_info_urls", null), Collections.EMPTY_LIST), this.f10686m));
l2.a(this.f10684k, this.f10680g, maxError);
}
}