导航菜单

页面标题

页面副标题

OLX India v19.42.007 - MraidInterstitialActivity.java 源代码

正在查看: OLX India v19.42.007 应用的 MraidInterstitialActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package net.pubnative.lite.sdk.interstitial.activity;

import android.os.Bundle;
import android.view.View;
import net.pubnative.lite.sdk.interstitial.HyBidInterstitialBroadcastReceiver;
import net.pubnative.lite.sdk.models.APIAsset;
import net.pubnative.lite.sdk.mraid.MRAIDBanner;
import net.pubnative.lite.sdk.mraid.MRAIDNativeFeature;
import net.pubnative.lite.sdk.mraid.MRAIDNativeFeatureListener;
import net.pubnative.lite.sdk.mraid.MRAIDView;
import net.pubnative.lite.sdk.mraid.MRAIDViewCloseLayoutListener;
import net.pubnative.lite.sdk.mraid.MRAIDViewListener;
import net.pubnative.lite.sdk.utils.SkipOffsetManager;

public class MraidInterstitialActivity extends HyBidInterstitialActivity implements MRAIDViewListener, MRAIDNativeFeatureListener, MRAIDViewCloseLayoutListener {
    private final String[] mSupportedNativeFeatures = {MRAIDNativeFeature.CALENDAR, MRAIDNativeFeature.INLINE_VIDEO, "sms", MRAIDNativeFeature.STORE_PICTURE, MRAIDNativeFeature.TEL, "location"};
    private MRAIDBanner mView;

    @Override
    protected void dismiss() {
        super.dismiss();
    }

    @Override
    public View getAdView() {
        MRAIDBanner mRAIDBanner = null;
        if (getAd() != null) {
            if (getAd().getAssetUrl(APIAsset.HTML_BANNER) != null) {
                mRAIDBanner = new MRAIDBanner(this, getAd().getAssetUrl(APIAsset.HTML_BANNER), "", Boolean.TRUE, Boolean.FALSE, this.mSupportedNativeFeatures, this, this, getAd().getContentInfoContainer(this, this));
            } else if (getAd().getAssetHtml(APIAsset.HTML_BANNER) != null) {
                mRAIDBanner = new MRAIDBanner(this, "", getAd().getAssetHtml(APIAsset.HTML_BANNER), Boolean.TRUE, Boolean.FALSE, this.mSupportedNativeFeatures, this, this, getAd().getContentInfoContainer(this, this));
            }
            if (mRAIDBanner != null) {
                Integer hTMLSkipOffset = SkipOffsetManager.getHTMLSkipOffset(getAd().getHtmlSkipOffset(), Boolean.TRUE);
                Integer nativeCloseButtonDelay = SkipOffsetManager.getNativeCloseButtonDelay(getAd().getNativeCloseButtonDelay());
                mRAIDBanner.setCloseLayoutListener(this);
                this.mIsSkippable = Boolean.valueOf(hTMLSkipOffset != null && hTMLSkipOffset.intValue() == 0);
                mRAIDBanner.setSkipOffset(hTMLSkipOffset);
                mRAIDBanner.setNativeCloseButtonDelay(nativeCloseButtonDelay);
            }
        }
        this.mView = mRAIDBanner;
        return mRAIDBanner;
    }

    @Override
    public void mraidNativeFeatureCallTel(String str) {
    }

    @Override
    public void mraidNativeFeatureCreateCalendarEvent(String str) {
    }

    @Override
    public void mraidNativeFeatureOpenBrowser(String str) {
        if (getBroadcastSender() != null) {
            getBroadcastSender().sendBroadcast(HyBidInterstitialBroadcastReceiver.Action.CLICK);
        }
        getUrlHandler().handleUrl(str);
    }

    @Override
    public void mraidNativeFeaturePlayVideo(String str) {
    }

    @Override
    public void mraidNativeFeatureSendSms(String str) {
    }

    @Override
    public void mraidNativeFeatureStorePicture(String str) {
    }

    @Override
    public void mraidShowCloseButton() {
        this.mIsSkippable = Boolean.TRUE;
        showInterstitialCloseButton();
    }

    @Override
    public void mraidViewClose(MRAIDView mRAIDView) {
    }

    @Override
    public void mraidViewError(MRAIDView mRAIDView) {
        if (getBroadcastSender() != null) {
            getBroadcastSender().sendBroadcast(HyBidInterstitialBroadcastReceiver.Action.ERROR);
        }
        dismiss();
    }

    @Override
    public void mraidViewExpand(MRAIDView mRAIDView) {
    }

    @Override
    public void mraidViewLoaded(MRAIDView mRAIDView) {
        if (getBroadcastSender() != null) {
            getBroadcastSender().sendBroadcast(HyBidInterstitialBroadcastReceiver.Action.SHOW);
        }
    }

    @Override
    public boolean mraidViewResize(MRAIDView mRAIDView, int i, int i2, int i3, int i4) {
        return true;
    }

    @Override
    public void onClose() {
        dismiss();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        if (getResources().getConfiguration().orientation == 2) {
            setRequestedOrientation(0);
        }
        if (getResources().getConfiguration().orientation == 1) {
            setRequestedOrientation(1);
        }
        super.onCreate(bundle);
        hideInterstitialCloseButton();
    }

    @Override
    protected void onDestroy() {
        MRAIDBanner mRAIDBanner = this.mView;
        if (mRAIDBanner != null) {
            mRAIDBanner.stopAdSession();
            this.mView.destroy();
        }
        super.onDestroy();
    }

    @Override
    public void onExpandedAdClosed() {
    }

    @Override
    protected void onPause() {
        super.onPause();
        pauseAd();
    }

    @Override
    public void onRemoveCloseLayout() {
        hideInterstitialCloseButton();
    }

    @Override
    protected void onResume() {
        resumeAd();
        super.onResume();
    }

    @Override
    public void onShowCloseLayout() {
        this.mIsSkippable = Boolean.TRUE;
        showInterstitialCloseButton();
    }

    @Override
    protected void pauseAd() {
        this.mView.pause();
    }

    @Override
    protected void resumeAd() {
        if (this.mIsFeedbackFormOpen) {
            return;
        }
        this.mView.resume();
    }

    @Override
    protected boolean shouldShowContentInfo() {
        return false;
    }
}