正在查看: MX Player v1.97.8 应用的 FyberReportAdActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MX Player v1.97.8 应用的 FyberReportAdActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fyber.inneractive.sdk.activities;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
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.util.IAlog;
import com.fyber.inneractive.sdk.util.d0;
import com.fyber.inneractive.sdk.util.t;
import java.util.HashMap;
import java.util.Map;
public class FyberReportAdActivity extends Activity {
public static com.fyber.inneractive.sdk.flow.f e;
public WebView a;
public String b;
public String c;
public String d;
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 d = lg0.d("advertiser_domain", str, "dsp_name", str2);
d.putString("dsp_id", l != null ? Long.toString(l.longValue()) : null);
intent.putExtras(d);
return intent;
}
public static void disableWebviewZoomControls(WebView webView) {
webView.getSettings().setSupportZoom(true);
webView.getSettings().setBuiltInZoomControls(true);
new d0(webView).run();
}
public static com.fyber.inneractive.sdk.flow.f getAdReporter() {
return e;
}
public static void start(Context context, com.fyber.inneractive.sdk.flow.f fVar, String str, String str2, Long l) {
e = fVar;
try {
context.startActivity(createIntent(context, str, str2, l));
} catch (Exception e2) {
IAlog.a("failed starting fyber report ad activity", e2, new Object[0]);
}
}
public final FrameLayout a() {
WebView webView;
FrameLayout frameLayout = new FrameLayout(this);
try {
webView = new WebView(this);
webView.setWebViewClient(new a(this));
webView.setId(R.id.ia_inneractive_webview_report_ad);
WebSettings settings = webView.getSettings();
boolean z = true;
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.b)) {
hashMap.put("advertiser_domain", this.b);
}
if (!TextUtils.isEmpty(this.c)) {
hashMap.put("dsp_name", this.c);
}
if (!TextUtils.isEmpty(this.d)) {
hashMap.put("dsp_id", this.d);
}
StringBuilder sb = new StringBuilder("https://cdn2.inner-active.mobi/client/fyber-i-icon/index.html");
for (Map.Entry entry : hashMap.entrySet()) {
sb.append(z ? "?" : "&");
sb.append((String) entry.getKey());
sb.append("=");
sb.append(Uri.encode((String) entry.getValue()));
z = false;
}
webView.loadUrl(sb.toString());
} catch (Exception unused) {
IAlog.b("failed creating webivew for report ad", new Object[0]);
finish();
webView = null;
}
this.a = webView;
frameLayout.addView(webView, -1, -1);
return frameLayout;
}
public String getAdDomain() {
return this.b;
}
public String getAdNetwork() {
return this.c;
}
public String getAdNetworkId() {
return this.d;
}
@Override
public SharedPreferences getSharedPreferences(String str, int i) {
return tya.m.getSharedPreferences(str, i);
}
@Override
public void onCreate(Bundle bundle) {
getWindow().requestFeature(2);
getWindow().setFeatureInt(2, -1);
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras != null) {
this.b = extras.getString("advertiser_domain");
this.c = extras.getString("dsp_name");
this.d = extras.getString("dsp_id");
}
setContentView(a());
} catch (Exception e2) {
IAlog.a("failed creating fyber report ad activity", e2, new Object[0]);
finish();
}
}
@Override
public void onDestroy() {
WebView webView = this.a;
if (webView != null) {
t.a(webView);
this.a.destroy();
this.a = null;
}
e = null;
super.onDestroy();
}
@Override
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
setVisible(false);
}
}