Pixel Fusion v1.0.2版本的 MD5 值为:7c04c460c2996569d4ad075cd671a946
以下内容为反编译后的 BbdcDCacCa.java 源代码,内容仅作参考
package DbdbDaaDDa;
import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.browser.trusted.DaACacB;
import com.applovin.impl.sdk.utils.BundleUtils;
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.MaxAdapterError;
import com.applovin.mediation.adapter.MaxInterstitialAdapter;
import com.applovin.mediation.adapter.MaxNativeAdAdapter;
import com.applovin.mediation.adapter.MaxRewardedAdapter;
import com.applovin.mediation.adapter.MaxSignalProvider;
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.listeners.MaxSignalCollectionListener;
import com.applovin.mediation.adapter.parameters.MaxAdapterInitializationParameters;
import com.applovin.mediation.adapter.parameters.MaxAdapterParameters;
import com.applovin.mediation.adapter.parameters.MaxAdapterResponseParameters;
import com.applovin.mediation.adapter.parameters.MaxAdapterSignalCollectionParameters;
import com.applovin.mediation.adapters.MediationAdapterBase;
import com.applovin.mediation.nativeAds.MaxNativeAd;
import com.applovin.mediation.nativeAds.MaxNativeAdView;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkUtils;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import io.bidmachine.AdsFormat;
import io.bidmachine.BidMachine;
import io.bidmachine.BidTokenCallback;
import io.bidmachine.ImageData;
import io.bidmachine.InitializationCallback;
import io.bidmachine.MediaAssetType;
import io.bidmachine.banner.BannerListener;
import io.bidmachine.banner.BannerRequest;
import io.bidmachine.banner.BannerSize;
import io.bidmachine.banner.BannerView;
import io.bidmachine.interstitial.InterstitialAd;
import io.bidmachine.interstitial.InterstitialListener;
import io.bidmachine.interstitial.InterstitialRequest;
import io.bidmachine.models.AuctionResult;
import io.bidmachine.nativead.NativeAd;
import io.bidmachine.nativead.NativeListener;
import io.bidmachine.nativead.NativeRequest;
import io.bidmachine.nativead.view.NativeMediaView;
import io.bidmachine.rewarded.RewardedAd;
import io.bidmachine.rewarded.RewardedListener;
import io.bidmachine.rewarded.RewardedRequest;
import io.bidmachine.utils.BMError;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
public class BbdcDCacCa extends MediationAdapterBase implements MaxSignalProvider, MaxInterstitialAdapter, MaxRewardedAdapter, MaxAdViewAdapter, MaxNativeAdAdapter {
public static final int f10209CdCaB = 10;
public static final AtomicBoolean f10210cdCCdCc = new AtomicBoolean();
public static MaxAdapter.InitializationStatus f10211dDbCdDC;
public InterstitialAd f10212BbdcDCacCa;
public RewardedAd f10213DAbacDAb;
public NativeAd f10214bBDaADdaAa;
public BannerView f10215babbDABcB;
public class C0104BbdcDCacCa implements InitializationCallback {
public final String f10216BbdcDCacCa;
public final MaxAdapter.OnCompletionListener f10217DAbacDAb;
public C0104BbdcDCacCa(String str, MaxAdapter.OnCompletionListener onCompletionListener) {
this.f10216BbdcDCacCa = str;
this.f10217DAbacDAb = onCompletionListener;
}
@Override
public void onInitialized() {
BbdcDCacCa.this.log("BidMachine SDK successfully finished initialization with source id: " + this.f10216BbdcDCacCa);
MaxAdapter.InitializationStatus unused = BbdcDCacCa.f10211dDbCdDC = MaxAdapter.InitializationStatus.INITIALIZED_SUCCESS;
this.f10217DAbacDAb.onCompletion(BbdcDCacCa.f10211dDbCdDC, (String) null);
}
}
public class CdCaB extends MaxNativeAd {
public CdCaB(MaxNativeAd.Builder builder) {
super(builder);
}
public boolean BbdcDCacCa(List<View> list, ViewGroup viewGroup) {
ImageView imageView;
NativeAd nativeAd = BbdcDCacCa.this.f10214bBDaADdaAa;
if (nativeAd == null) {
BbdcDCacCa.this.e("Failed to register native ad views: native ad is null.");
return false;
}
BbdcDCacCa.this.d("Preparing views for interaction: " + list + " with container: " + viewGroup);
HashSet hashSet = new HashSet(list);
Iterator<View> it = list.iterator();
while (true) {
if (it.hasNext()) {
View next = it.next();
if (next instanceof ImageView) {
imageView = (ImageView) next;
break;
}
} else {
imageView = null;
break;
}
}
nativeAd.registerView(viewGroup, imageView, (NativeMediaView) getMediaView(), hashSet);
return true;
}
public void DAbacDAb(MaxNativeAdView maxNativeAdView) {
ArrayList arrayList = new ArrayList();
if (AppLovinSdkUtils.isValidString(getTitle()) && maxNativeAdView.getTitleTextView() != null) {
arrayList.add(maxNativeAdView.getTitleTextView());
}
if (AppLovinSdkUtils.isValidString(getBody()) && maxNativeAdView.getBodyTextView() != null) {
arrayList.add(maxNativeAdView.getBodyTextView());
}
if (AppLovinSdkUtils.isValidString(getCallToAction()) && maxNativeAdView.getCallToActionButton() != null) {
arrayList.add(maxNativeAdView.getCallToActionButton());
}
ImageView iconImageView = maxNativeAdView.getIconImageView();
if (getIcon() != null && iconImageView != null) {
arrayList.add(iconImageView);
}
if (getMediaView() != null && maxNativeAdView.getMediaContentViewGroup() != null) {
arrayList.add(maxNativeAdView.getMediaContentViewGroup());
}
BbdcDCacCa(arrayList, maxNativeAdView);
}
}
public class DAbacDAb implements BidTokenCallback {
public final MaxSignalCollectionListener f10220BbdcDCacCa;
public DAbacDAb(MaxSignalCollectionListener maxSignalCollectionListener) {
this.f10220BbdcDCacCa = maxSignalCollectionListener;
}
@Override
public void onCollected(@NonNull String str) {
this.f10220BbdcDCacCa.onSignalCollected(str);
}
}
public class bBDaADdaAa implements InterstitialListener {
public final MaxInterstitialAdapterListener f10222BbdcDCacCa;
public bBDaADdaAa(MaxInterstitialAdapterListener maxInterstitialAdapterListener) {
this.f10222BbdcDCacCa = maxInterstitialAdapterListener;
}
@Override
public void onAdClicked(@NonNull InterstitialAd interstitialAd) {
BbdcDCacCa.this.log("Interstitial ad clicked");
this.f10222BbdcDCacCa.onInterstitialAdClicked();
}
@Override
public void onAdLoadFailed(@NonNull InterstitialAd interstitialAd, @NonNull BMError bMError) {
MaxAdapterError cBBdBADc2 = BbdcDCacCa.this.cBBdBADc(bMError);
BbdcDCacCa.this.log("Interstitial ad failed to load with error (" + cBBdBADc2 + AcAaabaA.DCbdcdcCCbc.f1352bBDaADdaAa);
this.f10222BbdcDCacCa.onInterstitialAdLoadFailed(cBBdBADc2);
}
@Override
public void onAdClosed(@NonNull InterstitialAd interstitialAd, boolean z) {
BbdcDCacCa.this.log("Interstitial ad closed");
this.f10222BbdcDCacCa.onInterstitialAdHidden();
}
@Override
public void onAdImpression(@NonNull InterstitialAd interstitialAd) {
BbdcDCacCa.this.log("Interstitial ad impression");
this.f10222BbdcDCacCa.onInterstitialAdDisplayed();
}
@Override
public void onAdExpired(@NonNull InterstitialAd interstitialAd) {
BbdcDCacCa.this.log("Interstitial ad expired");
}
@Override
public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {
Bundle bundle;
BbdcDCacCa.this.log("Interstitial ad loaded");
String BcCcABbc2 = BbdcDCacCa.this.BcCcABbc(interstitialAd.getAuctionResult());
if (!TextUtils.isEmpty(BcCcABbc2)) {
bundle = new Bundle(1);
bundle.putString(CampaignEx.JSON_KEY_CREATIVE_ID, BcCcABbc2);
} else {
bundle = null;
}
this.f10222BbdcDCacCa.onInterstitialAdLoaded(bundle);
}
@Override
public void onAdShowFailed(@NonNull InterstitialAd interstitialAd, @NonNull BMError bMError) {
MaxAdapterError cBBdBADc2 = BbdcDCacCa.this.cBBdBADc(bMError);
BbdcDCacCa.this.log("Interstitial ad failed to show with error (" + cBBdBADc2 + AcAaabaA.DCbdcdcCCbc.f1352bBDaADdaAa);
this.f10222BbdcDCacCa.onInterstitialAdDisplayFailed(cBBdBADc2);
}
}
public class babbDABcB implements BannerListener {
public final MaxAdViewAdapterListener f10224BbdcDCacCa;
public babbDABcB(MaxAdViewAdapterListener maxAdViewAdapterListener) {
this.f10224BbdcDCacCa = maxAdViewAdapterListener;
}
@Override
public void onAdClicked(@NonNull BannerView bannerView) {
BbdcDCacCa.this.log("AdView ad clicked");
this.f10224BbdcDCacCa.onAdViewAdClicked();
}
@Override
public void onAdLoaded(@NonNull BannerView bannerView) {
Bundle bundle;
BbdcDCacCa.this.log("AdView ad loaded");
String BcCcABbc2 = BbdcDCacCa.this.BcCcABbc(bannerView.getAuctionResult());
if (!TextUtils.isEmpty(BcCcABbc2)) {
bundle = new Bundle(1);
bundle.putString(CampaignEx.JSON_KEY_CREATIVE_ID, BcCcABbc2);
} else {
bundle = null;
}
this.f10224BbdcDCacCa.onAdViewAdLoaded(bannerView, bundle);
}
@Override
public void onAdExpired(@NonNull BannerView bannerView) {
BbdcDCacCa.this.log("AdView ad expired");
}
@Override
public void onAdLoadFailed(@NonNull BannerView bannerView, @NonNull BMError bMError) {
MaxAdapterError cBBdBADc2 = BbdcDCacCa.this.cBBdBADc(bMError);
BbdcDCacCa.this.log("AdView ad failed to load with error (" + cBBdBADc2 + AcAaabaA.DCbdcdcCCbc.f1352bBDaADdaAa);
this.f10224BbdcDCacCa.onAdViewAdLoadFailed(cBBdBADc2);
}
@Override
public void onAdImpression(@NonNull BannerView bannerView) {
BbdcDCacCa.this.log("AdView ad impression");
this.f10224BbdcDCacCa.onAdViewAdDisplayed();
}
@Override
public void onAdShowFailed(@NonNull BannerView bannerView, @NonNull BMError bMError) {
MaxAdapterError cBBdBADc2 = BbdcDCacCa.this.cBBdBADc(bMError);
BbdcDCacCa.this.log("Banner ad failed to show with error (" + cBBdBADc2 + AcAaabaA.DCbdcdcCCbc.f1352bBDaADdaAa);
this.f10224BbdcDCacCa.onAdViewAdDisplayFailed(cBBdBADc2);
}
}
public class dDbCdDC implements RewardedListener {
public final MaxRewardedAdapterListener f10235BbdcDCacCa;
public boolean f10236DAbacDAb;
public dDbCdDC(MaxRewardedAdapterListener maxRewardedAdapterListener) {
this.f10235BbdcDCacCa = maxRewardedAdapterListener;
}
@Override
public void onAdClicked(@NonNull RewardedAd rewardedAd) {
BbdcDCacCa.this.log("Rewarded ad clicked");
this.f10235BbdcDCacCa.onRewardedAdClicked();
}
@Override
public void onAdShowFailed(@NonNull RewardedAd rewardedAd, @NonNull BMError bMError) {
MaxAdapterError cBBdBADc2 = BbdcDCacCa.this.cBBdBADc(bMError);
BbdcDCacCa.this.log("Rewarded ad failed to show with error (" + cBBdBADc2 + AcAaabaA.DCbdcdcCCbc.f1352bBDaADdaAa);
this.f10235BbdcDCacCa.onRewardedAdDisplayFailed(cBBdBADc2);
}
@Override
public void onAdLoadFailed(@NonNull RewardedAd rewardedAd, @NonNull BMError bMError) {
MaxAdapterError cBBdBADc2 = BbdcDCacCa.this.cBBdBADc(bMError);
BbdcDCacCa.this.log("Rewarded ad failed to load with error (" + cBBdBADc2 + AcAaabaA.DCbdcdcCCbc.f1352bBDaADdaAa);
this.f10235BbdcDCacCa.onRewardedAdLoadFailed(cBBdBADc2);
}
@Override
public void onAdClosed(@NonNull RewardedAd rewardedAd, boolean z) {
BbdcDCacCa.this.log("Rewarded ad closed");
this.f10235BbdcDCacCa.onRewardedAdVideoCompleted();
if (this.f10236DAbacDAb || BbdcDCacCa.this.shouldAlwaysRewardUser()) {
MaxReward reward = BbdcDCacCa.this.getReward();
BbdcDCacCa.this.log("Rewarded user with reward: " + reward);
this.f10235BbdcDCacCa.onUserRewarded(reward);
}
this.f10235BbdcDCacCa.onRewardedAdHidden();
}
@Override
public void onAdImpression(@NonNull RewardedAd rewardedAd) {
BbdcDCacCa.this.log("Rewarded ad impression");
this.f10235BbdcDCacCa.onRewardedAdDisplayed();
this.f10235BbdcDCacCa.onRewardedAdVideoStarted();
}
@Override
public void onAdExpired(@NonNull RewardedAd rewardedAd) {
BbdcDCacCa.this.log("Rewarded ad expired");
}
@Override
public void onAdLoaded(@NonNull RewardedAd rewardedAd) {
Bundle bundle;
BbdcDCacCa.this.log("Rewarded ad loaded");
String BcCcABbc2 = BbdcDCacCa.this.BcCcABbc(rewardedAd.getAuctionResult());
if (!TextUtils.isEmpty(BcCcABbc2)) {
bundle = new Bundle(1);
bundle.putString(CampaignEx.JSON_KEY_CREATIVE_ID, BcCcABbc2);
} else {
bundle = null;
}
this.f10235BbdcDCacCa.onRewardedAdLoaded(bundle);
}
@Override
public void onAdRewarded(@NonNull RewardedAd rewardedAd) {
BbdcDCacCa.this.log("Rewarded ad should grant reward");
this.f10236DAbacDAb = true;
}
}
public BbdcDCacCa(AppLovinSdk appLovinSdk) {
super(appLovinSdk);
}
public final BannerSize Accbcd(MaxAdFormat maxAdFormat) {
if (maxAdFormat == MaxAdFormat.BANNER) {
return BannerSize.Size_320x50;
}
if (maxAdFormat == MaxAdFormat.LEADER) {
return BannerSize.Size_728x90;
}
if (maxAdFormat == MaxAdFormat.MREC) {
return BannerSize.Size_300x250;
}
throw new IllegalArgumentException("Invalid ad format: " + maxAdFormat);
}
@Nullable
public final String BcCcABbc(@Nullable AuctionResult auctionResult) {
if (auctionResult != null) {
return auctionResult.getCreativeId();
}
return null;
}
public void CCDAD(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxInterstitialAdapterListener maxInterstitialAdapterListener) {
log("Loading interstitial ad...");
DCACcAdddc(maxAdapterResponseParameters);
InterstitialAd interstitialAd = new InterstitialAd(getApplicationContext());
this.f10212BbdcDCacCa = interstitialAd;
interstitialAd.setListener(new bBDaADdaAa(maxInterstitialAdapterListener));
this.f10212BbdcDCacCa.load((InterstitialRequest) ((InterstitialRequest.Builder) new InterstitialRequest.Builder().setBidPayload(maxAdapterResponseParameters.getBidResponse())).build());
}
public void DACCBbdCb(MaxAdapterInitializationParameters maxAdapterInitializationParameters, Activity activity, MaxAdapter.OnCompletionListener onCompletionListener) {
if (f10210cdCCdCc.compareAndSet(false, true)) {
f10211dDbCdDC = MaxAdapter.InitializationStatus.INITIALIZING;
String string = maxAdapterInitializationParameters.getServerParameters().getString("source_id");
log(DaACacB.BbdcDCacCa("Initializing BidMachine SDK with source id: ", string));
BidMachine.setLoggingEnabled(maxAdapterInitializationParameters.isTesting());
BidMachine.setTestMode(maxAdapterInitializationParameters.isTesting());
DCACcAdddc(maxAdapterInitializationParameters);
BidMachine.initialize(getApplicationContext(), string, new C0104BbdcDCacCa(string, onCompletionListener));
return;
}
log("BidMachine SDK is already initialized");
onCompletionListener.onCompletion(f10211dDbCdDC, (String) null);
}
public final void DCACcAdddc(MaxAdapterParameters maxAdapterParameters) {
String str;
Boolean isAgeRestrictedUser = maxAdapterParameters.isAgeRestrictedUser();
if (isAgeRestrictedUser != null) {
BidMachine.setCoppa(isAgeRestrictedUser);
}
Boolean hasUserConsent = maxAdapterParameters.hasUserConsent();
if (hasUserConsent != null) {
BidMachine.setConsentConfig(hasUserConsent.booleanValue(), null);
}
Boolean isDoNotSell = maxAdapterParameters.isDoNotSell();
if (isDoNotSell != null) {
if (isDoNotSell.booleanValue()) {
str = "1YY-";
} else {
str = "1YN-";
}
BidMachine.setUSPrivacyString(str);
return;
}
BidMachine.setUSPrivacyString("1---");
}
public String DCbdcdcCCbc() {
return "2.6.0";
}
public void DCdbbdD(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxRewardedAdapterListener maxRewardedAdapterListener) {
log("Showing rewarded ad...");
if (this.f10213DAbacDAb.isExpired()) {
log("Unable to show rewarded ad - ad expired");
maxRewardedAdapterListener.onRewardedAdDisplayFailed(MaxAdapterError.AD_EXPIRED);
} else if (!this.f10213DAbacDAb.canShow()) {
log("Unable to show rewarded ad - ad not ready");
maxRewardedAdapterListener.onRewardedAdDisplayFailed(new MaxAdapterError(-4205, "Ad Display Failed", 0, "Rewarded ad not ready"));
} else {
configureReward(maxAdapterResponseParameters);
this.f10213DAbacDAb.show();
}
}
public void aDaDD(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxNativeAdAdapterListener maxNativeAdAdapterListener) {
log("Loading native ad...");
DCACcAdddc(maxAdapterResponseParameters);
NativeAd nativeAd = new NativeAd(getApplicationContext());
this.f10214bBDaADdaAa = nativeAd;
nativeAd.setListener(new cdCCdCc(maxAdapterResponseParameters.getServerParameters(), maxNativeAdAdapterListener));
this.f10214bBDaADdaAa.load((NativeRequest) ((NativeRequest.Builder) new NativeRequest.Builder().setMediaAssetTypes(MediaAssetType.All).setBidPayload(maxAdapterResponseParameters.getBidResponse())).build());
}
public void bBCadBacC() {
InterstitialAd interstitialAd = this.f10212BbdcDCacCa;
if (interstitialAd != null) {
interstitialAd.setListener(null);
this.f10212BbdcDCacCa.destroy();
this.f10212BbdcDCacCa = null;
}
RewardedAd rewardedAd = this.f10213DAbacDAb;
if (rewardedAd != null) {
rewardedAd.setListener(null);
this.f10213DAbacDAb.destroy();
this.f10213DAbacDAb = null;
}
BannerView bannerView = this.f10215babbDABcB;
if (bannerView != null) {
bannerView.setListener(null);
this.f10215babbDABcB.destroy();
this.f10215babbDABcB = null;
}
NativeAd nativeAd = this.f10214bBDaADdaAa;
if (nativeAd != null) {
nativeAd.unregisterView();
this.f10214bBDaADdaAa.setListener(null);
this.f10214bBDaADdaAa.destroy();
this.f10214bBDaADdaAa = null;
}
}
public void bbBABBaACBD(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxRewardedAdapterListener maxRewardedAdapterListener) {
log("Loading rewarded ad...");
DCACcAdddc(maxAdapterResponseParameters);
RewardedAd rewardedAd = new RewardedAd(getApplicationContext());
this.f10213DAbacDAb = rewardedAd;
rewardedAd.setListener(new dDbCdDC(maxRewardedAdapterListener));
this.f10213DAbacDAb.load((RewardedRequest) ((RewardedRequest.Builder) new RewardedRequest.Builder().setBidPayload(maxAdapterResponseParameters.getBidResponse())).build());
}
public final MaxAdapterError cBBdBADc(BMError bMError) {
int code = bMError.getCode();
MaxAdapterError maxAdapterError = MaxAdapterError.UNSPECIFIED;
if (code != 200) {
switch (code) {
case 100:
maxAdapterError = MaxAdapterError.NO_CONNECTION;
break;
case 101:
maxAdapterError = MaxAdapterError.INTERNAL_ERROR;
break;
case 102:
maxAdapterError = MaxAdapterError.TIMEOUT;
break;
case 103:
maxAdapterError = MaxAdapterError.NO_FILL;
break;
default:
switch (code) {
case 107:
maxAdapterError = MaxAdapterError.AD_EXPIRED;
break;
case 110:
maxAdapterError = MaxAdapterError.BAD_REQUEST;
break;
}
}
return new MaxAdapterError(maxAdapterError.getCode(), maxAdapterError.getMessage(), code, bMError.getMessage());
}
maxAdapterError = MaxAdapterError.SERVER_ERROR;
return new MaxAdapterError(maxAdapterError.getCode(), maxAdapterError.getMessage(), code, bMError.getMessage());
}
@Nullable
public final AdsFormat cDAcDC(@NonNull MaxAdapterSignalCollectionParameters maxAdapterSignalCollectionParameters) {
boolean z;
MaxAdFormat adFormat = maxAdapterSignalCollectionParameters.getAdFormat();
if (!maxAdapterSignalCollectionParameters.getServerParameters().getBoolean("is_native") && adFormat != MaxAdFormat.NATIVE) {
z = false;
} else {
z = true;
}
if (z) {
return AdsFormat.Native;
}
if (adFormat == MaxAdFormat.BANNER) {
return AdsFormat.Banner_320x50;
}
if (adFormat == MaxAdFormat.MREC) {
return AdsFormat.Banner_300x250;
}
if (adFormat == MaxAdFormat.LEADER) {
return AdsFormat.Banner_728x90;
}
if (adFormat == MaxAdFormat.INTERSTITIAL) {
return AdsFormat.Interstitial;
}
if (adFormat != MaxAdFormat.REWARDED && adFormat != MaxAdFormat.REWARDED_INTERSTITIAL) {
return null;
}
return AdsFormat.Rewarded;
}
public void cdCCdCc(MaxAdapterSignalCollectionParameters maxAdapterSignalCollectionParameters, Activity activity, MaxSignalCollectionListener maxSignalCollectionListener) {
log("Collecting signal...");
DCACcAdddc(maxAdapterSignalCollectionParameters);
BidMachine.getBidToken(getApplicationContext(), cDAcDC(maxAdapterSignalCollectionParameters), new DAbacDAb(maxSignalCollectionListener));
}
public String dDbCdDC() {
return "2.6.0.1";
}
public void daAbdddd(MaxAdapterResponseParameters maxAdapterResponseParameters, Activity activity, MaxInterstitialAdapterListener maxInterstitialAdapterListener) {
log("Showing interstitial ad...");
if (this.f10212BbdcDCacCa.isExpired()) {
log("Unable to show interstitial - ad expired");
maxInterstitialAdapterListener.onInterstitialAdDisplayFailed(MaxAdapterError.AD_EXPIRED);
} else if (!this.f10212BbdcDCacCa.canShow()) {
log("Unable to show interstitial - ad not ready");
maxInterstitialAdapterListener.onInterstitialAdDisplayFailed(new MaxAdapterError(-4205, "Ad Display Failed", 0, "Interstitial ad not ready"));
} else {
this.f10212BbdcDCacCa.show();
}
}
public void dcadbB(MaxAdapterResponseParameters maxAdapterResponseParameters, MaxAdFormat maxAdFormat, Activity activity, MaxAdViewAdapterListener maxAdViewAdapterListener) {
log(CBcBD.CdCaB.BbdcDCacCa(new StringBuilder("Loading "), maxAdFormat.getLabel(), " ad..."));
DCACcAdddc(maxAdapterResponseParameters);
BannerView bannerView = new BannerView(getApplicationContext());
this.f10215babbDABcB = bannerView;
bannerView.setListener(new babbDABcB(maxAdViewAdapterListener));
this.f10215babbDABcB.load((BannerView) ((BannerRequest.Builder) new BannerRequest.Builder().setSize(Accbcd(maxAdFormat)).setBidPayload(maxAdapterResponseParameters.getBidResponse())).build());
}
public class cdCCdCc implements NativeListener {
public final Bundle f10226BbdcDCacCa;
public final MaxNativeAdAdapterListener f10227DAbacDAb;
public class RunnableC0105BbdcDCacCa implements Runnable {
public final String f10229ACdCcaaADcb;
public final NativeAd f10230dBDadBcAB;
public RunnableC0105BbdcDCacCa(String str, NativeAd nativeAd) {
this.f10229ACdCcaaADcb = str;
this.f10230dBDadBcAB = nativeAd;
}
@Override
public void run() {
Drawable drawable;
BbdcDCacCa.this.log(CBcBD.CdCaB.BbdcDCacCa(new StringBuilder("Adding native ad icon ("), this.f10229ACdCcaaADcb, ") to queue to be fetched"));
BbdcDCacCa bbdcDCacCa = BbdcDCacCa.this;
try {
drawable = (Drawable) bbdcDCacCa.createDrawableFuture(this.f10229ACdCcaaADcb, bbdcDCacCa.getApplicationContext().getResources()).get(BundleUtils.getInt("image_task_timeout_seconds", 10, cdCCdCc.this.f10226BbdcDCacCa), TimeUnit.SECONDS);
} catch (Throwable th) {
BbdcDCacCa.this.e("Failed to fetch icon image", th);
drawable = null;
}
cdCCdCc.this.bBDaADdaAa(this.f10230dBDadBcAB, new MaxNativeAd.MaxNativeAdImage(drawable));
}
}
public class DAbacDAb implements Runnable {
public final NativeAd f10232ACdCcaaADcb;
public final MaxNativeAd.MaxNativeAdImage f10233dBDadBcAB;
public DAbacDAb(NativeAd nativeAd, MaxNativeAd.MaxNativeAdImage maxNativeAdImage) {
this.f10232ACdCcaaADcb = nativeAd;
this.f10233dBDadBcAB = maxNativeAdImage;
}
@Override
public void run() {
Bundle bundle;
MaxNativeAd.Builder optionsView = new MaxNativeAd.Builder().setAdFormat(MaxAdFormat.NATIVE).setTitle(this.f10232ACdCcaaADcb.getTitle()).setBody(this.f10232ACdCcaaADcb.getDescription()).setCallToAction(this.f10232ACdCcaaADcb.getCallToAction()).setIcon(this.f10233dBDadBcAB).setMediaView(new NativeMediaView(BbdcDCacCa.this.getApplicationContext())).setOptionsView(this.f10232ACdCcaaADcb.getProviderView(BbdcDCacCa.this.getApplicationContext()));
if (AppLovinSdk.VERSION_CODE >= 11040399 && this.f10232ACdCcaaADcb.getMainImage() != null) {
optionsView.setMainImage(new MaxNativeAd.MaxNativeAdImage(this.f10232ACdCcaaADcb.getMainImage().getImage()));
}
CdCaB cdCaB = new CdCaB(optionsView);
String BcCcABbc2 = BbdcDCacCa.this.BcCcABbc(this.f10232ACdCcaaADcb.getAuctionResult());
if (!TextUtils.isEmpty(BcCcABbc2)) {
bundle = new Bundle(1);
bundle.putString(CampaignEx.JSON_KEY_CREATIVE_ID, BcCcABbc2);
} else {
bundle = null;
}
cdCCdCc.this.f10227DAbacDAb.onNativeAdLoaded(cdCaB, bundle);
}
}
public cdCCdCc(Bundle bundle, MaxNativeAdAdapterListener maxNativeAdAdapterListener) {
this.f10226BbdcDCacCa = bundle;
this.f10227DAbacDAb = maxNativeAdAdapterListener;
}
@Override
public void onAdLoadFailed(@NonNull NativeAd nativeAd, @NonNull BMError bMError) {
MaxAdapterError cBBdBADc2 = BbdcDCacCa.this.cBBdBADc(bMError);
BbdcDCacCa.this.log("Native ad failed to load with error (" + cBBdBADc2 + AcAaabaA.DCbdcdcCCbc.f1352bBDaADdaAa);
this.f10227DAbacDAb.onNativeAdLoadFailed(cBBdBADc2);
}
@Override
public void onAdClicked(@NonNull NativeAd nativeAd) {
BbdcDCacCa.this.log("Native ad clicked");
this.f10227DAbacDAb.onNativeAdClicked();
}
@Override
public void onAdLoaded(@NonNull NativeAd nativeAd) {
BbdcDCacCa.this.log("Native ad loaded");
if (AppLovinSdkUtils.isValidString(BundleUtils.getString("template", "", this.f10226BbdcDCacCa)) && TextUtils.isEmpty(nativeAd.getTitle())) {
BbdcDCacCa.this.e("Native ad (" + nativeAd + ") does not have required assets.");
this.f10227DAbacDAb.onNativeAdLoadFailed(new MaxAdapterError(-5400, "Missing Native Ad Assets"));
return;
}
ImageData icon = nativeAd.getIcon();
MaxNativeAd.MaxNativeAdImage maxNativeAdImage = null;
if (icon == null) {
bBDaADdaAa(nativeAd, null);
return;
}
Drawable image = icon.getImage();
Uri localUri = icon.getLocalUri();
String remoteUrl = icon.getRemoteUrl();
if (image != null) {
maxNativeAdImage = new MaxNativeAd.MaxNativeAdImage(image);
} else if (localUri != null) {
maxNativeAdImage = new MaxNativeAd.MaxNativeAdImage(localUri);
} else if (remoteUrl != null) {
BbdcDCacCa.this.getCachingExecutorService().execute(new RunnableC0105BbdcDCacCa(remoteUrl, nativeAd));
return;
}
bBDaADdaAa(nativeAd, maxNativeAdImage);
}
public final void bBDaADdaAa(@NonNull NativeAd nativeAd, MaxNativeAd.MaxNativeAdImage maxNativeAdImage) {
AppLovinSdkUtils.runOnUiThread(new DAbacDAb(nativeAd, maxNativeAdImage));
}
@Override
public void onAdExpired(@NonNull NativeAd nativeAd) {
BbdcDCacCa.this.log("Native ad expired");
}
@Override
public void onAdImpression(@NonNull NativeAd nativeAd) {
BbdcDCacCa.this.log("Native ad impression");
this.f10227DAbacDAb.onNativeAdDisplayed((Bundle) null);
}
@Override
public void onAdShowFailed(@NonNull NativeAd nativeAd, @NonNull BMError bMError) {
}
}
}