正在查看: Antivirus Cleaner v1.2.0.0 应用的 t5.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Antivirus Cleaner v1.2.0.0 应用的 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 f7860p = new AtomicBoolean();
private final String f7861g;
private final MaxAdFormat f7862h;
private final JSONObject f7863i;
private final List f7864j;
private final a.InterfaceC0085a f7865k;
private final WeakReference f7866l;
private final String f7867m;
private long f7868n;
private final List f7869o;
public class b extends w4 {
private final long f7870g;
private final int f7871h;
private final q2 f7872i;
private final List f7873j;
public class a extends z2 {
public a(a.InterfaceC0085a interfaceC0085a) {
super(interfaceC0085a);
}
@Override
public void onAdLoadFailed(String str, MaxError maxError) {
long elapsedRealtime = SystemClock.elapsedRealtime() - b.this.f7870g;
com.applovin.impl.sdk.n unused = b.this.f8112c;
if (com.applovin.impl.sdk.n.a()) {
b.this.f8112c.a(b.this.f8111b, "Ad failed to load in " + elapsedRealtime + " ms for " + t5.this.f7862h.getLabel() + " ad unit " + t5.this.f7861g + " with error: " + maxError);
}
b.this.b("failed to load ad: " + maxError.getCode());
b bVar = b.this;
bVar.a(bVar.f7872i, MaxNetworkResponseInfo.AdLoadState.FAILED_TO_LOAD, elapsedRealtime, maxError);
if (b.this.f7871h >= b.this.f7873j.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.f8110a.j0().a((w4) new b(bVar2.f7871h + 1, b.this.f7873j), r5.b.MEDIATION);
}
}
@Override
public void onAdLoaded(MaxAd maxAd) {
b.this.b("loaded ad");
long elapsedRealtime = SystemClock.elapsedRealtime() - b.this.f7870g;
com.applovin.impl.sdk.n unused = b.this.f8112c;
if (com.applovin.impl.sdk.n.a()) {
b.this.f8112c.a(b.this.f8111b, "Ad loaded in " + elapsedRealtime + "ms for " + t5.this.f7862h.getLabel() + " ad unit " + t5.this.f7861g);
}
q2 q2Var = (q2) maxAd;
b.this.a(q2Var, MaxNetworkResponseInfo.AdLoadState.AD_LOADED, elapsedRealtime, null);
int i4 = b.this.f7871h;
while (true) {
i4++;
if (i4 >= b.this.f7873j.size()) {
t5.this.b(q2Var);
return;
} else {
b bVar = b.this;
bVar.a((q2) bVar.f7873j.get(i4), 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.f8112c.a(this.f8111b, "Loading ad " + (this.f7871h + 1) + " of " + this.f7873j.size() + " from " + this.f7872i.c() + " for " + t5.this.f7862h.getLabel() + " ad unit " + t5.this.f7861g);
}
b("started to load ad");
Context context = (Context) t5.this.f7866l.get();
Activity n02 = context instanceof Activity ? (Activity) context : this.f8110a.n0();
this.f8110a.T().b(this.f7872i);
this.f8110a.Q().loadThirdPartyMediatedAd(t5.this.f7861g, this.f7872i, n02, new a(t5.this.f7865k));
}
private b(int i4, List list) {
super(t5.this.f8111b, t5.this.f8110a, t5.this.f7861g);
this.f7870g = SystemClock.elapsedRealtime();
this.f7871h = i4;
this.f7872i = (q2) list.get(i4);
this.f7873j = list;
}
public void a(q2 q2Var, MaxNetworkResponseInfo.AdLoadState adLoadState, long j4, MaxError maxError) {
t5.this.f7869o.add(new MaxNetworkResponseInfoImpl(adLoadState, l3.a(q2Var.b()), q2Var.F(), q2Var.S(), j4, q2Var.C(), maxError));
}
}
public t5(String str, MaxAdFormat maxAdFormat, Map map, JSONObject jSONObject, Context context, com.applovin.impl.sdk.j jVar, a.InterfaceC0085a interfaceC0085a) {
super("TaskProcessMediationWaterfall", jVar, str);
this.f7861g = str;
this.f7862h = maxAdFormat;
this.f7863i = jSONObject;
this.f7865k = interfaceC0085a;
this.f7866l = new WeakReference(context);
this.f7867m = JsonUtils.getString(jSONObject, "mcode", "");
JSONArray jSONArray = JsonUtils.getJSONArray(jSONObject, "ads", new JSONArray());
this.f7864j = new ArrayList(jSONArray.length());
for (int i4 = 0; i4 < jSONArray.length(); i4++) {
this.f7864j.add(q2.a(map, JsonUtils.getJSONObject(jSONArray, i4, (JSONObject) null), jSONObject, jVar));
}
this.f7869o = new ArrayList(this.f7864j.size());
}
@Override
public void run() {
final MaxErrorImpl maxErrorImpl;
this.f7868n = SystemClock.elapsedRealtime();
int i4 = 0;
if (this.f7863i.optBoolean("is_testing", false) && !this.f8110a.l0().c() && f7860p.compareAndSet(false, true)) {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public final void run() {
t5.this.e();
}
});
}
if (this.f7864j.size() > 0) {
if (com.applovin.impl.sdk.n.a()) {
this.f8112c.a(this.f8111b, "Starting waterfall for " + this.f7862h.getLabel() + " ad unit " + this.f7861g + " with " + this.f7864j.size() + " ad(s)...");
}
this.f8110a.j0().a(new b(i4, this.f7864j));
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f8112c.k(this.f8111b, "No ads were returned from the server for " + this.f7862h.getLabel() + " ad unit " + this.f7861g);
}
z6.a(this.f7861g, this.f7862h, this.f7863i, this.f8110a);
JSONObject jSONObject = JsonUtils.getJSONObject(this.f7863i, "settings", new JSONObject());
long j4 = JsonUtils.getLong(jSONObject, "alfdcs", 0L);
if (l3.a(this.f7863i, this.f7861g, this.f8110a)) {
maxErrorImpl = new MaxErrorImpl(MaxErrorCode.INVALID_AD_UNIT_ID, "Ad Unit ID " + this.f7861g + " 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.f8110a) && ((Boolean) this.f8110a.a(l4.O5)).booleanValue()) {
j4 = 0;
}
} else {
maxErrorImpl = new MaxErrorImpl(204, "MAX returned no eligible ads from any mediated networks for this app/device");
}
if (j4 <= 0) {
b(maxErrorImpl);
return;
}
long millis = TimeUnit.SECONDS.toMillis(j4);
Runnable runnable = new Runnable() {
@Override
public final void run() {
t5.this.b(maxErrorImpl);
}
};
if (JsonUtils.getBoolean(jSONObject, "alfdcs_iba", Boolean.FALSE).booleanValue()) {
c0.a(millis, this.f8110a, runnable);
} else {
AppLovinSdkUtils.runOnUiThreadDelayed(runnable, 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.f8110a.n0());
}
public void b(q2 q2Var) {
this.f8110a.T().c(q2Var);
long elapsedRealtime = SystemClock.elapsedRealtime() - this.f7868n;
if (com.applovin.impl.sdk.n.a()) {
this.f8112c.d(this.f8111b, "Waterfall loaded in " + elapsedRealtime + "ms from " + q2Var.c() + " for " + this.f7862h.getLabel() + " ad unit " + this.f7861g);
}
q2Var.a(new MaxAdWaterfallInfoImpl(q2Var, elapsedRealtime, this.f7869o, this.f7867m));
l2.f(this.f7865k, q2Var);
}
public void b(MaxError maxError) {
if (maxError.getCode() == 204) {
this.f8110a.E().c(v1.f7999u);
} else if (maxError.getCode() == -5001) {
this.f8110a.E().c(v1.f8000v);
} else {
this.f8110a.E().c(v1.f8001w);
}
ArrayList arrayList = new ArrayList(this.f7869o.size());
for (MaxNetworkResponseInfo maxNetworkResponseInfo : this.f7869o) {
if (maxNetworkResponseInfo.getAdLoadState() == MaxNetworkResponseInfo.AdLoadState.FAILED_TO_LOAD) {
arrayList.add(maxNetworkResponseInfo);
}
}
if (arrayList.size() > 0) {
StringBuilder sb = new StringBuilder("======FAILED AD LOADS======");
sb.append("\n");
int i4 = 0;
while (i4 < arrayList.size()) {
MaxNetworkResponseInfo maxNetworkResponseInfo2 = (MaxNetworkResponseInfo) arrayList.get(i4);
i4++;
sb.append(i4);
sb.append(") ");
sb.append(maxNetworkResponseInfo2.getMediatedNetwork().getName());
sb.append("\n");
sb.append("..code: ");
sb.append(maxNetworkResponseInfo2.getError().getCode());
sb.append("\n");
sb.append("..message: ");
sb.append(maxNetworkResponseInfo2.getError().getMessage());
sb.append("\n");
}
((MaxErrorImpl) maxError).setAdLoadFailureInfo(sb.toString());
}
long elapsedRealtime = SystemClock.elapsedRealtime() - this.f7868n;
if (com.applovin.impl.sdk.n.a()) {
this.f8112c.d(this.f8111b, "Waterfall failed in " + elapsedRealtime + "ms for " + this.f7862h.getLabel() + " ad unit " + this.f7861g + " with error: " + maxError);
}
((MaxErrorImpl) maxError).setWaterfall(new MaxAdWaterfallInfoImpl(null, JsonUtils.getString(this.f7863i, "waterfall_name", ""), JsonUtils.getString(this.f7863i, "waterfall_test_name", ""), elapsedRealtime, this.f7869o, JsonUtils.optList(JsonUtils.getJSONArray(this.f7863i, "mwf_info_urls", null), Collections.EMPTY_LIST), this.f7867m));
l2.a(this.f7865k, this.f7861g, maxError);
}
}