导航菜单

页面标题

页面副标题

FileWipe Pro v3.0.0 - FyberReportAdActivity.java 源代码

正在查看: FileWipe Pro v3.0.0 应用的 FyberReportAdActivity.java JAVA 源代码文件

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


package com.fyber.inneractive.sdk.activities;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.FrameLayout;
import com.fyber.inneractive.sdk.R;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.d1;
import com.fyber.inneractive.sdk.util.m0;
import com.fyber.inneractive.sdk.util.t;
import java.util.HashMap;

public class FyberReportAdActivity extends InneractiveBaseActivity {

    public static com.fyber.inneractive.sdk.flow.h f5151f;

    public WebView f5152b;

    public String f5153c;

    public String f5154d;

    public String f5155e;

    public static Intent createIntent(Context context, String str, String str2, Long l) {
        Intent intent = new Intent(context, (Class<?>) FyberReportAdActivity.class);
        if (!(context instanceof Activity)) {
            intent.addFlags(268435456);
        }
        Bundle bundle = new Bundle();
        bundle.putString("advertiser_domain", str);
        bundle.putString("dsp_name", str2);
        bundle.putString("dsp_id", l != null ? Long.toString(l.longValue()) : null);
        intent.putExtras(bundle);
        return intent;
    }

    public static void disableWebviewZoomControls(WebView webView) {
        webView.getSettings().setSupportZoom(true);
        webView.getSettings().setBuiltInZoomControls(true);
        new m0(webView).run();
    }

    public static com.fyber.inneractive.sdk.flow.h getAdReporter() {
        return f5151f;
    }

    public static void start(Context context, com.fyber.inneractive.sdk.flow.h hVar, String str, String str2, Long l) {
        f5151f = hVar;
        try {
            context.startActivity(createIntent(context, str, str2, l));
        } catch (Exception e4) {
            IAlog.a("failed starting fyber report ad activity", e4, new Object[0]);
        }
    }

    public final FrameLayout a() {
        WebView webView;
        FrameLayout frameLayout = new FrameLayout(this);
        try {
            webView = new WebView(IAConfigManager.O.f5348v.a());
            webView.setWebViewClient(new a(this));
            webView.setId(R.id.ia_inneractive_webview_report_ad);
            WebSettings settings = webView.getSettings();
            settings.setJavaScriptEnabled(true);
            settings.setSupportZoom(true);
            settings.setBuiltInZoomControls(true);
            settings.setUseWideViewPort(true);
            settings.setLoadWithOverviewMode(true);
            disableWebviewZoomControls(webView);
            HashMap hashMap = new HashMap();
            if (!TextUtils.isEmpty(this.f5153c)) {
                hashMap.put("advertiser_domain", this.f5153c);
            }
            if (!TextUtils.isEmpty(this.f5154d)) {
                hashMap.put("dsp_name", this.f5154d);
            }
            if (!TextUtils.isEmpty(this.f5155e)) {
                hashMap.put("dsp_id", this.f5155e);
            }
            webView.loadUrl(d1.a("https://cdn2.inner-active.mobi/client/fyber-i-icon/index.html", hashMap));
        } catch (Exception unused) {
            IAlog.b("failed creating webivew for report ad", new Object[0]);
            finish();
            webView = null;
        }
        this.f5152b = webView;
        frameLayout.addView(webView, -1, -1);
        return frameLayout;
    }

    public String getAdDomain() {
        return this.f5153c;
    }

    public String getAdNetwork() {
        return this.f5154d;
    }

    public String getAdNetworkId() {
        return this.f5155e;
    }

    @Override
    public void onCreate(Bundle bundle) {
        getWindow().requestFeature(2);
        getWindow().setFeatureInt(2, -1);
        getWindow().addFlags(1024);
        super.onCreate(bundle);
        if (getActionBar() != null) {
            getActionBar().hide();
        }
        try {
            Bundle extras = getIntent().getExtras();
            if (extras != null) {
                this.f5153c = extras.getString("advertiser_domain");
                this.f5154d = extras.getString("dsp_name");
                this.f5155e = extras.getString("dsp_id");
            }
            setContentView(a());
        } catch (Exception e4) {
            IAlog.a("failed creating fyber report ad activity", e4, new Object[0]);
            finish();
        }
    }

    @Override
    public void onDestroy() {
        WebView webView = this.f5152b;
        if (webView != null) {
            webView.removeAllViews();
            t.a(this.f5152b);
            this.f5152b.destroy();
            this.f5152b = null;
        }
        f5151f = null;
        super.onDestroy();
    }

    @Override
    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        setVisible(false);
    }
}