- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
805 lines
35 KiB
Java
805 lines
35 KiB
Java
package com.mbridge.msdk.interstitial.view;
|
|
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.drawable.ColorDrawable;
|
|
import android.net.http.SslError;
|
|
import android.os.Bundle;
|
|
import android.os.Handler;
|
|
import android.os.Message;
|
|
import android.text.TextUtils;
|
|
import android.util.Base64;
|
|
import android.util.DisplayMetrics;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.webkit.SslErrorHandler;
|
|
import android.webkit.WebView;
|
|
import android.widget.ImageView;
|
|
import android.widget.ProgressBar;
|
|
import android.widget.RelativeLayout;
|
|
import com.google.android.gms.ads.AdError;
|
|
import com.mbridge.msdk.activity.MBBaseActivity;
|
|
import com.mbridge.msdk.c.k;
|
|
import com.mbridge.msdk.foundation.controller.c;
|
|
import com.mbridge.msdk.foundation.db.j;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.entity.n;
|
|
import com.mbridge.msdk.foundation.same.report.h;
|
|
import com.mbridge.msdk.foundation.tools.ab;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.foundation.tools.ak;
|
|
import com.mbridge.msdk.foundation.tools.ap;
|
|
import com.mbridge.msdk.foundation.tools.x;
|
|
import com.mbridge.msdk.interstitial.c.a;
|
|
import com.mbridge.msdk.mbsignalcommon.mraid.b;
|
|
import com.mbridge.msdk.mbsignalcommon.mraid.d;
|
|
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
|
|
import com.mbridge.msdk.mbsignalcommon.windvane.g;
|
|
import com.mbridge.msdk.newreward.player.view.hybrid.util.MRAIDCommunicatorUtil;
|
|
import com.mbridge.msdk.out.Campaign;
|
|
import com.mbridge.msdk.out.NativeListener;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
|
|
import java.io.File;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class MBInterstitialActivity extends MBBaseActivity implements b {
|
|
public static final String INTENT_CAMAPIGN = "campaign";
|
|
public static final String INTENT_UNIT_ID = "unitId";
|
|
public static final long WATI_JS_INVOKE = 2000;
|
|
public static final long WEB_LOAD_TIME = 15000;
|
|
private CampaignEx e;
|
|
private WindVaneWebView f;
|
|
private ImageView g;
|
|
private a.c h;
|
|
private boolean i;
|
|
private d j;
|
|
private long k;
|
|
private boolean l;
|
|
private boolean m;
|
|
public ProgressBar mProgressBar;
|
|
public String mUnitid;
|
|
private com.mbridge.msdk.click.a o;
|
|
private boolean c = false;
|
|
private boolean d = false;
|
|
public boolean mIsMBPage = false;
|
|
private Handler n = new Handler() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.1
|
|
@Override // android.os.Handler
|
|
public final void handleMessage(Message message) {
|
|
}
|
|
};
|
|
Runnable a = new Runnable() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.10
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
if (MBInterstitialActivity.this.d) {
|
|
return;
|
|
}
|
|
MBInterstitialActivity.this.c = true;
|
|
if (MBInterstitialActivity.this.h != null) {
|
|
MBInterstitialActivity.this.h.a("load page timeout");
|
|
if (MBInterstitialActivity.this.f != null) {
|
|
MBInterstitialActivity.this.f.setVisibility(8);
|
|
MBInterstitialActivity.this.f.setWebViewListener(null);
|
|
MBInterstitialActivity.this.f.release();
|
|
}
|
|
MBInterstitialActivity.this.hideLoading();
|
|
}
|
|
}
|
|
};
|
|
Runnable b = new Runnable() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.11
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
MBInterstitialActivity mBInterstitialActivity = MBInterstitialActivity.this;
|
|
if (mBInterstitialActivity.mIsMBPage) {
|
|
return;
|
|
}
|
|
if (mBInterstitialActivity.e != null && MBInterstitialActivity.this.e.isMraid()) {
|
|
MBInterstitialActivity.h(MBInterstitialActivity.this);
|
|
}
|
|
com.mbridge.msdk.interstitial.b.a.a().a(MBInterstitialActivity.this.e, MBInterstitialActivity.this.mUnitid);
|
|
if (MBInterstitialActivity.this.c) {
|
|
return;
|
|
}
|
|
MBInterstitialActivity.this.d = true;
|
|
MBInterstitialActivity.this.hideLoading();
|
|
MBInterstitialActivity.this.showWebView();
|
|
}
|
|
};
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public void expand(String str, boolean z) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public CampaignEx getMraidCampaign() {
|
|
return this.e;
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.activity.MBBaseActivity, android.app.Activity
|
|
public void onCreate(Bundle bundle) {
|
|
CampaignEx campaignEx;
|
|
CampaignEx campaignEx2;
|
|
super.onCreate(bundle);
|
|
try {
|
|
int a = x.a(getApplicationContext(), "mbridge_interstitial_activity", TtmlNode.TAG_LAYOUT);
|
|
if (a != -1) {
|
|
setContentView(a);
|
|
initView();
|
|
a();
|
|
this.g.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.8
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
MBInterstitialActivity.this.finish();
|
|
}
|
|
});
|
|
if (this.f != null && (campaignEx2 = this.e) != null) {
|
|
com.mbridge.msdk.foundation.same.g.a aVar = new com.mbridge.msdk.foundation.same.g.a(campaignEx2);
|
|
aVar.a(this.e.getAppName());
|
|
this.f.setCampaignId(this.e.getId());
|
|
this.f.setDownloadListener(aVar);
|
|
}
|
|
b();
|
|
try {
|
|
campaignEx = this.e;
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
if (campaignEx == null || (TextUtils.isEmpty(campaignEx.getHtmlUrl()) && !this.e.isMraid())) {
|
|
a.c cVar = this.h;
|
|
if (cVar != null) {
|
|
cVar.a("htmlurl is null");
|
|
}
|
|
c.m().a(this);
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.mUnitid, this, (ViewGroup) null, (ViewGroup.LayoutParams) null, new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.7
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void showed() {
|
|
String str;
|
|
MBInterstitialActivity.this.onPause();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (c.m().c() != null) {
|
|
jSONObject.put("status", 1);
|
|
}
|
|
str = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("MBInterstitialActivity", th.getMessage(), th);
|
|
str = "";
|
|
}
|
|
g.a().a((WebView) MBInterstitialActivity.this.f, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void close() {
|
|
String str;
|
|
MBInterstitialActivity.this.onResume();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (c.m().c() != null) {
|
|
jSONObject.put("status", 2);
|
|
}
|
|
str = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("MBInterstitialActivity", th.getMessage(), th);
|
|
str = "";
|
|
}
|
|
g.a().a((WebView) MBInterstitialActivity.this.f, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void summit(String str) {
|
|
String str2;
|
|
MBInterstitialActivity.this.onResume();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (c.m().c() != null) {
|
|
jSONObject.put("status", 2);
|
|
}
|
|
str2 = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("MBInterstitialActivity", th.getMessage(), th);
|
|
str2 = "";
|
|
}
|
|
g.a().a((WebView) MBInterstitialActivity.this.f, "onFeedbackAlertStatusNotify", Base64.encodeToString(str2.getBytes(), 2));
|
|
}
|
|
});
|
|
this.e.setCampaignUnitId(this.mUnitid);
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.mUnitid, this.e);
|
|
return;
|
|
}
|
|
af.c("MBInterstitialActivity", "url:" + this.e.getHtmlUrl());
|
|
goneWebView();
|
|
this.f.setWebViewListener(new com.mbridge.msdk.mbsignalcommon.b.b() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.9
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void a(WebView webView, int i) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void a(WebView webView, String str, Bitmap bitmap) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void b(WebView webView, int i) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final boolean b(WebView webView, String str) {
|
|
return true;
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void c(WebView webView, int i) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void a(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
|
|
MBInterstitialActivity.this.i = true;
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void a(WebView webView, int i, String str, String str2) {
|
|
try {
|
|
MBInterstitialActivity.this.i = true;
|
|
if (MBInterstitialActivity.this.h != null) {
|
|
MBInterstitialActivity.this.h.a(str);
|
|
}
|
|
MBInterstitialActivity.a(MBInterstitialActivity.this, 3, str);
|
|
} catch (Exception e2) {
|
|
e2.printStackTrace();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void a(WebView webView, String str) {
|
|
try {
|
|
if (MBInterstitialActivity.this.i) {
|
|
return;
|
|
}
|
|
MBInterstitialActivity.a(MBInterstitialActivity.this, 1, "");
|
|
MBInterstitialActivity mBInterstitialActivity = MBInterstitialActivity.this;
|
|
if (mBInterstitialActivity.a != null && mBInterstitialActivity.n != null) {
|
|
MBInterstitialActivity.this.n.removeCallbacks(MBInterstitialActivity.this.a);
|
|
}
|
|
if (MBInterstitialActivity.this.h != null) {
|
|
MBInterstitialActivity.this.h.a();
|
|
}
|
|
MBInterstitialActivity mBInterstitialActivity2 = MBInterstitialActivity.this;
|
|
if (!mBInterstitialActivity2.mIsMBPage) {
|
|
mBInterstitialActivity2.n.postDelayed(MBInterstitialActivity.this.b, 2000L);
|
|
}
|
|
MBInterstitialActivity.e(MBInterstitialActivity.this);
|
|
} catch (Exception e2) {
|
|
e2.printStackTrace();
|
|
if (MBInterstitialActivity.this.h != null) {
|
|
MBInterstitialActivity.this.h.a("load page failed");
|
|
}
|
|
}
|
|
}
|
|
});
|
|
String htmlUrl = this.e.getHtmlUrl();
|
|
if (this.e.isMraid()) {
|
|
File file = new File(this.e.getMraid());
|
|
if (file.exists() && file.isFile() && file.canRead()) {
|
|
htmlUrl = "file:////" + this.e.getMraid();
|
|
}
|
|
}
|
|
this.k = System.currentTimeMillis();
|
|
this.f.loadUrl(htmlUrl);
|
|
this.n.postDelayed(this.a, WEB_LOAD_TIME);
|
|
c.m().a(this);
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.mUnitid, this, (ViewGroup) null, (ViewGroup.LayoutParams) null, new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.7
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void showed() {
|
|
String str;
|
|
MBInterstitialActivity.this.onPause();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (c.m().c() != null) {
|
|
jSONObject.put("status", 1);
|
|
}
|
|
str = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("MBInterstitialActivity", th.getMessage(), th);
|
|
str = "";
|
|
}
|
|
g.a().a((WebView) MBInterstitialActivity.this.f, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void close() {
|
|
String str;
|
|
MBInterstitialActivity.this.onResume();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (c.m().c() != null) {
|
|
jSONObject.put("status", 2);
|
|
}
|
|
str = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("MBInterstitialActivity", th.getMessage(), th);
|
|
str = "";
|
|
}
|
|
g.a().a((WebView) MBInterstitialActivity.this.f, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void summit(String str) {
|
|
String str2;
|
|
MBInterstitialActivity.this.onResume();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (c.m().c() != null) {
|
|
jSONObject.put("status", 2);
|
|
}
|
|
str2 = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("MBInterstitialActivity", th.getMessage(), th);
|
|
str2 = "";
|
|
}
|
|
g.a().a((WebView) MBInterstitialActivity.this.f, "onFeedbackAlertStatusNotify", Base64.encodeToString(str2.getBytes(), 2));
|
|
}
|
|
});
|
|
this.e.setCampaignUnitId(this.mUnitid);
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.mUnitid, this.e);
|
|
return;
|
|
}
|
|
a();
|
|
b();
|
|
a.c cVar2 = this.h;
|
|
if (cVar2 != null) {
|
|
cVar2.a("not found resource");
|
|
}
|
|
finish();
|
|
} catch (Exception e2) {
|
|
e2.printStackTrace();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.activity.MBBaseActivity, android.app.Activity
|
|
public void onResume() {
|
|
super.onResume();
|
|
CampaignEx campaignEx = this.e;
|
|
if (campaignEx == null || !campaignEx.isMraid()) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(this.f, "true");
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void onPause() {
|
|
super.onPause();
|
|
CampaignEx campaignEx = this.e;
|
|
if (campaignEx == null || !campaignEx.isMraid()) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(this.f, "false");
|
|
}
|
|
|
|
private void a() {
|
|
Intent intent = getIntent();
|
|
if (intent != null) {
|
|
this.mUnitid = intent.getStringExtra("unitId");
|
|
this.e = (CampaignEx) intent.getSerializableExtra(INTENT_CAMAPIGN);
|
|
}
|
|
CampaignEx campaignEx = this.e;
|
|
if (campaignEx != null && campaignEx.isMraid()) {
|
|
d dVar = new d(this);
|
|
this.j = dVar;
|
|
dVar.c();
|
|
this.j.a(new d.b() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.12
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.d.b
|
|
public final void a(double d) {
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(MBInterstitialActivity.this.f, d);
|
|
}
|
|
});
|
|
}
|
|
CampaignEx campaignEx2 = this.e;
|
|
if (campaignEx2 != null) {
|
|
com.mbridge.msdk.click.c.a(this, campaignEx2.getMaitve(), this.e.getMaitve_src());
|
|
}
|
|
}
|
|
|
|
public void initView() {
|
|
this.f = (WindVaneWebView) findViewById(x.a(getApplicationContext(), "mbridge_interstitial_wv", "id"));
|
|
this.mProgressBar = (ProgressBar) findViewById(x.a(getApplicationContext(), "mbridge_interstitial_pb", "id"));
|
|
this.g = (ImageView) findViewById(x.a(getApplicationContext(), "mbridge_interstitial_iv_close", "id"));
|
|
}
|
|
|
|
private void b() {
|
|
try {
|
|
if (a.e == null || TextUtils.isEmpty(this.mUnitid) || !a.e.containsKey(this.mUnitid)) {
|
|
return;
|
|
}
|
|
this.h = a.e.get(this.mUnitid);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
public void showWebView() {
|
|
runOnUiThread(new Runnable() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.13
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
try {
|
|
if (MBInterstitialActivity.this.f == null || MBInterstitialActivity.this.e == null) {
|
|
return;
|
|
}
|
|
MBInterstitialActivity.this.f.setVisibility(0);
|
|
if (MBInterstitialActivity.this.e.isMraid()) {
|
|
MBInterstitialActivity.j(MBInterstitialActivity.this);
|
|
}
|
|
MBInterstitialActivity.k(MBInterstitialActivity.this);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
public void goneWebView() {
|
|
try {
|
|
runOnUiThread(new Runnable() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.14
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
if (MBInterstitialActivity.this.f != null) {
|
|
MBInterstitialActivity.this.f.setVisibility(8);
|
|
}
|
|
}
|
|
});
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
public void showLoading() {
|
|
try {
|
|
runOnUiThread(new Runnable() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.2
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
ProgressBar progressBar = MBInterstitialActivity.this.mProgressBar;
|
|
if (progressBar != null) {
|
|
progressBar.setVisibility(0);
|
|
}
|
|
}
|
|
});
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
public void hideLoading() {
|
|
try {
|
|
runOnUiThread(new Runnable() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.3
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
ProgressBar progressBar = MBInterstitialActivity.this.mProgressBar;
|
|
if (progressBar != null) {
|
|
progressBar.setVisibility(8);
|
|
}
|
|
}
|
|
});
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.activity.MBBaseActivity, android.app.Activity
|
|
public void onDestroy() {
|
|
super.onDestroy();
|
|
try {
|
|
a.c cVar = this.h;
|
|
if (cVar != null) {
|
|
cVar.b();
|
|
}
|
|
com.mbridge.msdk.click.a aVar = this.o;
|
|
if (aVar != null) {
|
|
aVar.a(false);
|
|
this.o.a((NativeListener.NativeTrackingListener) null);
|
|
this.o.a();
|
|
}
|
|
d dVar = this.j;
|
|
if (dVar != null) {
|
|
dVar.d();
|
|
}
|
|
if (!this.l) {
|
|
c();
|
|
}
|
|
if (a.e != null && !TextUtils.isEmpty(this.mUnitid)) {
|
|
a.e.remove(this.mUnitid);
|
|
}
|
|
this.h = null;
|
|
com.mbridge.msdk.foundation.d.b.a().c(this.mUnitid);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
public void finish() {
|
|
super.finish();
|
|
if (!this.l) {
|
|
c();
|
|
}
|
|
if (this.m) {
|
|
return;
|
|
}
|
|
reportPlayableClosed();
|
|
}
|
|
|
|
public void reportPlayableClosed() {
|
|
if (this.e != null) {
|
|
n nVar = new n("2000061", this.e.getId(), this.e.getRequestId(), this.e.getRequestIdNotice(), this.mUnitid, ab.m(c.m().c()));
|
|
nVar.d(this.e.isMraid() ? n.a : n.b);
|
|
com.mbridge.msdk.foundation.same.report.g.b(nVar, c.m().c(), this.mUnitid);
|
|
this.m = true;
|
|
}
|
|
}
|
|
|
|
private void c() {
|
|
h hVar = new h(getApplicationContext());
|
|
CampaignEx campaignEx = this.e;
|
|
if (campaignEx != null) {
|
|
hVar.b(campaignEx.getRequestId(), this.e.getRequestIdNotice(), this.e.getId(), this.mUnitid, com.mbridge.msdk.mbsignalcommon.mraid.c.a(this.e.getId()), this.e.isBidCampaign());
|
|
com.mbridge.msdk.mbsignalcommon.mraid.c.b(this.e.getId());
|
|
this.l = true;
|
|
}
|
|
}
|
|
|
|
public void onIntersClick() {
|
|
try {
|
|
a.c cVar = this.h;
|
|
if (cVar != null) {
|
|
cVar.c();
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
public k getIntersUnitSetting() {
|
|
try {
|
|
if (TextUtils.isEmpty(this.mUnitid)) {
|
|
return null;
|
|
}
|
|
k d = com.mbridge.msdk.c.h.a().d(c.m().k(), this.mUnitid);
|
|
return d == null ? k.c(this.mUnitid) : d;
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public void clickTracking() {
|
|
try {
|
|
if (this.e != null && !ap.a(this.mUnitid)) {
|
|
onIntersClick();
|
|
com.mbridge.msdk.click.a aVar = new com.mbridge.msdk.click.a(getApplicationContext(), this.mUnitid);
|
|
this.o = aVar;
|
|
aVar.a(new NativeListener.NativeTrackingListener() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.4
|
|
@Override // com.mbridge.msdk.out.NativeListener.NativeTrackingListener
|
|
public final void onDismissLoading(Campaign campaign) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.NativeListener.NativeTrackingListener
|
|
public final void onDownloadFinish(Campaign campaign) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.NativeListener.NativeTrackingListener
|
|
public final void onDownloadProgress(int i) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.NativeListener.NativeTrackingListener
|
|
public final void onDownloadStart(Campaign campaign) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.NativeListener.NativeTrackingListener
|
|
public final boolean onInterceptDefaultLoadingDialog() {
|
|
return false;
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.NativeListener.NativeTrackingListener
|
|
public final void onShowLoading(Campaign campaign) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onStartRedirection(Campaign campaign, String str) {
|
|
try {
|
|
MBInterstitialActivity.this.showLoading();
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onRedirectionFailed(Campaign campaign, String str) {
|
|
MBInterstitialActivity.this.hideLoading();
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onFinishRedirection(Campaign campaign, String str) {
|
|
try {
|
|
MBInterstitialActivity.this.hideLoading();
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
});
|
|
this.o.a(this.e);
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public void open(String str) {
|
|
if (!TextUtils.isEmpty(str)) {
|
|
this.e.setClickURL(str);
|
|
CampaignEx mraidCampaign = getMraidCampaign();
|
|
if (mraidCampaign != null) {
|
|
new h(getApplicationContext()).a(mraidCampaign.getRequestId(), mraidCampaign.getRequestIdNotice(), mraidCampaign.getId(), this.mUnitid, str, mraidCampaign.isBidCampaign());
|
|
}
|
|
}
|
|
clickTracking();
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public void close() {
|
|
finish();
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public void unload() {
|
|
close();
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public void useCustomClose(boolean z) {
|
|
if (z) {
|
|
this.g.setImageDrawable(new ColorDrawable(0));
|
|
} else {
|
|
this.g.setImageResource(x.a(getApplicationContext(), "mbridge_interstitial_close", "drawable"));
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.activity.MBBaseActivity
|
|
public void setTopControllerPadding(int i, int i2, int i3, int i4, int i5) {
|
|
int a = ak.a(this, 10.0f);
|
|
if (i2 <= 0) {
|
|
i2 = a;
|
|
}
|
|
if (i3 <= 0) {
|
|
i3 = a;
|
|
}
|
|
if (i4 <= 0) {
|
|
i4 = a;
|
|
}
|
|
if (i5 <= 0) {
|
|
i5 = a;
|
|
}
|
|
if (this.g != null) {
|
|
int a2 = ak.a(this, 25.0f);
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a2, a2);
|
|
layoutParams.addRule(11);
|
|
layoutParams.setMargins(i2, i4, i3, i5);
|
|
this.g.setLayoutParams(layoutParams);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(MBInterstitialActivity mBInterstitialActivity, int i, String str) {
|
|
CampaignEx campaignEx = mBInterstitialActivity.e;
|
|
if (campaignEx == null || !campaignEx.isMraid()) {
|
|
return;
|
|
}
|
|
n nVar = new n();
|
|
nVar.f(mBInterstitialActivity.e.getRequestId());
|
|
nVar.g(mBInterstitialActivity.e.getRequestIdNotice());
|
|
nVar.e(mBInterstitialActivity.e.getId());
|
|
nVar.b(i);
|
|
nVar.l(String.valueOf(System.currentTimeMillis() - mBInterstitialActivity.k));
|
|
nVar.n("");
|
|
nVar.h(str);
|
|
nVar.d(CampaignEx.CLICKMODE_ON);
|
|
nVar.d(mBInterstitialActivity.e.isMraid() ? n.a : n.b);
|
|
com.mbridge.msdk.foundation.same.report.g.b(nVar, mBInterstitialActivity.mUnitid, mBInterstitialActivity.e);
|
|
}
|
|
|
|
public static /* synthetic */ void e(MBInterstitialActivity mBInterstitialActivity) {
|
|
CampaignEx campaignEx = mBInterstitialActivity.e;
|
|
if (campaignEx == null || !campaignEx.isMraid()) {
|
|
return;
|
|
}
|
|
int i = mBInterstitialActivity.getResources().getConfiguration().orientation;
|
|
String str = i != 0 ? i != 1 ? i != 2 ? "UNDEFINED" : "landscape" : "portrait" : AdError.UNDEFINED_DOMAIN;
|
|
JSONObject jSONObject = new JSONObject();
|
|
try {
|
|
jSONObject.put("orientation", str);
|
|
jSONObject.put("locked", "true");
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
float j = ab.j(mBInterstitialActivity);
|
|
float h = ab.h(mBInterstitialActivity);
|
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
|
mBInterstitialActivity.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
|
float f = displayMetrics.widthPixels;
|
|
float f2 = displayMetrics.heightPixels;
|
|
HashMap hashMap = new HashMap();
|
|
hashMap.put(MRAIDCommunicatorUtil.KEY_PLACEMENTTYPE, "Interstitial");
|
|
hashMap.put("state", MRAIDCommunicatorUtil.STATES_DEFAULT);
|
|
hashMap.put(MRAIDCommunicatorUtil.KEY_VIEWABLE, "true");
|
|
hashMap.put(MRAIDCommunicatorUtil.KEY_CURRENTORIENTATION, jSONObject);
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(mBInterstitialActivity.f, j, h);
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().c(mBInterstitialActivity.f, f, f2);
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(mBInterstitialActivity.f, hashMap);
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(mBInterstitialActivity.f, mBInterstitialActivity.j.a());
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(mBInterstitialActivity.f);
|
|
}
|
|
|
|
public static /* synthetic */ void h(MBInterstitialActivity mBInterstitialActivity) {
|
|
List<String> pv_urls;
|
|
try {
|
|
c.m().a(mBInterstitialActivity);
|
|
if (!TextUtils.isEmpty(mBInterstitialActivity.e.getImpressionURL())) {
|
|
Context c = c.m().c();
|
|
CampaignEx campaignEx = mBInterstitialActivity.e;
|
|
com.mbridge.msdk.click.a.a(c, campaignEx, mBInterstitialActivity.mUnitid, campaignEx.getImpressionURL(), false, true, com.mbridge.msdk.click.a.a.g);
|
|
}
|
|
if (!TextUtils.isEmpty(mBInterstitialActivity.e.getOnlyImpressionURL())) {
|
|
Context c2 = c.m().c();
|
|
CampaignEx campaignEx2 = mBInterstitialActivity.e;
|
|
com.mbridge.msdk.click.a.a(c2, campaignEx2, mBInterstitialActivity.mUnitid, campaignEx2.getOnlyImpressionURL(), false, true, com.mbridge.msdk.click.a.a.h);
|
|
}
|
|
com.mbridge.msdk.foundation.same.a.b.a(mBInterstitialActivity.mUnitid, mBInterstitialActivity.e, "interstitial");
|
|
Runnable runnable = new Runnable() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.6
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
j.a(com.mbridge.msdk.foundation.db.g.a(MBInterstitialActivity.this)).a(MBInterstitialActivity.this.e.getId());
|
|
}
|
|
};
|
|
com.mbridge.msdk.foundation.controller.d.a();
|
|
com.mbridge.msdk.foundation.same.f.a.b().execute(runnable);
|
|
CampaignEx campaignEx3 = mBInterstitialActivity.e;
|
|
if (campaignEx3 == null || (pv_urls = campaignEx3.getPv_urls()) == null || pv_urls.size() <= 0) {
|
|
return;
|
|
}
|
|
Iterator<String> it = pv_urls.iterator();
|
|
while (it.hasNext()) {
|
|
com.mbridge.msdk.click.a.a(c.m().c(), mBInterstitialActivity.e, mBInterstitialActivity.mUnitid, it.next(), false, true);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.a("MBInterstitialActivity", th.getMessage());
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void j(MBInterstitialActivity mBInterstitialActivity) {
|
|
try {
|
|
n nVar = new n();
|
|
nVar.f(mBInterstitialActivity.e.getRequestId());
|
|
nVar.g(mBInterstitialActivity.e.getRequestIdNotice());
|
|
nVar.e(mBInterstitialActivity.e.getId());
|
|
nVar.d(mBInterstitialActivity.e.isMraid() ? n.a : n.b);
|
|
com.mbridge.msdk.foundation.same.report.g.d(nVar, mBInterstitialActivity.getApplicationContext(), mBInterstitialActivity.mUnitid);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void k(MBInterstitialActivity mBInterstitialActivity) {
|
|
CampaignEx campaignEx = mBInterstitialActivity.e;
|
|
if (campaignEx == null || !campaignEx.isMraid()) {
|
|
return;
|
|
}
|
|
mBInterstitialActivity.f.post(new Runnable() { // from class: com.mbridge.msdk.interstitial.view.MBInterstitialActivity.5
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(MBInterstitialActivity.this.f, MBInterstitialActivity.this.f.getLeft(), MBInterstitialActivity.this.f.getTop(), MBInterstitialActivity.this.f.getWidth(), MBInterstitialActivity.this.f.getHeight());
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(MBInterstitialActivity.this.f, MBInterstitialActivity.this.f.getLeft(), MBInterstitialActivity.this.f.getTop(), MBInterstitialActivity.this.f.getWidth(), MBInterstitialActivity.this.f.getHeight());
|
|
}
|
|
});
|
|
}
|
|
}
|