VegeFruits v7.1版本的 MD5 值为:2ff167dfba698c783e879938fe00b9ce
以下内容为反编译后的 SupersonicAdsAdapter.java 源代码,内容仅作参考
package com.ironsource.adapters.supersonicads;
import android.app.Activity;
import android.text.TextUtils;
import com.ironsource.mediationsdk.AbstractAdapter;
import com.ironsource.mediationsdk.IronSource;
import com.ironsource.mediationsdk.IronSourceObject;
import com.ironsource.mediationsdk.config.AbstractAdapterConfig;
import com.ironsource.mediationsdk.config.ConfigValidationResult;
import com.ironsource.mediationsdk.logger.IronSourceError;
import com.ironsource.mediationsdk.logger.IronSourceLogger;
import com.ironsource.mediationsdk.logger.IronSourceLoggerManager;
import com.ironsource.mediationsdk.model.Placement;
import com.ironsource.mediationsdk.sdk.InternalOfferwallApi;
import com.ironsource.mediationsdk.sdk.InternalOfferwallListener;
import com.ironsource.mediationsdk.sdk.InterstitialManagerListener;
import com.ironsource.mediationsdk.sdk.OfferwallListener;
import com.ironsource.mediationsdk.sdk.RewardedVideoManagerListener;
import com.ironsource.mediationsdk.utils.ErrorBuilder;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.ironsource.mediationsdk.utils.IronSourceUtils;
import com.ironsource.sdk.SSAFactory;
import com.ironsource.sdk.SSAPublisher;
import com.ironsource.sdk.data.AdUnitsReady;
import com.ironsource.sdk.listeners.OnInterstitialListener;
import com.ironsource.sdk.listeners.OnOfferWallListener;
import com.ironsource.sdk.listeners.OnRewardedVideoListener;
import com.ironsource.sdk.utils.Constants;
import com.ironsource.sdk.utils.SDKUtils;
import java.util.HashMap;
import java.util.Map;
class SupersonicAdsAdapter extends AbstractAdapter implements InternalOfferwallApi, OnOfferWallListener, OnInterstitialListener, OnRewardedVideoListener {
private final String ITEM_SIGNATURE;
private final String OW_PLACEMENT_ID;
private final String SDK_PLUGIN_TYPE;
private final String TIMESTAMP;
private final String VERSION;
private DemandSourceConfig mAdapterConfig;
private InterstitialManagerListener mInterstitialManager;
private InternalOfferwallListener mOfferwallListener;
private RewardedVideoManagerListener mRewardedVideoManager;
private SSAPublisher mSSAPublisher;
public static SupersonicAdsAdapter startAdapter(String providerName, String providerUrl) {
return new SupersonicAdsAdapter(providerName, providerUrl);
}
private SupersonicAdsAdapter(String providerName, String providerUrl) {
super(providerName, providerUrl);
this.VERSION = "6.6.2.1";
this.TIMESTAMP = "timestamp";
this.ITEM_SIGNATURE = "itemSignature";
this.SDK_PLUGIN_TYPE = "SDKPluginType";
this.OW_PLACEMENT_ID = "placementId";
this.mAdapterConfig = new DemandSourceConfig(providerName);
SDKUtils.setControllerUrl(this.mAdapterConfig.getRVDynamicControllerUrl());
if (isAdaptersDebugEnabled()) {
SDKUtils.setDebugMode(0);
} else {
SDKUtils.setDebugMode(this.mAdapterConfig.getRVDebugMode());
}
SDKUtils.setControllerConfig(this.mAdapterConfig.getRVControllerConfig());
}
@Override
protected AbstractAdapterConfig getConfig() {
return this.mAdapterConfig;
}
@Override
public int getMaxAdsPerSession(IronSource.AD_UNIT adUnit) {
switch (adUnit) {
case REWARDED_VIDEO:
return this.mAdapterConfig.getMaxRewardedVideosPerSession();
case INTERSTITIAL:
return this.mAdapterConfig.getMaxInterstitialsPerSession();
case OFFERWALL:
default:
return 0;
case BANNER:
return this.mAdapterConfig.getMaxBannersPerSession();
}
}
@Override
public int getMaxRVAdsPerIteration() {
return this.mAdapterConfig.getMaxRVAdsPerIteration();
}
@Override
public int getMaxISAdsPerIteration() {
return this.mAdapterConfig.getMaxISAdsPerIteration();
}
@Override
public String getVersion() {
return "6.6.2.1";
}
@Override
public String getCoreSDKVersion() {
return SDKUtils.getSDKVersion();
}
private HashMap<String, String> getGenenralExtraParams() {
HashMap<String, String> params = new HashMap<>();
DemandSourceConfig config = this.mAdapterConfig;
String ageGroup = config.getRVUserAgeGroup();
if (!TextUtils.isEmpty(ageGroup)) {
params.put("applicationUserAgeGroup", ageGroup);
}
String uGender = config.getRVUserGender();
if (!TextUtils.isEmpty(uGender)) {
params.put("applicationUserGender", uGender);
}
String pluginType = getPluginType();
if (!TextUtils.isEmpty(pluginType)) {
params.put("SDKPluginType", pluginType);
}
return params;
}
public HashMap<String, String> getRewardedVideoExtraParams() {
HashMap<String, String> rvExtraParams = getGenenralExtraParams();
DemandSourceConfig config = this.mAdapterConfig;
String language = config.getLanguage();
if (!TextUtils.isEmpty(language)) {
rvExtraParams.put("language", language);
}
String maxVideoLength = config.getMaxVideoLength();
if (!TextUtils.isEmpty(maxVideoLength)) {
rvExtraParams.put("maxVideoLength", maxVideoLength);
}
String campaignId = config.getCampaignId();
if (!TextUtils.isEmpty(campaignId)) {
rvExtraParams.put("campaignId", campaignId);
}
String segment = config.getMediationSegment();
if (!TextUtils.isEmpty(segment)) {
rvExtraParams.put("custom_Segment", segment);
}
addItemNameCountSignature(rvExtraParams);
Map<String, String> customParams = SupersonicConfig.getConfigObj().getRewardedVideoCustomParams();
if (customParams != null && !customParams.isEmpty()) {
rvExtraParams.putAll(customParams);
}
return rvExtraParams;
}
public HashMap<String, String> getInterstitialExtraParams() {
return getGenenralExtraParams();
}
public HashMap<String, String> getOfferwallExtraParams() {
HashMap<String, String> owExtraParams = getGenenralExtraParams();
String language = this.mAdapterConfig.getLanguage();
if (!TextUtils.isEmpty(language)) {
owExtraParams.put("language", language);
}
boolean clientSideCallbacks = SupersonicConfig.getConfigObj().getClientSideCallbacks();
owExtraParams.put(Constants.ParametersKeys.USE_CLIENT_SIDE_CALLBACKS, String.valueOf(clientSideCallbacks));
Map<String, String> customParams = SupersonicConfig.getConfigObj().getOfferwallCustomParams();
if (customParams != null && !customParams.isEmpty()) {
owExtraParams.putAll(customParams);
}
addItemNameCountSignature(owExtraParams);
return owExtraParams;
}
private void addItemNameCountSignature(HashMap<String, String> params) {
try {
String itemName = this.mAdapterConfig.getItemName();
int itemCount = this.mAdapterConfig.getItemCount();
String privateKey = this.mAdapterConfig.getPrivateKey();
boolean shouldAddSignature = true;
if (TextUtils.isEmpty(itemName)) {
shouldAddSignature = false;
} else {
params.put("itemName", itemName);
}
if (TextUtils.isEmpty(privateKey)) {
shouldAddSignature = false;
}
if (itemCount == -1) {
shouldAddSignature = false;
} else {
params.put("itemCount", String.valueOf(itemCount));
}
if (shouldAddSignature) {
int timestamp = IronSourceUtils.getCurrentTimestamp();
params.put("timestamp", String.valueOf(timestamp));
params.put("itemSignature", createItemSig(timestamp, itemName, itemCount, privateKey));
}
} catch (Exception e) {
IronSourceLoggerManager.getLogger().logException(IronSourceLogger.IronSourceTag.ADAPTER_API, " addItemNameCountSignature", e);
}
}
private String createItemSig(int timestamp, String itemName, int itemCount, String privateKey) {
return IronSourceUtils.getMD5(timestamp + itemName + itemCount + privateKey);
}
private String createMinimumOfferCommissionSig(double min, String privateKey) {
return IronSourceUtils.getMD5(min + privateKey);
}
private String createUserCreationDateSig(String userid, String uCreationDate, String privateKey) {
return IronSourceUtils.getMD5(userid + uCreationDate + privateKey);
}
@Override
public void initRewardedVideo(final Activity activity, final String appKey, final String userId) {
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":initRewardedVideo(userId:" + userId + ")", 1);
this.mRewardedVideoHelper.reset();
ConfigValidationResult validationResult = validateConfigBeforeInitAndCallAvailabilityChangedForInvalid(this.mAdapterConfig, this.mRewardedVideoManager);
if (validationResult.isValid()) {
startRVTimer(this.mRewardedVideoManager);
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
SupersonicAdsAdapter.this.mSSAPublisher = SSAFactory.getPublisherInstance(activity);
HashMap<String, String> rewardedVideoExtraParams = SupersonicAdsAdapter.this.getRewardedVideoExtraParams();
SupersonicAdsAdapter.this.log(IronSourceLogger.IronSourceTag.ADAPTER_API, SupersonicAdsAdapter.this.getProviderName() + ":initRewardedVideo(appKey:" + appKey + ", userId:" + userId + ", demandSource: " + SupersonicAdsAdapter.this.getProviderName() + ", extraParams:" + rewardedVideoExtraParams + ")", 1);
SupersonicAdsAdapter.this.mSSAPublisher.initRewardedVideo(appKey, userId, SupersonicAdsAdapter.this.getProviderName(), rewardedVideoExtraParams, SupersonicAdsAdapter.this);
}
});
}
}
@Override
public void onPause(Activity activity) {
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":onPause()", 1);
if (this.mSSAPublisher != null) {
this.mSSAPublisher.onPause(activity);
}
}
@Override
public void setAge(int age) {
this.mAdapterConfig.setUserAgeGroup(age);
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":setAge(age:" + age + ")", 1);
}
@Override
public void setGender(String gender) {
this.mAdapterConfig.setUserGender(gender);
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":setGender(gender:" + gender + ")", 1);
}
@Override
public void setMediationSegment(String segment) {
this.mAdapterConfig.setMediationSegment(segment);
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":setMediationSegment(segment:" + segment + ")", 1);
}
@Override
public void onResume(Activity activity) {
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":onResume()", 1);
if (this.mSSAPublisher != null) {
this.mSSAPublisher.onResume(activity);
}
}
@Override
public synchronized boolean isRewardedVideoAvailable() {
boolean availability;
availability = this.mRewardedVideoHelper.isVideoAvailable();
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":isRewardedVideoAvailable():" + availability, 1);
return availability;
}
@Override
public void setRewardedVideoListener(RewardedVideoManagerListener rewardedVideoManager) {
this.mRewardedVideoManager = rewardedVideoManager;
}
@Override
public void showRewardedVideo() {
}
@Override
public void showRewardedVideo(String placementName) {
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":showRewardedVideo(placement:" + placementName + ")", 1);
if (this.mSSAPublisher != null) {
this.mSSAPublisher.showRewardedVideo(getProviderName());
this.mRewardedVideoHelper.setPlacementName(placementName);
return;
}
boolean shouldNotify = this.mRewardedVideoHelper.setVideoAvailability(false);
log(IronSourceLogger.IronSourceTag.NATIVE, "Please call init before calling showRewardedVideo", 2);
this.mRewardedVideoManager.onRewardedVideoAdShowFailed(new IronSourceError(IronSourceError.ERROR_CODE_NO_ADS_TO_SHOW, "Please call init before calling showRewardedVideo"), this);
if (this.mRewardedVideoManager != null && shouldNotify) {
this.mRewardedVideoManager.onRewardedVideoAvailabilityChanged(this.mRewardedVideoHelper.isVideoAvailable(), this);
}
}
@Override
public void onRVNoMoreOffers() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onRVNoMoreOffers ", 1);
cancelRVTimer();
boolean shouldNotify = this.mRewardedVideoHelper.setVideoAvailability(false);
if (this.mRewardedVideoManager != null && shouldNotify) {
this.mRewardedVideoManager.onRewardedVideoAvailabilityChanged(this.mRewardedVideoHelper.isVideoAvailable(), this);
}
}
@Override
public void onRVInitSuccess(AdUnitsReady aur) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onRVInitSuccess ", 1);
cancelRVTimer();
int numOfAdUnits = 0;
try {
numOfAdUnits = Integer.parseInt(aur.getNumOfAdUnits());
} catch (NumberFormatException e) {
IronSourceLoggerManager.getLogger().logException(IronSourceLogger.IronSourceTag.NATIVE, "onRVInitSuccess:parseInt()", e);
}
boolean availability = numOfAdUnits > 0;
boolean shouldNotify = this.mRewardedVideoHelper.setVideoAvailability(availability);
if (this.mRewardedVideoManager != null && shouldNotify) {
this.mRewardedVideoManager.onRewardedVideoAvailabilityChanged(this.mRewardedVideoHelper.isVideoAvailable(), this);
}
}
@Override
public void onRVInitFail(String error) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onRVInitFail ", 1);
cancelRVTimer();
boolean shouldNotify = this.mRewardedVideoHelper.setVideoAvailability(false);
if (shouldNotify && this.mRewardedVideoManager != null) {
this.mRewardedVideoManager.onRewardedVideoAvailabilityChanged(this.mRewardedVideoHelper.isVideoAvailable(), this);
}
}
@Override
public void onRVAdClicked() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onRVAdClicked ", 1);
}
@Override
public void onRVShowFail(String error) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onRVShowFail ", 1);
if (this.mRewardedVideoManager != null) {
this.mRewardedVideoManager.onRewardedVideoAdShowFailed(new IronSourceError(IronSourceError.ERROR_CODE_NO_ADS_TO_SHOW, error), this);
}
}
@Override
public void onRVAdCredited(int amount) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onRVAdCredited ", 1);
if (this.mRewardedVideoManager != null) {
Placement placement = this.mRewardedVideoConfig.getRewardedVideoPlacement(this.mRewardedVideoHelper.getPlacementName());
this.mRewardedVideoManager.onRewardedVideoAdRewarded(placement, this);
}
}
@Override
public void onRVAdClosed() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onRVAdClosed ", 1);
if (this.mRewardedVideoManager != null) {
this.mRewardedVideoManager.onRewardedVideoAdClosed(this);
}
}
@Override
public void onRVAdOpened() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onRVAdOpened ", 1);
if (this.mRewardedVideoManager != null) {
this.mRewardedVideoManager.onRewardedVideoAdOpened(this);
}
}
@Override
public void getOfferwallCredits() {
if (this.mSSAPublisher != null) {
String appKey = IronSourceObject.getInstance().getIronSourceAppKey();
String userId = IronSourceObject.getInstance().getIronSourceUserId();
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":getOfferwallCredits(appKey:" + appKey + "userId:" + userId + ")", 1);
this.mSSAPublisher.getOfferWallCredits(appKey, userId, this);
return;
}
log(IronSourceLogger.IronSourceTag.NATIVE, "Please call init before calling getOfferwallCredits", 2);
}
@Override
public void setOfferwallListener(OfferwallListener owListener) {
}
@Override
public void setInternalOfferwallListener(InternalOfferwallListener listener) {
this.mOfferwallListener = listener;
}
@Override
public void initOfferwall(final Activity activity, final String appKey, final String userId) {
try {
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":initOfferwall(appKey:" + appKey + ", userId:" + userId + ")", 1);
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
Map<String, String> offerwallExtraParams = SupersonicAdsAdapter.this.getOfferwallExtraParams();
SupersonicAdsAdapter.this.mSSAPublisher = SSAFactory.getPublisherInstance(activity);
SupersonicAdsAdapter.this.mSSAPublisher.initOfferWall(appKey, userId, offerwallExtraParams, SupersonicAdsAdapter.this);
}
});
} catch (Exception e) {
IronSourceLoggerManager.getLogger().logException(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":initOfferwall(userId:" + userId + ")", e);
this.mOfferwallListener.onOfferwallAvailable(false, ErrorBuilder.buildInitFailedError("Adapter initialization failure - " + getProviderName() + " - " + e.getMessage(), IronSourceConstants.OFFERWALL_AD_UNIT));
}
}
@Override
public void showOfferwall() {
}
@Override
public void showOfferwall(String placementId) {
Map<String, String> offerwallExtraParams = getOfferwallExtraParams();
if (offerwallExtraParams != null) {
offerwallExtraParams.put("placementId", placementId);
}
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":showOfferwall(extraParams:" + offerwallExtraParams + ")", 1);
if (this.mSSAPublisher != null) {
this.mSSAPublisher.showOfferWall(offerwallExtraParams);
} else {
log(IronSourceLogger.IronSourceTag.NATIVE, "Please call init before calling showOfferwall", 2);
}
}
@Override
public boolean isOfferwallAvailable() {
return true;
}
@Override
public void onOWShowSuccess(String placementId) {
if (TextUtils.isEmpty(placementId)) {
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":onOWShowSuccess()", 1);
} else {
log(IronSourceLogger.IronSourceTag.ADAPTER_API, getProviderName() + ":onOWShowSuccess(placementId:" + placementId + ")", 1);
}
if (this.mOfferwallListener != null) {
this.mOfferwallListener.onOfferwallOpened();
}
}
@Override
public void onOWShowFail(String desc) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onOWShowFail ", 1);
if (this.mOfferwallListener != null) {
IronSourceError sse = ErrorBuilder.buildGenericError(desc);
this.mOfferwallListener.onOfferwallShowFailed(sse);
}
}
@Override
public void onOWGeneric(String arg0, String arg1) {
}
@Override
public boolean onOWAdCredited(int credits, int totalCredits, boolean totalCreditsFlag) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onOWAdCredited ", 1);
return this.mOfferwallListener != null && this.mOfferwallListener.onOfferwallAdCredited(credits, totalCredits, totalCreditsFlag);
}
@Override
public void onOWAdClosed() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onOWAdClosed ", 1);
if (this.mOfferwallListener != null) {
this.mOfferwallListener.onOfferwallClosed();
}
}
@Override
public void onGetOWCreditsFailed(String desc) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onGetOWCreditsFailed ", 1);
if (this.mOfferwallListener != null) {
IronSourceError sse = ErrorBuilder.buildGenericError(desc);
this.mOfferwallListener.onGetOfferwallCreditsFailed(sse);
}
}
@Override
public void onOfferwallInitSuccess() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onOfferwallInitSuccess ", 1);
if (this.mOfferwallListener != null) {
this.mOfferwallListener.onOfferwallAvailable(true);
}
}
@Override
public void onOfferwallInitFail(String description) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onOfferwallInitFail ", 1);
if (this.mOfferwallListener != null) {
IronSourceError sse = ErrorBuilder.buildGenericError(description);
this.mOfferwallListener.onOfferwallAvailable(false, sse);
}
}
@Override
public void setInterstitialListener(InterstitialManagerListener manager) {
this.mInterstitialManager = manager;
}
@Override
public void initInterstitial(final Activity activity, final String appKey, final String userId) {
ConfigValidationResult validationResult = validateConfigBeforeInitAndCallInitFailForInvalid(this.mAdapterConfig, this.mInterstitialManager);
if (validationResult.isValid()) {
startISInitTimer(this.mInterstitialManager);
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
SupersonicAdsAdapter.this.mSSAPublisher = SSAFactory.getPublisherInstance(activity);
HashMap<String, String> interstitialExtraParams = SupersonicAdsAdapter.this.getInterstitialExtraParams();
SupersonicAdsAdapter.this.log(IronSourceLogger.IronSourceTag.ADAPTER_API, SupersonicAdsAdapter.this.getProviderName() + ":initInterstitial(appKey:" + appKey + ", userId:" + userId + ", extraParams:" + interstitialExtraParams + ")", 1);
SupersonicAdsAdapter.this.mSSAPublisher.initInterstitial(appKey, userId, interstitialExtraParams, SupersonicAdsAdapter.this);
}
});
}
}
@Override
public void loadInterstitial() {
startISLoadTimer(this.mInterstitialManager);
if (this.mSSAPublisher != null) {
this.mSSAPublisher.loadInterstitial();
} else {
log(IronSourceLogger.IronSourceTag.NATIVE, "Please call initInterstitial before calling loadInterstitial", 2);
}
}
@Override
public void showInterstitial() {
}
@Override
public void showInterstitial(String placementName) {
if (this.mSSAPublisher != null) {
this.mSSAPublisher.showInterstitial();
} else {
log(IronSourceLogger.IronSourceTag.NATIVE, "Please call loadInterstitial before calling showInterstitial", 2);
}
}
@Override
public boolean isInterstitialReady() {
return this.mSSAPublisher != null && this.mSSAPublisher.isInterstitialAdAvailable();
}
@Override
public void onInterstitialInitSuccess() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialInitSuccess ", 1);
cancelISInitTimer();
if (this.mInterstitialManager != null) {
this.mInterstitialManager.onInterstitialInitSuccess(this);
}
}
@Override
public void onInterstitialInitFailed(String description) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialInitFailed ", 1);
cancelISInitTimer();
if (this.mInterstitialManager != null) {
this.mInterstitialManager.onInterstitialInitFailed(ErrorBuilder.buildInitFailedError("Adapter initialization failure - " + getProviderName() + " - " + description, "Interstitial"), this);
}
}
@Override
public void onInterstitialLoadSuccess() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialLoadSuccess ", 1);
cancelISLoadTimer();
if (this.mInterstitialManager != null) {
this.mInterstitialManager.onInterstitialAdReady(this);
}
}
@Override
public void onInterstitialLoadFailed(String description) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialAdLoadFailed ", 1);
cancelISLoadTimer();
if (this.mInterstitialManager != null) {
String errorString = "Interstitial Load Fail, " + getProviderName() + " - " + description;
IronSourceError error = ErrorBuilder.buildLoadFailedError(errorString);
this.mInterstitialManager.onInterstitialAdLoadFailed(error, this);
}
}
@Override
public void onInterstitialOpen() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialAdOpened ", 1);
if (this.mInterstitialManager != null) {
this.mInterstitialManager.onInterstitialAdOpened(this);
}
}
@Override
public void onInterstitialClose() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialAdClosed ", 1);
if (this.mInterstitialManager != null) {
this.mInterstitialManager.onInterstitialAdClosed(this);
}
}
@Override
public void onInterstitialShowSuccess() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialAdShowSucceeded ", 1);
if (this.mInterstitialManager != null) {
this.mInterstitialManager.onInterstitialAdShowSucceeded(this);
}
}
@Override
public void onInterstitialShowFailed(String description) {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialAdShowFailed ", 1);
if (this.mInterstitialManager != null) {
this.mInterstitialManager.onInterstitialAdShowFailed(ErrorBuilder.buildShowFailedError("Interstitial", description), this);
}
}
@Override
public void onInterstitialClick() {
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.INTERNAL, getProviderName() + " :onInterstitialAdClicked ", 1);
if (this.mInterstitialManager != null) {
this.mInterstitialManager.onInterstitialAdClicked(this);
}
}
}