- 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
438 lines
17 KiB
Java
438 lines
17 KiB
Java
package com.ironsource.mediationsdk.demandOnly;
|
|
|
|
import android.text.TextUtils;
|
|
import android.util.Log;
|
|
import com.ironsource.el;
|
|
import com.ironsource.environment.ContextProvider;
|
|
import com.ironsource.f5;
|
|
import com.ironsource.i9;
|
|
import com.ironsource.kb;
|
|
import com.ironsource.mediationsdk.AbstractAdapter;
|
|
import com.ironsource.mediationsdk.IronSource;
|
|
import com.ironsource.mediationsdk.d;
|
|
import com.ironsource.mediationsdk.demandOnly.a;
|
|
import com.ironsource.mediationsdk.demandOnly.j;
|
|
import com.ironsource.mediationsdk.demandOnly.m;
|
|
import com.ironsource.mediationsdk.demandOnly.n;
|
|
import com.ironsource.mediationsdk.demandOnly.p;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.mediationsdk.logger.IronSourceError;
|
|
import com.ironsource.mediationsdk.model.NetworkSettings;
|
|
import com.ironsource.mediationsdk.model.Placement;
|
|
import com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener;
|
|
import com.ironsource.mediationsdk.utils.ErrorBuilder;
|
|
import com.ironsource.mediationsdk.utils.IronSourceConstants;
|
|
import com.ironsource.mediationsdk.utils.IronSourceUtils;
|
|
import com.ironsource.mg;
|
|
import com.ironsource.rp;
|
|
import com.ironsource.t4;
|
|
import com.ironsource.ta;
|
|
import com.ironsource.v2;
|
|
import com.ironsource.v4;
|
|
import com.ironsource.y4;
|
|
import com.ironsource.ya;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.TimerTask;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class l extends m implements n.b, RewardedVideoSmashListener, t4 {
|
|
private ta n;
|
|
private ta o;
|
|
private ISDemandOnlyRewardedVideoListener p;
|
|
private v4 q;
|
|
private com.ironsource.mediationsdk.e r;
|
|
private p s;
|
|
private final mg t;
|
|
private final mg.a u;
|
|
|
|
public class a extends TimerTask {
|
|
public a() {
|
|
}
|
|
|
|
@Override // java.util.TimerTask, java.lang.Runnable
|
|
public void run() {
|
|
IronLog.INTERNAL.verbose("load timed out state=" + l.this.k());
|
|
l.this.a(new IronSourceError(1055, "load timed out"));
|
|
}
|
|
}
|
|
|
|
public l(String str, String str2, NetworkSettings networkSettings, ISDemandOnlyRewardedVideoListener iSDemandOnlyRewardedVideoListener, long j, AbstractAdapter abstractAdapter, com.ironsource.mediationsdk.e eVar) {
|
|
super(new v2(networkSettings, networkSettings.getRewardedVideoSettings(), IronSource.AD_UNIT.REWARDED_VIDEO), abstractAdapter);
|
|
this.s = new p.b();
|
|
this.t = el.N().k();
|
|
this.u = el.I().e();
|
|
this.p = iSDemandOnlyRewardedVideoListener;
|
|
this.f = j;
|
|
this.r = eVar;
|
|
this.a.initRewardedVideoForDemandOnly(str, str2, this.c, this);
|
|
}
|
|
|
|
private void a(int i, Object[][] objArr) {
|
|
Map<String, Object> j = j();
|
|
if (objArr != null) {
|
|
try {
|
|
for (Object[] objArr2 : objArr) {
|
|
j.put(objArr2[0].toString(), objArr2[1]);
|
|
}
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error("Exception: " + Log.getStackTraceString(e));
|
|
}
|
|
}
|
|
rp.i().a(new kb(i, new JSONObject(j)));
|
|
}
|
|
|
|
private void a(IronSourceError ironSourceError, long j) {
|
|
if (ironSourceError.getErrorCode() == 1058) {
|
|
a(1213, new Object[][]{new Object[]{IronSourceConstants.EVENTS_DURATION, Long.valueOf(j)}, new Object[]{"errorCode", Integer.valueOf(ironSourceError.getErrorCode())}});
|
|
} else {
|
|
a(1200, new Object[][]{new Object[]{IronSourceConstants.EVENTS_DURATION, Long.valueOf(j)}, new Object[]{"errorCode", Integer.valueOf(ironSourceError.getErrorCode())}, new Object[]{"reason", ironSourceError.getErrorMessage()}});
|
|
}
|
|
}
|
|
|
|
private void a(List<String> list, String str) {
|
|
a(list, h(), i(), this.j, str);
|
|
}
|
|
|
|
private void c(o oVar) {
|
|
this.n = new ta();
|
|
a(s());
|
|
if (!n()) {
|
|
a(new IronSourceError(j.a.k, "loadRewardedVideoWithAdm: must be called by bidder instance"));
|
|
return;
|
|
}
|
|
try {
|
|
d.a aVar = (d.a) oVar.a(new ya());
|
|
f5 a2 = new a.C0173a(aVar.h()).a(h());
|
|
if (a2 == null) {
|
|
IronSourceError buildLoadFailedError = ErrorBuilder.buildLoadFailedError("loadRewardedVideoWithAdm invalid enriched adm");
|
|
a(j.a.k, (Object[][]) null);
|
|
a(buildLoadFailedError);
|
|
return;
|
|
}
|
|
String j = a2.j();
|
|
if (j == null) {
|
|
IronLog.INTERNAL.error("serverData is null");
|
|
a(new IronSourceError(1062, "No available ad to load"));
|
|
return;
|
|
}
|
|
b(j);
|
|
a(aVar.a());
|
|
a(aVar.f());
|
|
a(81002, (Object[][]) null);
|
|
this.q.a(a2.b());
|
|
this.o = new ta();
|
|
this.a.loadRewardedVideoForBidding(this.c, null, j, this);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
a(ErrorBuilder.buildLoadFailedError("loadRewardedVideoWithAdm: Exception= " + e.getMessage()));
|
|
}
|
|
}
|
|
|
|
private void c(String str) {
|
|
IronLog ironLog = IronLog.INTERNAL;
|
|
ironLog.verbose();
|
|
if (a(m.a.LOAD_IN_PROGRESS)) {
|
|
if (str == null) {
|
|
ironLog.verbose("serverData is null");
|
|
a(new IronSourceError(1062, "No available ad to load"));
|
|
} else {
|
|
a(81002, (Object[][]) null);
|
|
this.a.loadRewardedVideoForBidding(this.c, null, str, this);
|
|
}
|
|
}
|
|
}
|
|
|
|
private IronSourceError q() {
|
|
return a(m.a.SHOW_IN_PROGRESS) ? new IronSourceError(1067, "showRewardedVideo error: can't show ad while an ad is already showing") : a(m.a.LOAD_IN_PROGRESS) ? new IronSourceError(1068, "showRewardedVideo error: can't show ad while an ad is loading") : new IronSourceError(1069, "showRewardedVideo error: no available ads to show");
|
|
}
|
|
|
|
private com.ironsource.mediationsdk.i r() {
|
|
String str = i() + h();
|
|
com.ironsource.mediationsdk.i iVar = new com.ironsource.mediationsdk.i(this.m);
|
|
iVar.b(IronSourceUtils.isEncryptedResponse());
|
|
iVar.a(true);
|
|
iVar.c(true);
|
|
iVar.d(str);
|
|
iVar.c(l());
|
|
iVar.a(this.t.a(this.m));
|
|
y4 y4Var = new y4(h(), false);
|
|
y4Var.a(this.s.value());
|
|
Map<String, Object> rewardedVideoBiddingData = this.a.getRewardedVideoBiddingData(this.c, new JSONObject());
|
|
if (rewardedVideoBiddingData != null) {
|
|
y4Var.b(rewardedVideoBiddingData);
|
|
}
|
|
iVar.a(y4Var);
|
|
return iVar;
|
|
}
|
|
|
|
private TimerTask s() {
|
|
return new a();
|
|
}
|
|
|
|
private void t() {
|
|
this.o = new ta();
|
|
this.a.loadRewardedVideo(this.c, null, this);
|
|
}
|
|
|
|
private void u() {
|
|
if (!this.r.a()) {
|
|
IronLog.INTERNAL.verbose("can't load the rewarded video the auction isn't enabled");
|
|
a(new IronSourceError(1063, "Missing server configuration"));
|
|
return;
|
|
}
|
|
a(81500, (Object[][]) null);
|
|
com.ironsource.mediationsdk.i r = r();
|
|
IronLog.INTERNAL.verbose("auction waterfallString = " + r.q());
|
|
a(81510, new Object[][]{new Object[]{IronSourceConstants.EVENTS_EXT1, r.q()}});
|
|
this.r.a(ContextProvider.getInstance().getApplicationContext(), r, this);
|
|
}
|
|
|
|
private void v() {
|
|
this.g = null;
|
|
this.h = null;
|
|
this.j = null;
|
|
this.q = new v4();
|
|
}
|
|
|
|
private void w() {
|
|
this.n = new ta();
|
|
a(s());
|
|
if (n()) {
|
|
IronSourceError buildLoadFailedError = ErrorBuilder.buildLoadFailedError("loadRewardedVideo must be called by non bidder instances");
|
|
a(j.a.k, (Object[][]) null);
|
|
a(buildLoadFailedError);
|
|
} else if (o()) {
|
|
u();
|
|
} else {
|
|
t();
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.l4
|
|
public void a(int i, String str, int i2, String str2, long j) {
|
|
IronLog.INTERNAL.verbose("Auction failed. error " + i + " - " + str);
|
|
this.g = null;
|
|
this.h = null;
|
|
a(81300, new Object[][]{new Object[]{"errorCode", Integer.valueOf(i)}, new Object[]{"reason", str}, new Object[]{IronSourceConstants.EVENTS_DURATION, Long.valueOf(j)}, new Object[]{IronSourceConstants.EVENTS_EXT1, k()}});
|
|
if (a(m.a.LOAD_IN_PROGRESS)) {
|
|
a(new IronSourceError(j.a.j, "No available ad to load"));
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.t4
|
|
public void a(d.a aVar, int i, long j, int i2, String str) {
|
|
String str2;
|
|
IronLog ironLog = IronLog.INTERNAL;
|
|
ironLog.verbose();
|
|
this.g = aVar.a();
|
|
this.h = aVar.f();
|
|
this.s = aVar.a(l());
|
|
a.C0173a c0173a = new a.C0173a(aVar.h());
|
|
if (c0173a.isEmpty()) {
|
|
str2 = "";
|
|
} else {
|
|
f5 f5Var = c0173a.get(0);
|
|
this.q.a(f5Var.b());
|
|
this.q.c(f5Var.g());
|
|
this.q.b(f5Var.f());
|
|
str2 = f5Var.j();
|
|
b(str2);
|
|
}
|
|
if (!TextUtils.isEmpty(str)) {
|
|
a(88002, new Object[][]{new Object[]{"errorCode", Integer.valueOf(i2)}, new Object[]{"reason", str}});
|
|
}
|
|
a(81301, new Object[][]{new Object[]{IronSourceConstants.EVENTS_DURATION, Long.valueOf(j)}});
|
|
a(81302, new Object[][]{new Object[]{IronSourceConstants.EVENTS_EXT1, c0173a.b()}});
|
|
if (a(m.a.LOAD_IN_PROGRESS)) {
|
|
if (!c0173a.isEmpty()) {
|
|
c(str2);
|
|
return;
|
|
}
|
|
IronSourceError ironSourceError = new IronSourceError(1058, "There is no available ad to load");
|
|
ironLog.error("rewardedVideo - empty waterfall");
|
|
a(ironSourceError);
|
|
}
|
|
}
|
|
|
|
public void a(IronSourceError ironSourceError) {
|
|
IronLog.INTERNAL.verbose("instanceName = " + h() + ", error = " + ironSourceError.getErrorMessage());
|
|
p();
|
|
if (a(m.a.LOAD_IN_PROGRESS, m.a.NOT_LOADED)) {
|
|
a(ironSourceError, ta.a(this.n));
|
|
a(this.q.b(), IronSourceUtils.getCurrentMethodName());
|
|
this.p.onRewardedVideoAdLoadFailed(l(), ironSourceError);
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.l4
|
|
public void a(List<f5> list, String str, f5 f5Var, JSONObject jSONObject, JSONObject jSONObject2, int i, long j, int i2, String str2) {
|
|
IronLog.INTERNAL.error("Deprecated: Please use onAuctionSuccess(AuctionDataUtils.AuctionData auctionData, int auctionTrial, long elapsedTime, int troubleshootingErrorCode, String troubleshootingErrorMessage)");
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.demandOnly.n.b
|
|
public boolean a() {
|
|
boolean z = false;
|
|
if (!a(m.a.LOADED)) {
|
|
a(1211, (Object[][]) null);
|
|
return false;
|
|
}
|
|
try {
|
|
z = this.a.isRewardedVideoAvailable(this.c);
|
|
a(z ? 1210 : 1211, (Object[][]) null);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error("exception=" + e.getMessage());
|
|
}
|
|
return z;
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.demandOnly.n.b
|
|
public void b(o oVar) {
|
|
IronLog.INTERNAL.verbose("state=" + k());
|
|
m.a aVar = m.a.NOT_LOADED;
|
|
m.a aVar2 = m.a.LOADED;
|
|
m.a aVar3 = m.a.LOAD_IN_PROGRESS;
|
|
m.a a2 = a(new m.a[]{aVar, aVar2}, aVar3);
|
|
if (a2 != aVar && a2 != aVar2) {
|
|
a(new IronSourceError(1053, a2 == aVar3 ? "load already in progress" : "cannot load because show is in progress"));
|
|
return;
|
|
}
|
|
v();
|
|
a(1001, (Object[][]) null);
|
|
c(oVar);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.demandOnly.n.b
|
|
public void d() {
|
|
IronLog.INTERNAL.verbose("state=" + k());
|
|
m.a aVar = m.a.NOT_LOADED;
|
|
m.a aVar2 = m.a.LOADED;
|
|
m.a aVar3 = m.a.LOAD_IN_PROGRESS;
|
|
m.a a2 = a(new m.a[]{aVar, aVar2}, aVar3);
|
|
if (a2 != aVar && a2 != aVar2) {
|
|
this.p.onRewardedVideoAdLoadFailed(l(), new IronSourceError(1053, a2 == aVar3 ? "load already in progress" : "cannot load because show is in progress"));
|
|
return;
|
|
}
|
|
v();
|
|
a(1001, (Object[][]) null);
|
|
w();
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.demandOnly.n.b
|
|
public void e() {
|
|
IronLog.INTERNAL.verbose("instanceName = " + h() + ", state=" + k());
|
|
a(1201, (Object[][]) null);
|
|
if (a(m.a.LOADED, m.a.SHOW_IN_PROGRESS)) {
|
|
this.a.showRewardedVideo(this.c, this);
|
|
} else {
|
|
onRewardedVideoAdShowFailed(q());
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAdClicked() {
|
|
IronLog.ADAPTER_CALLBACK.verbose("instance name= " + h());
|
|
a(1006, new Object[0][]);
|
|
this.p.onRewardedVideoAdClicked(l());
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAdClosed() {
|
|
b(m.a.NOT_LOADED);
|
|
IronLog.ADAPTER_CALLBACK.verbose("instance name= " + h());
|
|
a(1203, new Object[][]{new Object[]{"sessionDepth", Integer.valueOf(this.t.a(this.m))}});
|
|
this.u.b(this.m);
|
|
this.p.onRewardedVideoAdClosed(l());
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAdEnded() {
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAdOpened() {
|
|
IronLog.ADAPTER_CALLBACK.verbose("instance name= " + h());
|
|
a(1005, new Object[0][]);
|
|
a(this.q.a(), IronSourceUtils.getCurrentMethodName());
|
|
this.p.onRewardedVideoAdOpened(l());
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAdRewarded() {
|
|
IronLog.ADAPTER_CALLBACK.verbose("instance name= " + h());
|
|
Map<String, Object> j = j();
|
|
if (!TextUtils.isEmpty(com.ironsource.mediationsdk.p.m().l())) {
|
|
j.put(IronSourceConstants.EVENTS_DYNAMIC_USER_ID, com.ironsource.mediationsdk.p.m().l());
|
|
}
|
|
if (com.ironsource.mediationsdk.p.m().s() != null) {
|
|
for (String str : com.ironsource.mediationsdk.p.m().s().keySet()) {
|
|
j.put("custom_" + str, com.ironsource.mediationsdk.p.m().s().get(str));
|
|
}
|
|
}
|
|
Placement a2 = com.ironsource.mediationsdk.p.m().h().c().f().a();
|
|
if (a2 != null) {
|
|
j.put("placement", a2.getPlacementName());
|
|
j.put(IronSourceConstants.EVENTS_REWARD_NAME, a2.getRewardName());
|
|
j.put(IronSourceConstants.EVENTS_REWARD_AMOUNT, Integer.valueOf(a2.getRewardAmount()));
|
|
} else {
|
|
IronLog.INTERNAL.error("defaultPlacement is null");
|
|
}
|
|
kb kbVar = new kb(1010, new JSONObject(j));
|
|
kbVar.a(IronSourceConstants.EVENTS_TRANS_ID, IronSourceUtils.getTransId(kbVar.d(), h()));
|
|
rp.i().a(kbVar);
|
|
this.p.onRewardedVideoAdRewarded(l());
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAdShowFailed(IronSourceError ironSourceError) {
|
|
IronLog.ADAPTER_CALLBACK.verbose("error=" + ironSourceError.toString() + " instance name= " + h() + " state=" + k());
|
|
b(m.a.NOT_LOADED);
|
|
a(1202, new Object[][]{new Object[]{"errorCode", Integer.valueOf(ironSourceError.getErrorCode())}, new Object[]{"reason", ironSourceError.getErrorMessage()}});
|
|
this.p.onRewardedVideoAdShowFailed(l(), ironSourceError);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAdStarted() {
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAdVisible() {
|
|
IronLog.ADAPTER_CALLBACK.verbose("instance name= " + h());
|
|
a(1206, new Object[0][]);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoAvailabilityChanged(boolean z) {
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoInitFailed(IronSourceError ironSourceError) {
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoInitSuccess() {
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoLoadFailed(IronSourceError ironSourceError) {
|
|
IronLog.ADAPTER_CALLBACK.verbose("error=" + ironSourceError.getErrorMessage() + "instance name= " + h() + " state=" + k());
|
|
a(j.c.d, new Object[][]{new Object[]{"errorCode", Integer.valueOf(ironSourceError.getErrorCode())}, new Object[]{"reason", ironSourceError.getErrorMessage()}, new Object[]{IronSourceConstants.EVENTS_DURATION, Long.valueOf(ta.a(this.o))}});
|
|
a(ironSourceError);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener
|
|
public void onRewardedVideoLoadSuccess() {
|
|
IronLog.ADAPTER_CALLBACK.verbose("instance name= " + h() + " state=" + k());
|
|
p();
|
|
a(j.c.c, new Object[][]{new Object[]{IronSourceConstants.EVENTS_DURATION, Long.valueOf(ta.a(this.o))}});
|
|
if (a(m.a.LOAD_IN_PROGRESS, m.a.LOADED)) {
|
|
a(1002, new Object[][]{new Object[]{IronSourceConstants.EVENTS_DURATION, Long.valueOf(ta.a(this.n))}});
|
|
a(this.q.c(), IronSourceUtils.getCurrentMethodName());
|
|
this.p.onRewardedVideoAdLoadSuccess(l());
|
|
}
|
|
}
|
|
}
|