- 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
142 lines
6.6 KiB
Java
142 lines
6.6 KiB
Java
package csdk.gluads.ironsource;
|
|
|
|
import android.app.Activity;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import com.ironsource.mediationsdk.IronSource;
|
|
import com.ironsource.mediationsdk.adunit.adapter.utility.AdInfo;
|
|
import com.ironsource.mediationsdk.logger.IronSourceError;
|
|
import com.ironsource.mediationsdk.sdk.LevelPlayInterstitialListener;
|
|
import csdk.gluads.Consts;
|
|
import csdk.gluads.max.EAPlacementListener;
|
|
import java.util.Map;
|
|
import java.util.concurrent.Callable;
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class EAIronSourceInterstitialManager extends EAIronSourceManagerBase {
|
|
private boolean mIsLoadedIgnoreFrequencyCapping;
|
|
private AtomicReference<IntListener> mListener;
|
|
private AtomicReference<String> mLoadingPlacement;
|
|
|
|
@Override // csdk.gluads.ironsource.EAIronSourceManagerBase
|
|
public String adType() {
|
|
return "interstitial";
|
|
}
|
|
|
|
public class IntListener extends EAPlacementListener implements LevelPlayInterstitialListener {
|
|
@Override // com.ironsource.mediationsdk.sdk.LevelPlayInterstitialListener
|
|
public void onAdOpened(AdInfo adInfo) {
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.LevelPlayInterstitialListener
|
|
public void onAdShowSucceeded(AdInfo adInfo) {
|
|
}
|
|
|
|
public IntListener() {
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.LevelPlayInterstitialListener
|
|
public void onAdReady(AdInfo adInfo) {
|
|
EAIronSourceInterstitialManager eAIronSourceInterstitialManager = EAIronSourceInterstitialManager.this;
|
|
eAIronSourceInterstitialManager.sendPlacementEvent(eAIronSourceInterstitialManager.loadingPlacement(), Consts.PLACEMENT_STATUS_LOAD_FINISHED, null, null);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.LevelPlayInterstitialListener
|
|
public void onAdLoadFailed(IronSourceError ironSourceError) {
|
|
IllegalStateException illegalStateException = new IllegalStateException("Failed to load ad: " + ironSourceError.toString());
|
|
EAIronSourceInterstitialManager eAIronSourceInterstitialManager = EAIronSourceInterstitialManager.this;
|
|
eAIronSourceInterstitialManager.sendPlacementEvent(eAIronSourceInterstitialManager.loadingPlacement(), Consts.PLACEMENT_STATUS_LOAD_FINISHED, illegalStateException, null);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.LevelPlayInterstitialListener
|
|
public void onAdClosed(AdInfo adInfo) {
|
|
EAIronSourceInterstitialManager.this.frequencyController().increaseCount(false, showingPlacement());
|
|
EAIronSourceInterstitialManager.this.sendPlacementEvent(showingPlacement(), Consts.PLACEMENT_STATUS_SHOW_FINISHED, null, null);
|
|
setShowingPlacement("");
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.LevelPlayInterstitialListener
|
|
public void onAdShowFailed(IronSourceError ironSourceError, AdInfo adInfo) {
|
|
EAIronSourceInterstitialManager.this.sendPlacementEvent(showingPlacement(), Consts.PLACEMENT_STATUS_SHOW_STARTED, new IllegalStateException("Failed to show ad: " + ironSourceError.toString()), null);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.sdk.LevelPlayInterstitialListener
|
|
public void onAdClicked(AdInfo adInfo) {
|
|
EAIronSourceInterstitialManager.this.sendPlacementEvent(showingPlacement(), Consts.PLACEMENT_STATUS_CLICKED, null, null);
|
|
}
|
|
}
|
|
|
|
public EAIronSourceInterstitialManager(Callable<Activity> callable, Map<String, String> map, Map<String, Object> map2, boolean z, boolean z2) {
|
|
super(callable, map, map2, z);
|
|
this.mLoadingPlacement = new AtomicReference<>();
|
|
AtomicReference<IntListener> atomicReference = new AtomicReference<>(new IntListener());
|
|
this.mListener = atomicReference;
|
|
IronSource.setLevelPlayInterstitialListener(atomicReference.get());
|
|
this.mIsLoadedIgnoreFrequencyCapping = z2;
|
|
}
|
|
|
|
@Override // csdk.gluads.ironsource.EAIronSourceManagerBase
|
|
public void setShowingPlacement(String str) {
|
|
IntListener intListener = this.mListener.get();
|
|
if (intListener != null) {
|
|
intListener.setShowingPlacement(str);
|
|
}
|
|
super.setShowingPlacement(str);
|
|
}
|
|
|
|
public String loadingPlacement() {
|
|
return this.mLoadingPlacement.get();
|
|
}
|
|
|
|
public void setLoadingPlacement(String str) {
|
|
this.mLoadingPlacement.set(str);
|
|
}
|
|
|
|
private boolean isCapped(@NonNull String str) {
|
|
return frequencyController().isLimitReached(str) || IronSource.isInterstitialPlacementCapped(str);
|
|
}
|
|
|
|
@Override // csdk.gluads.ironsource.EAIronSourceManagerBase, csdk.gluads.IAdvertising
|
|
public void destroy() {
|
|
IronSource.setLevelPlayInterstitialListener(null);
|
|
super.destroy();
|
|
}
|
|
|
|
@Override // csdk.gluads.ironsource.EAIronSourceManagerBase, csdk.gluads.IAdvertising
|
|
public boolean isLoaded(@NonNull String str, @NonNull String str2, @Nullable Map<String, Object> map) {
|
|
return IronSource.isInterstitialReady() && (this.mIsLoadedIgnoreFrequencyCapping || !isCapped(str2));
|
|
}
|
|
|
|
@Override // csdk.gluads.ironsource.EAIronSourceManagerBase, csdk.gluads.IAdvertising
|
|
public void load(@NonNull String str, @NonNull String str2, @Nullable Map<String, Object> map) {
|
|
if (str2.equals("IS_debugger")) {
|
|
IronSource.launchTestSuite(this.mActivity.getApplicationContext());
|
|
return;
|
|
}
|
|
if (frequencyController().isLimitReached(str2)) {
|
|
sendPlacementEvent(str2, Consts.PLACEMENT_STATUS_LOAD_FINISHED, new IllegalArgumentException("FrequencyCap limit."), map);
|
|
} else if (isLoaded(str, str2, map)) {
|
|
sendPlacementEvent(str2, Consts.PLACEMENT_STATUS_LOAD_FINISHED, null, map);
|
|
} else {
|
|
setLoadingPlacement(str2);
|
|
IronSource.loadInterstitial();
|
|
}
|
|
}
|
|
|
|
@Override // csdk.gluads.ironsource.EAIronSourceManagerBase, csdk.gluads.IAdvertising
|
|
public void show(@NonNull String str, @NonNull String str2, @Nullable Map<String, Object> map) {
|
|
if (str2.equals("IS_debugger")) {
|
|
IronSource.launchTestSuite(this.mActivity.getApplicationContext());
|
|
} else {
|
|
if (!isLoaded(adType(), str2, map)) {
|
|
sendPlacementEvent(str2, Consts.PLACEMENT_STATUS_SHOW_STARTED, new IllegalStateException("Not ready"), null);
|
|
return;
|
|
}
|
|
setShowingPlacement(str2);
|
|
this.mLog.d("INTERSTITIAL.SHOW", Consts.KEY_TAPJOY_USER_ID_VERSION, str2, "l", Consts.SDK_IRONSOURCE);
|
|
IronSource.showInterstitial(str2);
|
|
}
|
|
}
|
|
}
|