正在查看: All File Recovery v1.0.2 应用的 C0693t5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: All File Recovery v1.0.2 应用的 C0693t5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.impl;
import android.app.Activity;
import android.content.Context;
import android.os.SystemClock;
import com.applovin.impl.C0650r5;
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.C0672k;
import com.applovin.impl.sdk.C0676o;
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 C0693t5 extends AbstractRunnableC0716w4 {
private static final AtomicBoolean p = new AtomicBoolean();
private final String g;
private final MaxAdFormat h;
private final JSONObject i;
private final List j;
private final a.InterfaceC0099a k;
private final WeakReference l;
private final String m;
private long n;
private final List o;
public class b extends AbstractRunnableC0716w4 {
private final long g;
private final int h;
private final AbstractC0640q2 i;
private final List j;
public class a extends AbstractC0738z2 {
public a(a.InterfaceC0099a interfaceC0099a) {
super(interfaceC0099a);
}
@Override
public void onAdLoadFailed(String str, MaxError maxError) {
long elapsedRealtime = SystemClock.elapsedRealtime() - b.this.g;
C0676o unused = b.this.c;
if (C0676o.a()) {
C0676o c0676o = b.this.c;
String str2 = b.this.b;
StringBuilder a = M.c.a("Ad failed to load in ", elapsedRealtime, " ms for ");
a.append(C0693t5.this.h.getLabel());
a.append(" ad unit ");
a.append(C0693t5.this.g);
a.append(" with error: ");
a.append(maxError);
c0676o.a(str2, a.toString());
}
b.this.b("failed to load ad: " + maxError.getCode());
b bVar = b.this;
bVar.a(bVar.i, MaxNetworkResponseInfo.AdLoadState.FAILED_TO_LOAD, elapsedRealtime, maxError);
if (b.this.h >= b.this.j.size() - 1) {
C0693t5.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.a.q0().a((AbstractRunnableC0716w4) new b(bVar2.h + 1, b.this.j), C0650r5.b.MEDIATION);
}
}
@Override
public void onAdLoaded(MaxAd maxAd) {
b.this.b("loaded ad");
long elapsedRealtime = SystemClock.elapsedRealtime() - b.this.g;
C0676o unused = b.this.c;
if (C0676o.a()) {
C0676o c0676o = b.this.c;
String str = b.this.b;
StringBuilder a = M.c.a("Ad loaded in ", elapsedRealtime, "ms for ");
a.append(C0693t5.this.h.getLabel());
a.append(" ad unit ");
a.append(C0693t5.this.g);
c0676o.a(str, a.toString());
}
AbstractC0640q2 abstractC0640q2 = (AbstractC0640q2) maxAd;
b.this.a(abstractC0640q2, MaxNetworkResponseInfo.AdLoadState.AD_LOADED, elapsedRealtime, null);
int i = b.this.h;
while (true) {
i++;
if (i >= b.this.j.size()) {
C0693t5.this.b(abstractC0640q2);
return;
} else {
b bVar = b.this;
bVar.a((AbstractC0640q2) bVar.j.get(i), MaxNetworkResponseInfo.AdLoadState.AD_LOAD_NOT_ATTEMPTED, -1L, null);
}
}
}
}
public void b(String str) {
}
@Override
public void run() {
if (C0676o.a()) {
this.c.a(this.b, "Loading ad " + (this.h + 1) + " of " + this.j.size() + " from " + this.i.c() + " for " + C0693t5.this.h.getLabel() + " ad unit " + C0693t5.this.g);
}
b("started to load ad");
Context context = (Context) C0693t5.this.l.get();
Activity u0 = context instanceof Activity ? (Activity) context : this.a.u0();
this.a.a0().b(this.i);
this.a.X().loadThirdPartyMediatedAd(C0693t5.this.g, this.i, u0, new a(C0693t5.this.k));
}
private b(int i, List list) {
super(C0693t5.this.b, C0693t5.this.a, C0693t5.this.g);
this.g = SystemClock.elapsedRealtime();
this.h = i;
this.i = (AbstractC0640q2) list.get(i);
this.j = list;
}
public void a(AbstractC0640q2 abstractC0640q2, MaxNetworkResponseInfo.AdLoadState adLoadState, long j, MaxError maxError) {
C0693t5.this.o.add(new MaxNetworkResponseInfoImpl(adLoadState, AbstractC0576l3.a(abstractC0640q2.b()), abstractC0640q2.F(), abstractC0640q2.T(), j, abstractC0640q2.C(), maxError));
}
}
public C0693t5(String str, MaxAdFormat maxAdFormat, Map map, JSONObject jSONObject, Context context, C0672k c0672k, a.InterfaceC0099a interfaceC0099a) {
super("TaskProcessMediationWaterfall", c0672k, str);
this.g = str;
this.h = maxAdFormat;
this.i = jSONObject;
this.k = interfaceC0099a;
this.l = new WeakReference(context);
this.m = JsonUtils.getString(jSONObject, "mcode", "");
JSONArray a2 = G.a(jSONObject, "ads");
this.j = new ArrayList(a2.length());
for (int i = 0; i < a2.length(); i++) {
this.j.add(AbstractC0640q2.a(map, JsonUtils.getJSONObject(a2, i, (JSONObject) null), jSONObject, c0672k));
}
this.o = new ArrayList(this.j.size());
}
@Override
public void run() {
final MaxErrorImpl maxErrorImpl;
this.n = SystemClock.elapsedRealtime();
int i = 0;
if (this.i.optBoolean("is_testing", false) && !this.a.s0().c() && p.compareAndSet(false, true)) {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public final void run() {
C0693t5.this.e();
}
});
}
if (this.j.size() > 0) {
if (C0676o.a()) {
this.c.a(this.b, "Starting waterfall for " + this.h.getLabel() + " ad unit " + this.g + " with " + this.j.size() + " ad(s)...");
}
this.a.q0().a(new b(i, this.j));
return;
}
if (C0676o.a()) {
this.c.k(this.b, "No ads were returned from the server for " + this.h.getLabel() + " ad unit " + this.g);
}
AbstractC0742z6.a(this.g, this.h, this.i, this.a);
JSONObject jSONObject = JsonUtils.getJSONObject(this.i, "settings", new JSONObject());
long j = JsonUtils.getLong(jSONObject, "alfdcs", 0L);
if (AbstractC0576l3.a(this.i, this.g, this.a)) {
maxErrorImpl = new MaxErrorImpl(MaxErrorCode.INVALID_AD_UNIT_ID, O.c.a(new StringBuilder("Ad Unit ID "), this.g, " 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 (AbstractC0742z6.c(this.a) && ((Boolean) this.a.a(C0577l4.V5)).booleanValue()) {
j = 0;
}
} else {
maxErrorImpl = new MaxErrorImpl(204, "MAX returned no eligible ads from any mediated networks for this app/device");
}
if (j <= 0) {
b(maxErrorImpl);
return;
}
long millis = TimeUnit.SECONDS.toMillis(j);
Runnable runnable = new Runnable() {
@Override
public final void run() {
C0693t5.this.b(maxErrorImpl);
}
};
if (JsonUtils.getBoolean(jSONObject, "alfdcs_iba", Boolean.FALSE).booleanValue()) {
C0498c0.a(millis, this.a, runnable);
} else {
AppLovinSdkUtils.runOnUiThreadDelayed(runnable, millis);
}
}
public void e() {
AbstractC0742z6.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.a.u0());
}
public void b(AbstractC0640q2 abstractC0640q2) {
this.a.a0().c(abstractC0640q2);
long elapsedRealtime = SystemClock.elapsedRealtime() - this.n;
if (C0676o.a()) {
C0676o c0676o = this.c;
String str = this.b;
StringBuilder a2 = M.c.a("Waterfall loaded in ", elapsedRealtime, "ms from ");
a2.append(abstractC0640q2.c());
a2.append(" for ");
a2.append(this.h.getLabel());
a2.append(" ad unit ");
a2.append(this.g);
c0676o.d(str, a2.toString());
}
abstractC0640q2.a(new MaxAdWaterfallInfoImpl(abstractC0640q2, elapsedRealtime, this.o, this.m));
AbstractC0575l2.f(this.k, abstractC0640q2);
}
public void b(MaxError maxError) {
ArrayList arrayList = new ArrayList(this.o.size());
for (MaxNetworkResponseInfo maxNetworkResponseInfo : this.o) {
if (maxNetworkResponseInfo.getAdLoadState() == MaxNetworkResponseInfo.AdLoadState.FAILED_TO_LOAD) {
arrayList.add(maxNetworkResponseInfo);
}
}
if (arrayList.size() > 0) {
StringBuilder sb = new StringBuilder("======FAILED AD LOADS======\n");
int i = 0;
while (i < arrayList.size()) {
MaxNetworkResponseInfo maxNetworkResponseInfo2 = (MaxNetworkResponseInfo) arrayList.get(i);
i++;
sb.append(i);
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.n;
if (C0676o.a()) {
C0676o c0676o = this.c;
String str = this.b;
StringBuilder a2 = M.c.a("Waterfall failed in ", elapsedRealtime, "ms for ");
a2.append(this.h.getLabel());
a2.append(" ad unit ");
a2.append(this.g);
a2.append(" with error: ");
a2.append(maxError);
c0676o.d(str, a2.toString());
}
((MaxErrorImpl) maxError).setWaterfall(new MaxAdWaterfallInfoImpl(null, JsonUtils.getString(this.i, "waterfall_name", ""), JsonUtils.getString(this.i, "waterfall_test_name", ""), elapsedRealtime, this.o, JsonUtils.optList(JsonUtils.getJSONArray(this.i, "mwf_info_urls", null), Collections.EMPTY_LIST), this.m));
AbstractC0575l2.a(this.k, this.g, maxError);
}
}