Files
rr3-apk/decompiled-community/sources/com/ironsource/adapters/ironsource/IronSourceAdapter.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

593 lines
29 KiB
Java

package com.ironsource.adapters.ironsource;
import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;
import com.ironsource.adapters.ironsource.IronSourceLoadParameters;
import com.ironsource.adapters.ironsource.nativeAd.IronSourceNativeAdAdapter;
import com.ironsource.el;
import com.ironsource.environment.ContextProvider;
import com.ironsource.fn;
import com.ironsource.gm;
import com.ironsource.hf;
import com.ironsource.hm;
import com.ironsource.i9;
import com.ironsource.mediationsdk.AbstractAdapter;
import com.ironsource.mediationsdk.ISBannerSize;
import com.ironsource.mediationsdk.IntegrationData;
import com.ironsource.mediationsdk.IronSource;
import com.ironsource.mediationsdk.IronSourceBannerLayout;
import com.ironsource.mediationsdk.LoadWhileShowSupportState;
import com.ironsource.mediationsdk.demandOnly.ISDemandOnlyBannerLayout;
import com.ironsource.mediationsdk.logger.IronLog;
import com.ironsource.mediationsdk.logger.IronSourceError;
import com.ironsource.mediationsdk.p;
import com.ironsource.mediationsdk.sdk.BannerSmashListener;
import com.ironsource.mediationsdk.sdk.InterstitialSmashListener;
import com.ironsource.mediationsdk.sdk.RewardedVideoSmashListener;
import com.ironsource.mediationsdk.utils.ErrorBuilder;
import com.ironsource.mediationsdk.utils.IronSourceUtils;
import com.ironsource.mg;
import com.ironsource.mi;
import com.ironsource.ni;
import com.ironsource.rf;
import com.ironsource.sdk.IronSourceNetwork;
import com.ironsource.sdk.utils.SDKUtils;
import com.ironsource.z0;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class IronSourceAdapter extends AbstractAdapter implements ContextProvider.a {
public static final String IRONSOURCE_BIDDING_TOKEN_KEY = "token";
public static final String IRONSOURCE_ONE_FLOW_KEY = "isOneFlow";
private static final int IS_LOAD_EXCEPTION = 1000;
private static final int IS_SHOW_EXCEPTION = 1001;
private static final int RV_LOAD_EXCEPTION = 1002;
private static final int RV_SHOW_EXCEPTION = 1003;
private static final String VERSION = "8.4.0";
public final String ADM_KEY;
private final String DEMAND_SOURCE_NAME;
private final String DYNAMIC_CONTROLLER_CONFIG;
private final String DYNAMIC_CONTROLLER_DEBUG_MODE;
private final String DYNAMIC_CONTROLLER_URL;
private final String LWS_SUPPORT_STATE;
private final String SDK_PLUGIN_TYPE;
private final String SESSION_ID;
ConcurrentHashMap<String, ArrayList<mi>> mDemandSourceToBnAd;
ConcurrentHashMap<String, mi> mDemandSourceToISAd;
ConcurrentHashMap<String, mi> mDemandSourceToRvAd;
private final hm mNetworkGlobalDataWriter;
private final mg sessionDepthService;
private static AtomicBoolean mDidInitSdk = new AtomicBoolean(false);
private static z0 mBaseAdPlayerExtraParams = new z0();
private IronSourceAdapter(String str) {
super(str);
this.DYNAMIC_CONTROLLER_URL = "controllerUrl";
this.DYNAMIC_CONTROLLER_DEBUG_MODE = "debugMode";
this.DYNAMIC_CONTROLLER_CONFIG = "controllerConfig";
this.SESSION_ID = "sessionid";
this.SDK_PLUGIN_TYPE = gm.a.b;
this.ADM_KEY = "adm";
this.DEMAND_SOURCE_NAME = "demandSourceName";
this.LWS_SUPPORT_STATE = "isSupportedLWS";
this.mNetworkGlobalDataWriter = new hm();
this.sessionDepthService = el.N().k();
this.mDemandSourceToRvAd = new ConcurrentHashMap<>();
this.mDemandSourceToISAd = new ConcurrentHashMap<>();
this.mDemandSourceToBnAd = new ConcurrentHashMap<>();
setNativeAdAdapter(new IronSourceNativeAdAdapter(this));
ContextProvider.getInstance().registerLifeCycleListener(this);
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Code restructure failed: missing block: B:31:0x0066, code lost:
if (r8 != false) goto L40;
*/
/* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private com.ironsource.hf convertBannerSize(android.content.Context r7, com.ironsource.mediationsdk.ISBannerSize r8) {
/*
r6 = this;
java.lang.String r0 = r8.getDescription()
r0.hashCode()
int r1 = r0.hashCode()
r2 = -1
switch(r1) {
case -387072689: goto L3c;
case 72205083: goto L31;
case 79011241: goto L26;
case 1951953708: goto L1b;
case 1999208305: goto L10;
default: goto Lf;
}
Lf:
goto L46
L10:
java.lang.String r1 = "CUSTOM"
boolean r1 = r0.equals(r1)
if (r1 != 0) goto L19
goto L46
L19:
r2 = 4
goto L46
L1b:
java.lang.String r1 = "BANNER"
boolean r1 = r0.equals(r1)
if (r1 != 0) goto L24
goto L46
L24:
r2 = 3
goto L46
L26:
java.lang.String r1 = "SMART"
boolean r1 = r0.equals(r1)
if (r1 != 0) goto L2f
goto L46
L2f:
r2 = 2
goto L46
L31:
java.lang.String r1 = "LARGE"
boolean r1 = r0.equals(r1)
if (r1 != 0) goto L3a
goto L46
L3a:
r2 = 1
goto L46
L3c:
java.lang.String r1 = "RECTANGLE"
boolean r1 = r0.equals(r1)
if (r1 != 0) goto L45
goto L46
L45:
r2 = 0
L46:
r1 = 0
r3 = 90
r4 = 50
r5 = 320(0x140, float:4.48E-43)
switch(r2) {
case 0: goto L69;
case 1: goto L6d;
case 2: goto L5e;
case 3: goto L5c;
case 4: goto L51;
default: goto L50;
}
L50:
return r1
L51:
int r8 = r8.getHeight()
if (r8 == r4) goto L5a
if (r8 == r3) goto L5a
return r1
L5a:
r3 = r8
goto L6d
L5c:
r3 = r4
goto L6d
L5e:
boolean r8 = com.ironsource.mediationsdk.AdapterUtils.isLargeScreen(r7)
if (r8 == 0) goto L66
r5 = 728(0x2d8, float:1.02E-42)
L66:
if (r8 == 0) goto L5c
goto L6d
L69:
r5 = 300(0x12c, float:4.2E-43)
r3 = 250(0xfa, float:3.5E-43)
L6d:
int r8 = com.ironsource.mediationsdk.AdapterUtils.dpToPixels(r7, r5)
int r7 = com.ironsource.mediationsdk.AdapterUtils.dpToPixels(r7, r3)
com.ironsource.hf r1 = new com.ironsource.hf
r1.<init>(r8, r7, r0)
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.ironsource.adapters.ironsource.IronSourceAdapter.convertBannerSize(android.content.Context, com.ironsource.mediationsdk.ISBannerSize):com.ironsource.hf");
}
private mi createBannerAdInstance(String str, hf hfVar, JSONObject jSONObject, LoadAdData loadAdData, BannerSmashListener bannerSmashListener) {
IronLog.ADAPTER_API.verbose("creating banner ad instance for " + str);
return new ni(str, new IronSourceBannerListener(this, bannerSmashListener, str)).a(mBaseAdPlayerExtraParams.get()).a(jSONObject.optInt("instanceType", 2) == 2).c(jSONObject.optBoolean("isOneFlow")).a(hfVar).b(loadAdData.isMultipleAdObjectsFlow()).b(loadAdData.adUnitId()).a();
}
private mi createInterstitialAdInstance(String str, JSONObject jSONObject, LoadAdData loadAdData, InterstitialSmashListener interstitialSmashListener) {
boolean optBoolean = jSONObject.optBoolean("isOneFlow");
boolean z = jSONObject.optInt("instanceType", 2) == 2;
IronLog.ADAPTER_API.verbose("creating ad instance for " + str + " isBidder=" + z);
return new ni(str, new IronSourceInterstitialListener(interstitialSmashListener, str)).a(mBaseAdPlayerExtraParams.get()).c(optBoolean).a(z).b(loadAdData.isMultipleAdObjectsFlow()).b(loadAdData.adUnitId()).a();
}
private mi createRewardedVideoAdInstance(String str, boolean z, JSONObject jSONObject, RewardedVideoSmashListener rewardedVideoSmashListener) {
boolean optBoolean = jSONObject.optBoolean("isOneFlow");
boolean z2 = jSONObject.optInt("instanceType", 2) == 2;
IronLog.ADAPTER_API.verbose("creating ad instance for " + str + " isDemandOnly=" + z + " isBidder=" + z2);
return new ni(str, new IronSourceRewardedVideoListener(rewardedVideoSmashListener, str, z)).a(mBaseAdPlayerExtraParams.get()).c().c(optBoolean).a(z2).a();
}
public static String getAdapterSDKVersion() {
return SDKUtils.getSDKVersion();
}
public static IntegrationData getIntegrationData(Context context) {
return new IntegrationData("IronSource", "8.4.0");
}
private void initInterstitialInternal(String str, JSONObject jSONObject, InterstitialSmashListener interstitialSmashListener, String str2) {
initSDK(str, jSONObject);
interstitialSmashListener.onInterstitialInitSuccess();
}
private void initRewardedVideoInternal(String str, JSONObject jSONObject) {
initSDK(str, jSONObject);
}
private boolean isMultipleAdObjectsFlow(JSONObject jSONObject) {
if (jSONObject == null) {
return false;
}
return jSONObject.optBoolean("isMultipleAdUnits", false);
}
private void loadBannerInternal(Activity activity, ISBannerSize iSBannerSize, JSONObject jSONObject, BannerSmashListener bannerSmashListener, String str, LoadAdData loadAdData) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.ADAPTER_API.verbose("demandSourceName: " + demandSourceName);
try {
hf convertBannerSize = convertBannerSize(ContextProvider.getInstance().getApplicationContext(), iSBannerSize);
if (convertBannerSize == null) {
bannerSmashListener.onBannerAdLoadFailed(ErrorBuilder.unsupportedBannerSize(getProviderName()));
} else {
IronSourceNetwork.loadAdView(activity, createBannerAdInstance(demandSourceName, convertBannerSize, jSONObject, loadAdData, bannerSmashListener), new IronSourceLoadParameters.WithLog(new IronSourceLoadParameters.Base(jSONObject, str)).value());
}
} catch (Exception e) {
i9.d().a(e);
bannerSmashListener.onBannerAdLoadFailed(ErrorBuilder.buildLoadFailedError("Banner Load Fail, " + getProviderName() + " - " + e.getMessage()));
}
}
private void loadInterstitialAdInternal(String str, String str2, JSONObject jSONObject, LoadAdData loadAdData, InterstitialSmashListener interstitialSmashListener) throws Exception {
IronSourceLoadParameters.WithLog withLog = new IronSourceLoadParameters.WithLog(new IronSourceLoadParameters.Base(jSONObject, str2));
mi miVar = this.mDemandSourceToISAd.get(str);
if (miVar == null) {
miVar = createInterstitialAdInstance(str, jSONObject, loadAdData, interstitialSmashListener);
this.mDemandSourceToISAd.put(str, miVar);
}
IronSourceNetwork.loadAd(miVar, withLog.value());
}
private void loadRewardedVideoAdInternal(JSONObject jSONObject, String str, String str2, RewardedVideoSmashListener rewardedVideoSmashListener) throws Exception {
IronSourceLoadParameters.WithLog withLog = new IronSourceLoadParameters.WithLog(new IronSourceLoadParameters.Base(jSONObject, str2));
mi miVar = this.mDemandSourceToRvAd.get(str);
if (miVar == null) {
miVar = createRewardedVideoAdInstance(str, withLog.demandOnly(), jSONObject, rewardedVideoSmashListener);
this.mDemandSourceToRvAd.put(str, miVar);
}
IronSourceNetwork.loadAd(miVar, withLog.value());
}
private void showAdInternal(mi miVar, IronSource.AD_UNIT ad_unit) throws Exception {
int a = this.sessionDepthService.a(ad_unit);
HashMap hashMap = new HashMap();
hashMap.put("sessionDepth", String.valueOf(a));
IronLog.ADAPTER_API.verbose("demandSourceName=" + miVar.g() + " showParams=" + hashMap);
IronSourceNetwork.showAd(ContextProvider.getInstance().getCurrentActiveActivity(), miVar, hashMap);
}
public static IronSourceAdapter startAdapter(String str) {
return new IronSourceAdapter(str);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.BannerAdapterInterface
public void destroyBanner(JSONObject jSONObject) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.ADAPTER_API.verbose(demandSourceName + ": destroyBanner()");
ArrayList<mi> arrayList = this.mDemandSourceToBnAd.get(demandSourceName);
if (arrayList != null) {
try {
Iterator<mi> it = arrayList.iterator();
while (it.hasNext()) {
IronSourceNetwork.destroyAd(it.next());
}
this.mDemandSourceToBnAd.remove(demandSourceName);
} catch (Exception e) {
i9.d().a(e);
IronLog.ADAPTER_API.verbose("destroyBanner failed: " + e.getMessage());
}
}
}
@Override // com.ironsource.mediationsdk.AbstractAdapter
public void earlyInit(String str, String str2, JSONObject jSONObject) {
if (p.m().n() == null) {
IronLog.ADAPTER_API.error("Appkey is null for early init");
return;
}
IronSourceUtils.sendAutomationLog(getDemandSourceName(jSONObject) + ": earlyInit");
initSDK(p.m().n(), jSONObject);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.BannerAdapterInterface
public Map<String, Object> getBannerBiddingData(JSONObject jSONObject, JSONObject jSONObject2) {
return new HashMap();
}
@Override // com.ironsource.mediationsdk.AbstractAdapter
public String getCoreSDKVersion() {
return SDKUtils.getSDKVersion();
}
public String getDemandSourceName(JSONObject jSONObject) {
return !TextUtils.isEmpty(jSONObject.optString("demandSourceName")) ? jSONObject.optString("demandSourceName") : getProviderName();
}
public HashMap<String, String> getInitParams() {
HashMap<String, String> hashMap = new HashMap<>();
String pluginType = getPluginType();
if (!TextUtils.isEmpty(pluginType)) {
hashMap.put(gm.a.b, pluginType);
}
if (!TextUtils.isEmpty(p.m().u())) {
hashMap.put("sessionid", p.m().u());
}
return hashMap;
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.InterstitialAdapterInterface
public Map<String, Object> getInterstitialBiddingData(JSONObject jSONObject, JSONObject jSONObject2) {
return new HashMap();
}
@Override // com.ironsource.mediationsdk.AbstractAdapter
public LoadWhileShowSupportState getLoadWhileShowSupportState(JSONObject jSONObject) {
LoadWhileShowSupportState loadWhileShowSupportState = this.mLWSSupportState;
return (jSONObject == null || !jSONObject.optBoolean("isSupportedLWS")) ? loadWhileShowSupportState : LoadWhileShowSupportState.LOAD_WHILE_SHOW_BY_INSTANCE;
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.RewardedVideoAdapterInterface
public Map<String, Object> getRewardedVideoBiddingData(JSONObject jSONObject, JSONObject jSONObject2) {
return new HashMap();
}
@Override // com.ironsource.mediationsdk.AbstractAdapter
public String getVersion() {
return "8.4.0";
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.RewardedVideoAdapterInterface
public void initAndLoadRewardedVideo(String str, String str2, JSONObject jSONObject, JSONObject jSONObject2, RewardedVideoSmashListener rewardedVideoSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.INTERNAL.verbose("demandSourceName: " + demandSourceName);
initRewardedVideoInternal(str, jSONObject);
loadRewardedVideo(jSONObject, jSONObject2, rewardedVideoSmashListener);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.BannerAdapterInterface
public void initBannerForBidding(String str, String str2, JSONObject jSONObject, BannerSmashListener bannerSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.ADAPTER_API.verbose("demandSourceName: " + demandSourceName);
initSDK(str, jSONObject);
bannerSmashListener.onBannerInitSuccess();
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.InterstitialAdapterInterface
public void initInterstitial(String str, String str2, JSONObject jSONObject, InterstitialSmashListener interstitialSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.INTERNAL.verbose("demandSourceName: " + demandSourceName);
initInterstitialInternal(str, jSONObject, interstitialSmashListener, demandSourceName);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.InterstitialAdapterInterface
public void initInterstitialForBidding(String str, String str2, JSONObject jSONObject, InterstitialSmashListener interstitialSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.INTERNAL.verbose("demandSourceName: " + demandSourceName);
initInterstitialInternal(str, jSONObject, interstitialSmashListener, demandSourceName);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.RewardedVideoAdapterInterface
public void initRewardedVideoForDemandOnly(String str, String str2, JSONObject jSONObject, RewardedVideoSmashListener rewardedVideoSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.INTERNAL.verbose("demandSourceName: " + demandSourceName);
initRewardedVideoInternal(str, jSONObject);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.RewardedVideoAdapterInterface
public void initRewardedVideoWithCallback(String str, String str2, JSONObject jSONObject, RewardedVideoSmashListener rewardedVideoSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.INTERNAL.verbose("demandSourceName: " + demandSourceName);
initRewardedVideoInternal(str, jSONObject);
rewardedVideoSmashListener.onRewardedVideoInitSuccess();
}
public void initSDK(String str, JSONObject jSONObject) {
if (mDidInitSdk.compareAndSet(false, true)) {
String mediationUserId = IronSourceUtils.getMediationUserId();
int optInt = jSONObject.optInt("debugMode", 0);
if (isAdaptersDebugEnabled()) {
optInt = 3;
}
IronLog ironLog = IronLog.ADAPTER_API;
ironLog.verbose("setting debug mode to " + optInt);
SDKUtils.setDebugMode(optInt);
SDKUtils.setControllerUrl(jSONObject.optString("controllerUrl"));
ironLog.verbose("IronSourceNetwork setting controller url to " + jSONObject.optString("controllerUrl"));
JSONObject optJSONObject = jSONObject.optJSONObject("controllerConfig");
String jSONObject2 = optJSONObject != null ? optJSONObject.toString() : "";
SDKUtils.setControllerConfig(jSONObject2);
ironLog.verbose("IronSourceNetwork setting controller config to " + jSONObject2);
HashMap<String, String> initParams = getInitParams();
mBaseAdPlayerExtraParams.a(initParams);
String n = p.m().n();
ironLog.verbose("with appKey=" + n + " userId=" + mediationUserId + " parameters " + initParams);
IronSourceNetwork.addInitListener(new fn() { // from class: com.ironsource.adapters.ironsource.IronSourceAdapter.1
@Override // com.ironsource.fn
public void onFail(rf rfVar) {
IronLog.ADAPTER_API.verbose("OnNetworkSDKInitListener fail - code:" + rfVar.a() + " message:" + rfVar.b());
}
@Override // com.ironsource.fn
public void onSuccess() {
IronLog.ADAPTER_API.verbose("OnNetworkSDKInitListener success");
}
});
IronSourceNetwork.initSDK(ContextProvider.getInstance().getApplicationContext(), n, mediationUserId, initParams);
}
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.InterstitialAdapterInterface
public boolean isInterstitialReady(JSONObject jSONObject) {
mi miVar = this.mDemandSourceToISAd.get(getDemandSourceName(jSONObject));
return miVar != null && IronSourceNetwork.isAdAvailableForInstance(miVar);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.RewardedVideoAdapterInterface
public boolean isRewardedVideoAvailable(JSONObject jSONObject) {
mi miVar = this.mDemandSourceToRvAd.get(getDemandSourceName(jSONObject));
return miVar != null && IronSourceNetwork.isAdAvailableForInstance(miVar);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter
public boolean isUsingActivityBeforeImpression(IronSource.AD_UNIT ad_unit) {
return false;
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.BannerAdapterInterface
public void loadBannerForBidding(JSONObject jSONObject, JSONObject jSONObject2, String str, IronSourceBannerLayout ironSourceBannerLayout, BannerSmashListener bannerSmashListener) {
if (ironSourceBannerLayout != null) {
loadBannerInternal(ironSourceBannerLayout.getActivity(), ironSourceBannerLayout.getSize(), jSONObject, bannerSmashListener, str, new LoadAdData(jSONObject2));
return;
}
bannerSmashListener.onBannerAdLoadFailed(ErrorBuilder.buildLoadFailedError("Banner Load Fail, " + getProviderName() + " - banner is null"));
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.BannerAdapterInterface
public void loadBannerForDemandOnlyForBidding(JSONObject jSONObject, String str, ISDemandOnlyBannerLayout iSDemandOnlyBannerLayout, BannerSmashListener bannerSmashListener) {
if (iSDemandOnlyBannerLayout != null) {
loadBannerInternal(iSDemandOnlyBannerLayout.getActivity(), iSDemandOnlyBannerLayout.getSize(), jSONObject, bannerSmashListener, str, new LoadAdData());
return;
}
bannerSmashListener.onBannerAdLoadFailed(ErrorBuilder.buildLoadFailedError("Banner Load Fail, " + getProviderName() + " - banner is null"));
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.InterstitialAdapterInterface
public void loadInterstitial(JSONObject jSONObject, JSONObject jSONObject2, InterstitialSmashListener interstitialSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.ADAPTER_API.verbose("demandSourceName: " + demandSourceName);
try {
loadInterstitialAdInternal(demandSourceName, null, jSONObject, new LoadAdData(jSONObject2), interstitialSmashListener);
} catch (Exception e) {
i9.d().a(e);
IronLog.ADAPTER_API.error("exception " + e.getMessage());
interstitialSmashListener.onInterstitialAdLoadFailed(new IronSourceError(1000, e.getMessage()));
}
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.InterstitialAdapterInterface
public void loadInterstitialForBidding(JSONObject jSONObject, JSONObject jSONObject2, String str, InterstitialSmashListener interstitialSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.ADAPTER_API.verbose("demandSourceName: " + demandSourceName);
try {
loadInterstitialAdInternal(demandSourceName, str, jSONObject, new LoadAdData(jSONObject2), interstitialSmashListener);
} catch (Exception e) {
i9.d().a(e);
IronLog.ADAPTER_API.error("for bidding exception " + e.getMessage());
interstitialSmashListener.onInterstitialAdLoadFailed(new IronSourceError(1000, e.getMessage()));
}
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.RewardedVideoAdapterInterface
public void loadRewardedVideo(JSONObject jSONObject, JSONObject jSONObject2, RewardedVideoSmashListener rewardedVideoSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.ADAPTER_API.verbose("demandSourceName: " + demandSourceName);
try {
loadRewardedVideoAdInternal(jSONObject, demandSourceName, null, rewardedVideoSmashListener);
} catch (Exception e) {
i9.d().a(e);
IronLog.ADAPTER_API.error("exception " + e.getMessage());
rewardedVideoSmashListener.onRewardedVideoAvailabilityChanged(false);
rewardedVideoSmashListener.onRewardedVideoLoadFailed(new IronSourceError(1002, e.getMessage()));
}
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.RewardedVideoAdapterInterface
public void loadRewardedVideoForBidding(JSONObject jSONObject, JSONObject jSONObject2, String str, RewardedVideoSmashListener rewardedVideoSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.ADAPTER_API.verbose("demandSourceName: " + demandSourceName);
try {
loadRewardedVideoAdInternal(jSONObject, demandSourceName, str, rewardedVideoSmashListener);
} catch (Exception e) {
i9.d().a(e);
IronLog.ADAPTER_API.error("exception " + e.getMessage());
rewardedVideoSmashListener.onRewardedVideoAvailabilityChanged(false);
rewardedVideoSmashListener.onRewardedVideoLoadFailed(new IronSourceError(1002, e.getMessage()));
}
}
@Override // com.ironsource.environment.ContextProvider.a
public void onPause(Activity activity) {
IronLog.ADAPTER_API.verbose("IronSourceNetwork.onPause");
IronSourceNetwork.onPause(activity);
}
@Override // com.ironsource.environment.ContextProvider.a
public void onResume(Activity activity) {
IronLog.ADAPTER_API.verbose("IronSourceNetwork.onResume");
IronSourceNetwork.onResume(activity);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter
public void setConsent(boolean z) {
IronLog ironLog = IronLog.ADAPTER_API;
StringBuilder sb = new StringBuilder();
sb.append("(");
sb.append(z ? "true" : "false");
sb.append(")");
ironLog.verbose(sb.toString());
this.mNetworkGlobalDataWriter.a(z);
}
@Override // com.ironsource.mediationsdk.AbstractAdapter
public void setMetaData(String str, List<String> list) {
if (list.isEmpty()) {
return;
}
mBaseAdPlayerExtraParams.b(str, list.get(0));
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.InterstitialAdapterInterface
public void showInterstitial(JSONObject jSONObject, InterstitialSmashListener interstitialSmashListener) {
String demandSourceName = getDemandSourceName(jSONObject);
IronLog.ADAPTER_API.verbose("demandSourceName: " + demandSourceName);
try {
showAdInternal(this.mDemandSourceToISAd.get(demandSourceName), IronSource.AD_UNIT.INTERSTITIAL);
} catch (Exception e) {
i9.d().a(e);
IronLog.ADAPTER_API.error("exception " + e.getMessage());
interstitialSmashListener.onInterstitialAdShowFailed(new IronSourceError(1001, e.getMessage()));
}
}
@Override // com.ironsource.mediationsdk.AbstractAdapter, com.ironsource.mediationsdk.sdk.RewardedVideoAdapterInterface
public void showRewardedVideo(JSONObject jSONObject, RewardedVideoSmashListener rewardedVideoSmashListener) {
try {
showAdInternal(this.mDemandSourceToRvAd.get(getDemandSourceName(jSONObject)), IronSource.AD_UNIT.REWARDED_VIDEO);
} catch (Exception e) {
i9.d().a(e);
IronLog.ADAPTER_API.error("exception " + e.getMessage());
rewardedVideoSmashListener.onRewardedVideoAdShowFailed(new IronSourceError(1003, e.getMessage()));
}
}
}