导航菜单

页面标题

页面副标题

CallApp v2.226 - MobileFuseFullscreenActivity.java 源代码

正在查看: CallApp v2.226 应用的 MobileFuseFullscreenActivity.java JAVA 源代码文件

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


package com.mobilefuse.sdk;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.mobilefuse.sdk.core.R;
import com.mobilefuse.sdk.fullscreen.BaseContentController;
import com.mobilefuse.sdk.fullscreen.MraidContentController;
import com.mobilefuse.sdk.fullscreen.StoryboardContentController;
import com.mobilefuse.sdk.fullscreen.VastContentController;
import com.mobilefuse.sdk.network.model.AdmMediaType;

public class MobileFuseFullscreenActivity extends Activity {
    private static AdController adController;
    private BaseContentController contentController;
    private FrameLayout mainContainer;

    public static class AnonymousClass2 {
        static final int[] $SwitchMap$com$mobilefuse$sdk$network$model$AdmMediaType;

        static {
            int[] iArr = new int[AdmMediaType.values().length];
            $SwitchMap$com$mobilefuse$sdk$network$model$AdmMediaType = iArr;
            try {
                iArr[AdmMediaType.VIDEO.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                $SwitchMap$com$mobilefuse$sdk$network$model$AdmMediaType[AdmMediaType.BANNER.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                $SwitchMap$com$mobilefuse$sdk$network$model$AdmMediaType[AdmMediaType.STORYBOARD.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
        }
    }

    private BaseContentController.ContentListener createContentListener() throws Throwable {
        return new BaseContentController.ContentListener() {
            @Override
            public void onAdClicked() throws Throwable {
            }

            @Override
            public void onAdClosed() throws Throwable {
                MobileFuseFullscreenActivity.this.finish();
            }

            @Override
            public void onAdError() throws Throwable {
                MobileFuseFullscreenActivity.this.finish();
            }
        };
    }

    public static void showAd(AdController adController2) throws Throwable {
        adController = adController2;
        Context context = adController2.getContext();
        Intent intent = new Intent(context, (Class<?>) (adController2.isTransparentBackground() ? MobileFuseFullscreenTransparentActivity.class : MobileFuseFullscreenActivity.class));
        intent.setFlags(268435456);
        context.startActivity(intent);
    }

    @Override
    public void onBackPressed() {
    }

    @Override
    public void onCreate(@Nullable Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.mobilefuse_ad_fullscreen);
        try {
            this.mainContainer = (FrameLayout) findViewById(R.id.mainContainer);
            AdController adController2 = adController;
            if (adController2 == null) {
                finish();
                return;
            }
            if (adController2.isDestroyed()) {
                finish();
                return;
            }
            try {
                adController.setRenderingActivity(this);
                int i = AnonymousClass2.$SwitchMap$com$mobilefuse$sdk$network$model$AdmMediaType[adController.bidResponse.getType().ordinal()];
                if (i == 1) {
                    this.contentController = new VastContentController(adController, this, createContentListener());
                } else if (i == 2) {
                    this.contentController = new MraidContentController(adController, this, createContentListener());
                } else if (i == 3) {
                    this.contentController = new StoryboardContentController(adController, this, createContentListener());
                }
                this.contentController.init(this.mainContainer);
            } catch (Throwable th) {
                StabilityHelper.logException(this, th);
                finish();
            }
        } catch (Throwable th2) {
            StabilityHelper.logException(this, th2);
            finish();
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        try {
            BaseContentController baseContentController = this.contentController;
            if (baseContentController != null) {
                baseContentController.onActivityDestroy();
            }
        } catch (Throwable th) {
            StabilityHelper.logException(this, th);
        }
    }

    @Override
    public void onPause() {
        super.onPause();
        try {
            BaseContentController baseContentController = this.contentController;
            if (baseContentController != null) {
                baseContentController.onActivityPause();
            }
        } catch (Throwable th) {
            StabilityHelper.logException(this, th);
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        try {
            BaseContentController baseContentController = this.contentController;
            if (baseContentController != null) {
                baseContentController.onActivityResume();
            }
        } catch (Throwable th) {
            StabilityHelper.logException(this, th);
        }
    }

    @Override
    public void onStart() {
        super.onStart();
        try {
            BaseContentController baseContentController = this.contentController;
            if (baseContentController != null) {
                baseContentController.onActivityStart();
            }
        } catch (Throwable th) {
            StabilityHelper.logException(this, th);
        }
    }

    @Override
    public void onStop() {
        super.onStop();
        try {
            BaseContentController baseContentController = this.contentController;
            if (baseContentController != null) {
                baseContentController.onActivityStop();
            }
        } catch (Throwable th) {
            StabilityHelper.logException(this, th);
        }
    }
}