正在查看: All File Recovery v1.0.2 应用的 C2953t5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: All File Recovery v1.0.2 应用的 C2953t5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.impl;
import android.app.Activity;
import android.content.Context;
import android.os.SystemClock;
import com.applovin.impl.C2910r5;
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.sdk.C2932k;
import com.applovin.impl.sdk.C2936o;
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 C2953t5 extends AbstractRunnableC2976w4 {
private static final AtomicBoolean f43130p = new AtomicBoolean();
private final String f43131g;
private final MaxAdFormat f43132h;
private final JSONObject f43133i;
private final List f43134j;
private final a.InterfaceC0450a f43135k;
private final WeakReference f43136l;
private final String f43137m;
private long f43138n;
private final List f43139o;
public class b extends AbstractRunnableC2976w4 {
private final long f43140g;
private final int f43141h;
private final AbstractC2900q2 f43142i;
private final List f43143j;
public class a extends AbstractC2998z2 {
public a(a.InterfaceC0450a interfaceC0450a) {
super(interfaceC0450a);
}
@Override
public void onAdLoadFailed(String str, MaxError maxError) {
long elapsedRealtime = SystemClock.elapsedRealtime() - b.this.f43140g;
C2936o unused = b.this.f43373c;
if (C2936o.a()) {
C2936o c2936o = b.this.f43373c;
String str2 = b.this.f43372b;
StringBuilder a10 = M.c.a("Ad failed to load in ", elapsedRealtime, " ms for ");
a10.append(C2953t5.this.f43132h.getLabel());
a10.append(" ad unit ");
a10.append(C2953t5.this.f43131g);
a10.append(" with error: ");
a10.append(maxError);
c2936o.a(str2, a10.toString());
}
b.this.b("failed to load ad: " + maxError.getCode());
b bVar = b.this;
bVar.a(bVar.f43142i, MaxNetworkResponseInfo.AdLoadState.FAILED_TO_LOAD, elapsedRealtime, maxError);
if (b.this.f43141h >= b.this.f43143j.size() - 1) {
C2953t5.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.f43371a.q0().a((AbstractRunnableC2976w4) new b(bVar2.f43141h + 1, b.this.f43143j), C2910r5.b.MEDIATION);
}
}
@Override
public void onAdLoaded(MaxAd maxAd) {
b.this.b("loaded ad");
long elapsedRealtime = SystemClock.elapsedRealtime() - b.this.f43140g;
C2936o unused = b.this.f43373c;
if (C2936o.a()) {
C2936o c2936o = b.this.f43373c;
String str = b.this.f43372b;
StringBuilder a10 = M.c.a("Ad loaded in ", elapsedRealtime, "ms for ");
a10.append(C2953t5.this.f43132h.getLabel());
a10.append(" ad unit ");
a10.append(C2953t5.this.f43131g);
c2936o.a(str, a10.toString());
}
AbstractC2900q2 abstractC2900q2 = (AbstractC2900q2) maxAd;
b.this.a(abstractC2900q2, MaxNetworkResponseInfo.AdLoadState.AD_LOADED, elapsedRealtime, null);
int i10 = b.this.f43141h;
while (true) {
i10++;
if (i10 >= b.this.f43143j.size()) {
C2953t5.this.b(abstractC2900q2);
return;
} else {
b bVar = b.this;
bVar.a((AbstractC2900q2) bVar.f43143j.get(i10), MaxNetworkResponseInfo.AdLoadState.AD_LOAD_NOT_ATTEMPTED, -1L, null);
}
}
}
}
public void b(String str) {
}
@Override
public void run() {
if (C2936o.a()) {
this.f43373c.a(this.f43372b, "Loading ad " + (this.f43141h + 1) + " of " + this.f43143j.size() + " from " + this.f43142i.c() + " for " + C2953t5.this.f43132h.getLabel() + " ad unit " + C2953t5.this.f43131g);
}
b("started to load ad");
Context context = (Context) C2953t5.this.f43136l.get();
Activity u02 = context instanceof Activity ? (Activity) context : this.f43371a.u0();
this.f43371a.a0().b(this.f43142i);
this.f43371a.X().loadThirdPartyMediatedAd(C2953t5.this.f43131g, this.f43142i, u02, new a(C2953t5.this.f43135k));
}
private b(int i10, List list) {
super(C2953t5.this.f43372b, C2953t5.this.f43371a, C2953t5.this.f43131g);
this.f43140g = SystemClock.elapsedRealtime();
this.f43141h = i10;
this.f43142i = (AbstractC2900q2) list.get(i10);
this.f43143j = list;
}
public void a(AbstractC2900q2 abstractC2900q2, MaxNetworkResponseInfo.AdLoadState adLoadState, long j10, MaxError maxError) {
C2953t5.this.f43139o.add(new MaxNetworkResponseInfoImpl(adLoadState, AbstractC2836l3.a(abstractC2900q2.b()), abstractC2900q2.F(), abstractC2900q2.T(), j10, abstractC2900q2.C(), maxError));
}
}
public C2953t5(String str, MaxAdFormat maxAdFormat, Map map, JSONObject jSONObject, Context context, C2932k c2932k, a.InterfaceC0450a interfaceC0450a) {
super("TaskProcessMediationWaterfall", c2932k, str);
this.f43131g = str;
this.f43132h = maxAdFormat;
this.f43133i = jSONObject;
this.f43135k = interfaceC0450a;
this.f43136l = new WeakReference(context);
this.f43137m = JsonUtils.getString(jSONObject, "mcode", "");
JSONArray a10 = G.a(jSONObject, com.mbridge.msdk.foundation.entity.b.JSON_KEY_ADS);
this.f43134j = new ArrayList(a10.length());
for (int i10 = 0; i10 < a10.length(); i10++) {
this.f43134j.add(AbstractC2900q2.a(map, JsonUtils.getJSONObject(a10, i10, (JSONObject) null), jSONObject, c2932k));
}
this.f43139o = new ArrayList(this.f43134j.size());
}
@Override
public void run() {
final MaxErrorImpl maxErrorImpl;
this.f43138n = SystemClock.elapsedRealtime();
int i10 = 0;
if (this.f43133i.optBoolean("is_testing", false) && !this.f43371a.s0().c() && f43130p.compareAndSet(false, true)) {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public final void run() {
C2953t5.this.e();
}
});
}
if (this.f43134j.size() > 0) {
if (C2936o.a()) {
this.f43373c.a(this.f43372b, "Starting waterfall for " + this.f43132h.getLabel() + " ad unit " + this.f43131g + " with " + this.f43134j.size() + " ad(s)...");
}
this.f43371a.q0().a(new b(i10, this.f43134j));
return;
}
if (C2936o.a()) {
this.f43373c.k(this.f43372b, "No ads were returned from the server for " + this.f43132h.getLabel() + " ad unit " + this.f43131g);
}
AbstractC3002z6.a(this.f43131g, this.f43132h, this.f43133i, this.f43371a);
JSONObject jSONObject = JsonUtils.getJSONObject(this.f43133i, R9.D.f16040o, new JSONObject());
long j10 = JsonUtils.getLong(jSONObject, "alfdcs", 0L);
if (AbstractC2836l3.a(this.f43133i, this.f43131g, this.f43371a)) {
maxErrorImpl = new MaxErrorImpl(MaxErrorCode.INVALID_AD_UNIT_ID, O.c.a(new StringBuilder("Ad Unit ID "), this.f43131g, " 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 (AbstractC3002z6.c(this.f43371a) && ((Boolean) this.f43371a.a(C2837l4.f41260V5)).booleanValue()) {
j10 = 0;
}
} else {
maxErrorImpl = new MaxErrorImpl(204, "MAX returned no eligible ads from any mediated networks for this app/device");
}
if (j10 <= 0) {
b(maxErrorImpl);
return;
}
long millis = TimeUnit.SECONDS.toMillis(j10);
Runnable runnable = new Runnable() {
@Override
public final void run() {
C2953t5.this.b(maxErrorImpl);
}
};
if (JsonUtils.getBoolean(jSONObject, "alfdcs_iba", Boolean.FALSE).booleanValue()) {
C2758c0.a(millis, this.f43371a, runnable);
} else {
AppLovinSdkUtils.runOnUiThreadDelayed(runnable, millis);
}
}
public void e() {
AbstractC3002z6.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.f43371a.u0());
}
public void b(AbstractC2900q2 abstractC2900q2) {
this.f43371a.a0().c(abstractC2900q2);
long elapsedRealtime = SystemClock.elapsedRealtime() - this.f43138n;
if (C2936o.a()) {
C2936o c2936o = this.f43373c;
String str = this.f43372b;
StringBuilder a10 = M.c.a("Waterfall loaded in ", elapsedRealtime, "ms from ");
a10.append(abstractC2900q2.c());
a10.append(" for ");
a10.append(this.f43132h.getLabel());
a10.append(" ad unit ");
a10.append(this.f43131g);
c2936o.d(str, a10.toString());
}
abstractC2900q2.a(new MaxAdWaterfallInfoImpl(abstractC2900q2, elapsedRealtime, this.f43139o, this.f43137m));
AbstractC2835l2.f(this.f43135k, abstractC2900q2);
}
public void b(MaxError maxError) {
ArrayList arrayList = new ArrayList(this.f43139o.size());
for (MaxNetworkResponseInfo maxNetworkResponseInfo : this.f43139o) {
if (maxNetworkResponseInfo.getAdLoadState() == MaxNetworkResponseInfo.AdLoadState.FAILED_TO_LOAD) {
arrayList.add(maxNetworkResponseInfo);
}
}
if (arrayList.size() > 0) {
StringBuilder sb2 = new StringBuilder("======FAILED AD LOADS======\n");
int i10 = 0;
while (i10 < arrayList.size()) {
MaxNetworkResponseInfo maxNetworkResponseInfo2 = (MaxNetworkResponseInfo) arrayList.get(i10);
i10++;
sb2.append(i10);
sb2.append(") ");
sb2.append(maxNetworkResponseInfo2.getMediatedNetwork().getName());
sb2.append("\n..code: ");
sb2.append(maxNetworkResponseInfo2.getError().getCode());
sb2.append("\n..message: ");
sb2.append(maxNetworkResponseInfo2.getError().getMessage());
sb2.append("\n");
}
((MaxErrorImpl) maxError).setAdLoadFailureInfo(sb2.toString());
}
long elapsedRealtime = SystemClock.elapsedRealtime() - this.f43138n;
if (C2936o.a()) {
C2936o c2936o = this.f43373c;
String str = this.f43372b;
StringBuilder a10 = M.c.a("Waterfall failed in ", elapsedRealtime, "ms for ");
a10.append(this.f43132h.getLabel());
a10.append(" ad unit ");
a10.append(this.f43131g);
a10.append(" with error: ");
a10.append(maxError);
c2936o.d(str, a10.toString());
}
((MaxErrorImpl) maxError).setWaterfall(new MaxAdWaterfallInfoImpl(null, JsonUtils.getString(this.f43133i, "waterfall_name", ""), JsonUtils.getString(this.f43133i, "waterfall_test_name", ""), elapsedRealtime, this.f43139o, JsonUtils.optList(JsonUtils.getJSONArray(this.f43133i, "mwf_info_urls", null), Collections.EMPTY_LIST), this.f43137m));
AbstractC2835l2.a(this.f43135k, this.f43131g, maxError);
}
}