package com.igaworks.ssp.part.custom; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.applovin.mediation.MaxAdFormat; import com.applovin.mediation.MaxReward; import com.applovin.mediation.adapter.MaxAdViewAdapter; import com.applovin.mediation.adapter.MaxAdapter; import com.applovin.mediation.adapter.MaxInterstitialAdapter; import com.applovin.mediation.adapter.MaxRewardedAdapter; import com.applovin.mediation.adapter.listeners.MaxAdViewAdapterListener; import com.applovin.mediation.adapter.listeners.MaxInterstitialAdapterListener; import com.applovin.mediation.adapter.listeners.MaxNativeAdAdapterListener; import com.applovin.mediation.adapter.listeners.MaxRewardedAdapterListener; import com.applovin.mediation.adapter.parameters.MaxAdapterInitializationParameters; import com.applovin.mediation.adapter.parameters.MaxAdapterResponseParameters; import com.applovin.mediation.adapters.MediationAdapterBase; import com.applovin.mediation.nativeAds.MaxNativeAd; import com.applovin.sdk.AppLovinSdk; import com.igaworks.ssp.AdPopcornSSP; import com.igaworks.ssp.AdSize; import com.igaworks.ssp.SSPErrorCode; import com.igaworks.ssp.SdkInitListener; import com.igaworks.ssp.common.AdPopcornSSPUpdateLog; import com.igaworks.ssp.part.banner.AdPopcornSSPBannerAd; import com.igaworks.ssp.part.banner.listener.IBannerEventCallbackListener; import com.igaworks.ssp.part.interstitial.AdPopcornSSPInterstitialAd; import com.igaworks.ssp.part.interstitial.listener.IInterstitialEventCallbackListener; import com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd; import com.igaworks.ssp.part.nativead.binder.AdFitViewBinder; import com.igaworks.ssp.part.nativead.binder.AdPopcornSSPViewBinder; import com.igaworks.ssp.part.nativead.binder.NAMViewBinder; import com.igaworks.ssp.part.nativead.listener.INativeAdEventCallbackListener; import com.igaworks.ssp.part.video.AdPopcornSSPRewardVideoAd; import com.igaworks.ssp.part.video.listener.IRewardVideoAdEventCallbackListener; import java.util.List; /* loaded from: classes2.dex */ public class APSSPAppLovinCustomAdapter extends MediationAdapterBase implements MaxInterstitialAdapter, MaxRewardedAdapter, MaxAdViewAdapter { /* renamed from: a, reason: collision with root package name */ private AdPopcornSSPBannerAd f6928a; /* renamed from: b, reason: collision with root package name */ private AdPopcornSSPInterstitialAd f6929b; /* renamed from: c, reason: collision with root package name */ private AdPopcornSSPRewardVideoAd f6930c; /* renamed from: d, reason: collision with root package name */ private AdPopcornSSPNativeAd f6931d; /* renamed from: e, reason: collision with root package name */ private MaxAdViewAdapterListener f6932e; /* renamed from: f, reason: collision with root package name */ private MaxInterstitialAdapterListener f6933f; /* renamed from: g, reason: collision with root package name */ private MaxRewardedAdapterListener f6934g; /* renamed from: h, reason: collision with root package name */ private MaxNativeAdAdapterListener f6935h; /* renamed from: i, reason: collision with root package name */ IBannerEventCallbackListener f6936i; /* renamed from: j, reason: collision with root package name */ IInterstitialEventCallbackListener f6937j; /* renamed from: k, reason: collision with root package name */ IRewardVideoAdEventCallbackListener f6938k; /* renamed from: l, reason: collision with root package name */ INativeAdEventCallbackListener f6939l; class a implements SdkInitListener { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ MaxAdapter.OnCompletionListener f6940a; a(APSSPAppLovinCustomAdapter aPSSPAppLovinCustomAdapter, MaxAdapter.OnCompletionListener onCompletionListener) { this.f6940a = onCompletionListener; } @Override // com.igaworks.ssp.SdkInitListener public void onInitializationFinished() { this.f6940a.onCompletion(MaxAdapter.InitializationStatus.INITIALIZED_SUCCESS, (String) null); } } class b implements IBannerEventCallbackListener { b() { } @Override // com.igaworks.ssp.part.banner.listener.IBannerEventCallbackListener public void OnBannerAdClicked() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnBannerAdClicked"); APSSPAppLovinCustomAdapter.this.log("OnBannerAdClicked"); if (APSSPAppLovinCustomAdapter.this.f6932e != null) { APSSPAppLovinCustomAdapter.this.f6932e.onAdViewAdClicked(); } } @Override // com.igaworks.ssp.part.banner.listener.IBannerEventCallbackListener public void OnBannerAdReceiveFailed(SSPErrorCode sSPErrorCode) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnBannerAdReceiveFailed"); APSSPAppLovinCustomAdapter.this.log("OnBannerAdReceiveFailed : " + sSPErrorCode.getErrorCode() + ", " + sSPErrorCode.getErrorMessage()); if (APSSPAppLovinCustomAdapter.this.f6932e != null) { APSSPAppLovinCustomAdapter.this.f6932e.onAdViewAdLoadFailed(APSSPAppLovinCustomAdapter.b(sSPErrorCode)); } } @Override // com.igaworks.ssp.part.banner.listener.IBannerEventCallbackListener public void OnBannerAdReceiveSuccess() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnBannerAdReceiveSuccess"); APSSPAppLovinCustomAdapter.this.log("OnBannerAdReceiveSuccess"); if (APSSPAppLovinCustomAdapter.this.f6932e != null) { APSSPAppLovinCustomAdapter.this.f6932e.onAdViewAdLoaded(APSSPAppLovinCustomAdapter.this.f6928a); } } } class c implements IInterstitialEventCallbackListener { c() { } @Override // com.igaworks.ssp.part.interstitial.listener.IInterstitialEventCallbackListener public void OnInterstitialClicked() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnInterstitialClicked"); APSSPAppLovinCustomAdapter.this.log("OnInterstitialClicked"); if (APSSPAppLovinCustomAdapter.this.f6933f != null) { APSSPAppLovinCustomAdapter.this.f6933f.onInterstitialAdClicked(); } } @Override // com.igaworks.ssp.part.interstitial.listener.IInterstitialEventCallbackListener public void OnInterstitialClosed(int i10) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnInterstitialClosed"); APSSPAppLovinCustomAdapter.this.log("OnInterstitialClosed"); if (APSSPAppLovinCustomAdapter.this.f6933f != null) { APSSPAppLovinCustomAdapter.this.f6933f.onInterstitialAdHidden(); } } @Override // com.igaworks.ssp.part.interstitial.listener.IInterstitialEventCallbackListener public void OnInterstitialLoaded() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnInterstitialLoaded"); APSSPAppLovinCustomAdapter.this.log("OnInterstitialLoaded"); if (APSSPAppLovinCustomAdapter.this.f6933f != null) { APSSPAppLovinCustomAdapter.this.f6933f.onInterstitialAdLoaded(); } } @Override // com.igaworks.ssp.part.interstitial.listener.IInterstitialEventCallbackListener public void OnInterstitialOpenFailed(SSPErrorCode sSPErrorCode) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnInterstitialOpenFailed"); APSSPAppLovinCustomAdapter.this.log("OnInterstitialOpenFailed"); if (APSSPAppLovinCustomAdapter.this.f6933f != null) { APSSPAppLovinCustomAdapter.this.f6933f.onInterstitialAdDisplayFailed(APSSPAppLovinCustomAdapter.b(sSPErrorCode)); } } @Override // com.igaworks.ssp.part.interstitial.listener.IInterstitialEventCallbackListener public void OnInterstitialOpened() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnInterstitialOpened"); APSSPAppLovinCustomAdapter.this.log("OnInterstitialOpened"); if (APSSPAppLovinCustomAdapter.this.f6933f != null) { APSSPAppLovinCustomAdapter.this.f6933f.onInterstitialAdDisplayed(); } } @Override // com.igaworks.ssp.part.interstitial.listener.IInterstitialEventCallbackListener public void OnInterstitialReceiveFailed(SSPErrorCode sSPErrorCode) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnInterstitialReceiveFailed"); APSSPAppLovinCustomAdapter.this.log("OnInterstitialReceiveFailed : " + sSPErrorCode.getErrorCode() + ", " + sSPErrorCode.getErrorMessage()); if (APSSPAppLovinCustomAdapter.this.f6933f != null) { APSSPAppLovinCustomAdapter.this.f6933f.onInterstitialAdLoadFailed(APSSPAppLovinCustomAdapter.b(sSPErrorCode)); } } } class d implements IRewardVideoAdEventCallbackListener { class a implements MaxReward { a(d dVar) { } public int getAmount() { return 0; } public String getLabel() { return null; } } d() { } @Override // com.igaworks.ssp.part.video.listener.IRewardVideoAdEventCallbackListener public void OnRewardVideoAdClicked() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnRewardVideoAdClicked"); APSSPAppLovinCustomAdapter.this.log("OnRewardVideoAdClicked"); if (APSSPAppLovinCustomAdapter.this.f6934g != null) { APSSPAppLovinCustomAdapter.this.f6934g.onRewardedAdClicked(); } } @Override // com.igaworks.ssp.part.video.listener.IRewardVideoAdEventCallbackListener public void OnRewardVideoAdClosed() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnRewardVideoAdClosed"); APSSPAppLovinCustomAdapter.this.log("OnRewardVideoAdClosed"); if (APSSPAppLovinCustomAdapter.this.f6934g != null) { APSSPAppLovinCustomAdapter.this.f6934g.onRewardedAdHidden(); } } @Override // com.igaworks.ssp.part.video.listener.IRewardVideoAdEventCallbackListener public void OnRewardVideoAdLoadFailed(SSPErrorCode sSPErrorCode) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnRewardVideoAdLoadFailed"); APSSPAppLovinCustomAdapter.this.log("OnRewardVideoAdLoadFailed : " + sSPErrorCode.getErrorCode() + ", " + sSPErrorCode.getErrorMessage()); if (APSSPAppLovinCustomAdapter.this.f6934g != null) { APSSPAppLovinCustomAdapter.this.f6934g.onRewardedAdLoadFailed(APSSPAppLovinCustomAdapter.b(sSPErrorCode)); } } @Override // com.igaworks.ssp.part.video.listener.IRewardVideoAdEventCallbackListener public void OnRewardVideoAdLoaded() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnRewardVideoAdLoaded"); APSSPAppLovinCustomAdapter.this.log("OnRewardVideoAdLoaded"); if (APSSPAppLovinCustomAdapter.this.f6934g != null) { APSSPAppLovinCustomAdapter.this.f6934g.onRewardedAdLoaded(); } } @Override // com.igaworks.ssp.part.video.listener.IRewardVideoAdEventCallbackListener public void OnRewardVideoAdOpenFalied() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnRewardVideoAdOpenFalied"); APSSPAppLovinCustomAdapter.this.log("OnRewardVideoAdOpenFalied"); if (APSSPAppLovinCustomAdapter.this.f6934g != null) { APSSPAppLovinCustomAdapter.this.f6934g.onRewardedAdDisplayFailed(APSSPAppLovinCustomAdapter.b(new SSPErrorCode(SSPErrorCode.NO_REWARD_VIDEO_AD_LOADED))); } } @Override // com.igaworks.ssp.part.video.listener.IRewardVideoAdEventCallbackListener public void OnRewardVideoAdOpened() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnRewardVideoAdOpened"); APSSPAppLovinCustomAdapter.this.log("OnRewardVideoAdOpened"); if (APSSPAppLovinCustomAdapter.this.f6934g != null) { APSSPAppLovinCustomAdapter.this.f6934g.onRewardedAdDisplayed(); } } @Override // com.igaworks.ssp.part.video.listener.IRewardVideoAdEventCallbackListener public void OnRewardVideoPlayCompleted(int i10, boolean z10) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter OnRewardVideoPlayCompleted"); APSSPAppLovinCustomAdapter.this.log("OnRewardVideoPlayCompleted : " + i10 + ", isCompleted : " + z10); if (!z10 || APSSPAppLovinCustomAdapter.this.f6934g == null) { return; } APSSPAppLovinCustomAdapter.this.f6934g.onUserRewarded(new a(this)); } } class e implements INativeAdEventCallbackListener { class a implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ MaxNativeAd f6945a; a(MaxNativeAd maxNativeAd) { this.f6945a = maxNativeAd; } @Override // java.lang.Runnable public void run() { if (APSSPAppLovinCustomAdapter.this.f6935h != null) { APSSPAppLovinCustomAdapter.this.f6935h.onNativeAdLoaded(this.f6945a, (Bundle) null); } } } e() { } @Override // com.igaworks.ssp.part.nativead.listener.INativeAdEventCallbackListener public void onClicked() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter native onClicked"); APSSPAppLovinCustomAdapter.this.log("nativeAd onClicked"); if (APSSPAppLovinCustomAdapter.this.f6935h != null) { APSSPAppLovinCustomAdapter.this.f6935h.onNativeAdClicked(); } } @Override // com.igaworks.ssp.part.nativead.listener.INativeAdEventCallbackListener public void onImpression() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter native onImpression"); APSSPAppLovinCustomAdapter.this.log("nativeAd onImpression"); if (APSSPAppLovinCustomAdapter.this.f6935h != null) { APSSPAppLovinCustomAdapter.this.f6935h.onNativeAdDisplayed((Bundle) null); } } @Override // com.igaworks.ssp.part.nativead.listener.INativeAdEventCallbackListener public void onNativeAdLoadFailed(SSPErrorCode sSPErrorCode) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter onNativeAdLoadFailed"); APSSPAppLovinCustomAdapter.this.log("onNativeAdLoadFailed : " + sSPErrorCode.getErrorCode() + ", " + sSPErrorCode.getErrorMessage()); if (APSSPAppLovinCustomAdapter.this.f6935h != null) { APSSPAppLovinCustomAdapter.this.f6935h.onNativeAdLoadFailed(APSSPAppLovinCustomAdapter.b(sSPErrorCode)); } } @Override // com.igaworks.ssp.part.nativead.listener.INativeAdEventCallbackListener public void onNativeAdLoadSuccess() { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "onNativeAdLoadSuccess"); int currentNetwork = APSSPAppLovinCustomAdapter.this.f6931d != null ? APSSPAppLovinCustomAdapter.this.f6931d.getCurrentNetwork() : -1; if (currentNetwork == 10) { APSSPAppLovinCustomAdapter.this.log("Adfit onNativeAdLoadSuccess"); } else if (currentNetwork == 22) { APSSPAppLovinCustomAdapter.this.log("NAM onNativeAdLoadSuccess"); } else { APSSPAppLovinCustomAdapter.this.log("AdPopcornSSP onNativeAdLoadSuccess"); } new Handler(Looper.getMainLooper()).post(new a(APSSPAppLovinCustomAdapter.this.new f(new MaxNativeAd.Builder()))); } } private class f extends MaxNativeAd { public f(MaxNativeAd.Builder builder) { super(builder); } public boolean prepareForInteraction(List list, ViewGroup viewGroup) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter prepareForInteraction"); AdPopcornSSPNativeAd adPopcornSSPNativeAd = APSSPAppLovinCustomAdapter.this.f6931d; if (adPopcornSSPNativeAd == null) { return true; } viewGroup.addView(adPopcornSSPNativeAd); return super.prepareForInteraction(list, viewGroup); } } public APSSPAppLovinCustomAdapter(AppLovinSdk appLovinSdk) { super(appLovinSdk); this.f6936i = new b(); this.f6937j = new c(); this.f6938k = new d(); this.f6939l = new e(); } private int a(Context context, String str, String str2) { try { return context.getResources().getIdentifier(str2, str, context.getPackageName()); } catch (Exception unused) { return 0; } } /* JADX INFO: Access modifiers changed from: private */ /* JADX WARN: Code restructure failed: missing block: B:22:0x0030, code lost: if (r0 != 5003) goto L31; */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public static com.applovin.mediation.adapter.MaxAdapterError b(com.igaworks.ssp.SSPErrorCode r4) { /* int r0 = r4.getErrorCode() com.applovin.mediation.adapter.MaxAdapterError r1 = com.applovin.mediation.adapter.MaxAdapterError.UNSPECIFIED r2 = 200(0xc8, float:2.8E-43) if (r0 == r2) goto L42 r2 = 1000(0x3e8, float:1.401E-42) if (r0 == r2) goto L3f r2 = 2000(0x7d0, float:2.803E-42) if (r0 == r2) goto L3f r2 = 2030(0x7ee, float:2.845E-42) if (r0 == r2) goto L3f r2 = 3300(0xce4, float:4.624E-42) if (r0 == r2) goto L3c r2 = 5000(0x1388, float:7.006E-42) if (r0 == r2) goto L39 r2 = 5005(0x138d, float:7.013E-42) if (r0 == r2) goto L36 r2 = 5009(0x1391, float:7.019E-42) if (r0 == r2) goto L36 r2 = 9999(0x270f, float:1.4012E-41) if (r0 == r2) goto L42 r2 = 5002(0x138a, float:7.009E-42) if (r0 == r2) goto L33 r2 = 5003(0x138b, float:7.01E-42) if (r0 == r2) goto L36 goto L44 L33: com.applovin.mediation.adapter.MaxAdapterError r1 = com.applovin.mediation.adapter.MaxAdapterError.NO_FILL goto L44 L36: com.applovin.mediation.adapter.MaxAdapterError r1 = com.applovin.mediation.adapter.MaxAdapterError.AD_DISPLAY_FAILED goto L44 L39: com.applovin.mediation.adapter.MaxAdapterError r1 = com.applovin.mediation.adapter.MaxAdapterError.NO_CONNECTION goto L44 L3c: com.applovin.mediation.adapter.MaxAdapterError r1 = com.applovin.mediation.adapter.MaxAdapterError.MISSING_REQUIRED_NATIVE_AD_ASSETS goto L44 L3f: com.applovin.mediation.adapter.MaxAdapterError r1 = com.applovin.mediation.adapter.MaxAdapterError.INVALID_CONFIGURATION goto L44 L42: com.applovin.mediation.adapter.MaxAdapterError r1 = com.applovin.mediation.adapter.MaxAdapterError.INTERNAL_ERROR L44: com.applovin.mediation.adapter.MaxAdapterError r2 = new com.applovin.mediation.adapter.MaxAdapterError int r3 = r1.getErrorCode() java.lang.String r1 = r1.getErrorMessage() java.lang.String r4 = r4.getErrorMessage() r2.(r3, r1, r0, r4) return r2 */ throw new UnsupportedOperationException("Method not decompiled: com.igaworks.ssp.part.custom.APSSPAppLovinCustomAdapter.b(com.igaworks.ssp.SSPErrorCode):com.applovin.mediation.adapter.MaxAdapterError"); } public String getAdapterVersion() { return AdPopcornSSPUpdateLog.SDK_VERSION_NUM + ".0"; } public String getSdkVersion() { return AdPopcornSSPUpdateLog.SDK_VERSION_NUM; } public void initialize(MaxAdapterInitializationParameters maxAdapterInitializationParameters, Activity activity, MaxAdapter.OnCompletionListener onCompletionListener) { if (AdPopcornSSP.isInitialized(activity)) { onCompletionListener.onCompletion(MaxAdapter.InitializationStatus.INITIALIZED_SUCCESS, (String) null); } else { AdPopcornSSP.init(activity, new a(this, onCompletionListener)); } onCompletionListener.onCompletion(MaxAdapter.InitializationStatus.INITIALIZING, (String) null); } public void loadAdViewAd(MaxAdapterResponseParameters maxAdapterResponseParameters, MaxAdFormat maxAdFormat, Activity activity, MaxAdViewAdapterListener maxAdViewAdapterListener) { AdPopcornSSPBannerAd adPopcornSSPBannerAd; com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter loadAdViewAd"); String thirdPartyAdPlacementId = maxAdapterResponseParameters.getThirdPartyAdPlacementId(); String string = maxAdapterResponseParameters.getCustomParameters().getString("appKey"); int i10 = maxAdapterResponseParameters.getCustomParameters().getInt("adSize"); log("loadAdViewAd appKey : " + string + ", placementId : " + thirdPartyAdPlacementId + ", adSize : " + i10); AdPopcornSSPBannerAd adPopcornSSPBannerAd2 = new AdPopcornSSPBannerAd(activity); this.f6928a = adPopcornSSPBannerAd2; adPopcornSSPBannerAd2.setPlacementAppKey(string); this.f6928a.setPlacementId(thirdPartyAdPlacementId); AdSize adSize = AdSize.BANNER_320x50; if (i10 != adSize.getValue()) { adSize = AdSize.BANNER_300x250; if (i10 != adSize.getValue()) { adSize = AdSize.BANNER_320x100; if (i10 != adSize.getValue()) { adPopcornSSPBannerAd = this.f6928a; adSize = AdSize.BANNER_ADAPTIVE_SIZE; adPopcornSSPBannerAd.setAdSize(adSize); this.f6932e = maxAdViewAdapterListener; this.f6928a.setBannerEventCallbackListener(this.f6936i); this.f6928a.loadAd(); } } } adPopcornSSPBannerAd = this.f6928a; adPopcornSSPBannerAd.setAdSize(adSize); this.f6932e = maxAdViewAdapterListener; this.f6928a.setBannerEventCallbackListener(this.f6936i); this.f6928a.loadAd(); } public void loadInterstitialAd(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxInterstitialAdapterListener maxInterstitialAdapterListener) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter loadInterstitialAd"); String thirdPartyAdPlacementId = maxAdapterResponseParameters.getThirdPartyAdPlacementId(); String string = maxAdapterResponseParameters.getCustomParameters().getString("appKey"); log("loadInterstitialAd appKey : " + string + ", placementId : " + thirdPartyAdPlacementId); AdPopcornSSPInterstitialAd adPopcornSSPInterstitialAd = new AdPopcornSSPInterstitialAd(activity); this.f6929b = adPopcornSSPInterstitialAd; adPopcornSSPInterstitialAd.setPlacementAppKey(string); this.f6929b.setPlacementId(thirdPartyAdPlacementId); this.f6933f = maxInterstitialAdapterListener; this.f6929b.setInterstitialEventCallbackListener(this.f6937j); this.f6929b.loadAd(); } public void loadNativeAd(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxNativeAdAdapterListener maxNativeAdAdapterListener) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter loadNativeAd"); String thirdPartyAdPlacementId = maxAdapterResponseParameters.getThirdPartyAdPlacementId(); String string = maxAdapterResponseParameters.getCustomParameters().getString("appKey"); String string2 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdLayoutId"); String string3 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdViewId"); String string4 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdTitleViewId"); String string5 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdDescViewId"); String string6 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdCtaViewId"); String string7 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdIconViewId"); String string8 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdMainViewId"); String string9 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdAdFitViewId"); String string10 = maxAdapterResponseParameters.getCustomParameters().getString("apsspNativeAdNamViewId"); log("loadNativeAd appKey : " + string + ", placementId : " + thirdPartyAdPlacementId); if (string2 == null || string2.length() <= 0) { string2 = "apssp_applovin_custom_adapter_nativead"; } int a10 = a(activity, "layout", string2); com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter nativeAdId : " + a10); log("nativeAdId : " + a10); if (a10 == 0) { if (maxNativeAdAdapterListener != null) { maxNativeAdAdapterListener.onNativeAdLoadFailed(b(new SSPErrorCode(SSPErrorCode.INVALID_NATIVE_ASSETS_CONFIG))); return; } return; } AdPopcornSSPNativeAd adPopcornSSPNativeAd = (AdPopcornSSPNativeAd) ((LayoutInflater) activity.getSystemService("layout_inflater")).inflate(a10, (ViewGroup) null, false); this.f6931d = adPopcornSSPNativeAd; adPopcornSSPNativeAd.setPlacementAppKey(string); this.f6931d.setPlacementId(thirdPartyAdPlacementId); this.f6935h = maxNativeAdAdapterListener; this.f6931d.setNativeAdEventCallbackListener(this.f6939l); int a11 = (string3 == null || string3.length() <= 0) ? a(activity, "id", "apssp_applovin_custom_adapter_nativead_apssp_view_id") : a(activity, "id", string3); com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter apsspNativeViewId : " + a11); log("apsspNativeViewId : " + a11); if (a11 > 0) { int a12 = (string4 == null || string4.length() <= 0) ? a(activity, "id", "apssp_applovin_custom_adapter_nativead_apssp_title_view") : a(activity, "id", string4); int a13 = (string5 == null || string5.length() <= 0) ? a(activity, "id", "apssp_applovin_custom_adapter_nativead_apssp_desc_view") : a(activity, "id", string5); int a14 = (string6 == null || string6.length() <= 0) ? a(activity, "id", "apssp_applovin_custom_adapter_nativead_apssp_cta_view") : a(activity, "id", string6); int a15 = (string7 == null || string7.length() <= 0) ? a(activity, "id", "apssp_applovin_custom_adapter_nativead_apssp_icon_view") : a(activity, "id", string7); int a16 = (string8 == null || string8.length() <= 0) ? a(activity, "id", "apssp_applovin_custom_adapter_nativead_apssp_main_view") : a(activity, "id", string8); AdPopcornSSPViewBinder build = new AdPopcornSSPViewBinder.Builder(a11).build(); if (a12 > 0) { build.titleId = a12; } if (a12 > 0) { build.descId = a13; } if (a12 > 0) { build.callToActionId = a14; } if (a12 > 0) { build.iconImageId = a15; } if (a12 > 0) { build.mainImageId = a16; } this.f6931d.setAdPopcornSSPViewBinder(build); } int a17 = (string9 == null || string9.length() <= 0) ? a(activity, "id", "apssp_applovin_custom_adapter_nativead_adfit_view_id") : a(activity, "id", string9); com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter adFitNativeViewId : " + a17); log("adFitNativeViewId : " + a17); if (a17 > 0) { this.f6931d.setAdFitViewBinder(new AdFitViewBinder.Builder(a17).bizBoardAd(true).build()); } int a18 = a(activity, "id", (string10 == null || string10.length() <= 0) ? "apssp_applovin_custom_adapter_nativead_nam_view_id" : string10); com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter namNativeViewId : " + a18); log("namNativeViewId : " + a18); if (a18 > 0) { this.f6931d.setNamViewBinder(new NAMViewBinder.Builder(a18).useNativeSimpleView(true).build()); } this.f6931d.loadAd(); } public void loadRewardedAd(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxRewardedAdapterListener maxRewardedAdapterListener) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter loadRewardedAd"); String thirdPartyAdPlacementId = maxAdapterResponseParameters.getThirdPartyAdPlacementId(); String string = maxAdapterResponseParameters.getCustomParameters().getString("appKey"); log("loadRewardedAd appKey : " + string + ", placementId : " + thirdPartyAdPlacementId); AdPopcornSSPRewardVideoAd adPopcornSSPRewardVideoAd = new AdPopcornSSPRewardVideoAd(activity); this.f6930c = adPopcornSSPRewardVideoAd; adPopcornSSPRewardVideoAd.setPlacementAppKey(string); this.f6930c.setPlacementId(thirdPartyAdPlacementId); this.f6934g = maxRewardedAdapterListener; this.f6930c.setRewardVideoAdEventCallbackListener(this.f6938k); this.f6930c.loadAd(); } public void onDestroy() { AdPopcornSSPBannerAd adPopcornSSPBannerAd = this.f6928a; if (adPopcornSSPBannerAd != null) { adPopcornSSPBannerAd.stopAd(); this.f6928a = null; } AdPopcornSSPInterstitialAd adPopcornSSPInterstitialAd = this.f6929b; if (adPopcornSSPInterstitialAd != null) { adPopcornSSPInterstitialAd.destroy(); this.f6929b = null; } AdPopcornSSPRewardVideoAd adPopcornSSPRewardVideoAd = this.f6930c; if (adPopcornSSPRewardVideoAd != null) { adPopcornSSPRewardVideoAd.destroy(); this.f6930c = null; } AdPopcornSSPNativeAd adPopcornSSPNativeAd = this.f6931d; if (adPopcornSSPNativeAd != null) { adPopcornSSPNativeAd.destroy(); this.f6931d = null; } } public void showInterstitialAd(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxInterstitialAdapterListener maxInterstitialAdapterListener) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter showInterstitialAd"); log("showInterstitialAd"); AdPopcornSSPInterstitialAd adPopcornSSPInterstitialAd = this.f6929b; if (adPopcornSSPInterstitialAd == null || !adPopcornSSPInterstitialAd.isLoaded()) { maxInterstitialAdapterListener.onInterstitialAdDisplayFailed(b(new SSPErrorCode(SSPErrorCode.NO_INTERSTITIAL_LOADED))); } else { this.f6929b.showAd(); } } public void showRewardedAd(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxRewardedAdapterListener maxRewardedAdapterListener) { com.igaworks.ssp.common.o.m.a.c(Thread.currentThread(), "APSSPAppLovinCustomAdapter showRewardedAd"); log("showRewardedAd"); AdPopcornSSPRewardVideoAd adPopcornSSPRewardVideoAd = this.f6930c; if (adPopcornSSPRewardVideoAd == null || !adPopcornSSPRewardVideoAd.isReady()) { maxRewardedAdapterListener.onRewardedAdDisplayFailed(b(new SSPErrorCode(SSPErrorCode.NO_REWARD_VIDEO_AD_LOADED))); } else { this.f6930c.showAd(); } } }