- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
904 lines
36 KiB
Java
904 lines
36 KiB
Java
package com.mbridge.msdk.mbbanner.common.c;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.content.Context;
|
|
import android.graphics.Bitmap;
|
|
import android.os.Handler;
|
|
import android.os.Looper;
|
|
import android.os.Message;
|
|
import android.text.TextUtils;
|
|
import android.util.Base64;
|
|
import android.view.MotionEvent;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.webkit.WebView;
|
|
import android.widget.ImageView;
|
|
import android.widget.RelativeLayout;
|
|
import com.iab.omid.library.mmadbridge.adsession.AdEvents;
|
|
import com.iab.omid.library.mmadbridge.adsession.AdSession;
|
|
import com.mbridge.msdk.c.h;
|
|
import com.mbridge.msdk.c.k;
|
|
import com.mbridge.msdk.foundation.db.j;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.foundation.tools.ak;
|
|
import com.mbridge.msdk.interstitial.view.MBInterstitialActivity;
|
|
import com.mbridge.msdk.mbbanner.common.b.e;
|
|
import com.mbridge.msdk.mbbanner.common.util.BannerUtils;
|
|
import com.mbridge.msdk.mbbanner.view.MBBannerWebView;
|
|
import com.mbridge.msdk.mbsignalcommon.windvane.g;
|
|
import com.mbridge.msdk.out.MBBannerView;
|
|
import com.mbridge.msdk.widget.MBAdChoice;
|
|
import java.io.File;
|
|
import java.util.Iterator;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class d {
|
|
private AdSession A;
|
|
private AdEvents B;
|
|
private float E;
|
|
private float F;
|
|
protected com.mbridge.msdk.mbbanner.common.b.c a;
|
|
protected CampaignEx b;
|
|
protected final MBBannerView c;
|
|
protected boolean d;
|
|
protected final String e;
|
|
com.mbridge.msdk.click.a f;
|
|
private boolean g;
|
|
private ImageView h;
|
|
private MBBannerWebView i;
|
|
private ImageView j;
|
|
private ImageView k;
|
|
private boolean l;
|
|
private boolean m;
|
|
private boolean n;
|
|
private boolean o;
|
|
private boolean p;
|
|
private boolean q;
|
|
private final String r;
|
|
private String s;
|
|
private List<CampaignEx> u;
|
|
private int x;
|
|
private com.mbridge.msdk.mbbanner.common.communication.a z;
|
|
private int t = -1;
|
|
private int v = 1;
|
|
private int w = 1;
|
|
private final long y = MBInterstitialActivity.WEB_LOAD_TIME;
|
|
private final Handler C = new Handler(Looper.getMainLooper()) { // from class: com.mbridge.msdk.mbbanner.common.c.d.1
|
|
@Override // android.os.Handler
|
|
public final void handleMessage(Message message) {
|
|
super.handleMessage(message);
|
|
if (message.what != 1) {
|
|
return;
|
|
}
|
|
try {
|
|
if (d.this.A != null) {
|
|
d dVar = d.this;
|
|
dVar.B = AdEvents.createAdEvents(dVar.A);
|
|
if (d.this.B != null) {
|
|
d.this.B.loaded();
|
|
d.this.B.impressionOccurred();
|
|
}
|
|
}
|
|
} catch (Throwable th) {
|
|
af.a("BannerShowManager", th.getMessage());
|
|
}
|
|
}
|
|
};
|
|
private final com.mbridge.msdk.foundation.same.e.a D = new com.mbridge.msdk.foundation.same.e.a() { // from class: com.mbridge.msdk.mbbanner.common.c.d.6
|
|
@Override // com.mbridge.msdk.foundation.same.e.a
|
|
public final void cancelTask() {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.e.a
|
|
public final void pauseTask(boolean z) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.e.a
|
|
public final void runTask() {
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880045);
|
|
bVar.b(d.this.b.getLocalRequestId());
|
|
d.this.a(bVar);
|
|
}
|
|
};
|
|
private final View.OnClickListener G = new View.OnClickListener() { // from class: com.mbridge.msdk.mbbanner.common.c.d.7
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
d dVar = d.this;
|
|
if (dVar.d) {
|
|
dVar.t = 1;
|
|
d.c(d.this);
|
|
}
|
|
}
|
|
};
|
|
private com.mbridge.msdk.mbbanner.common.b.a H = new com.mbridge.msdk.mbbanner.common.b.a() { // from class: com.mbridge.msdk.mbbanner.common.c.d.8
|
|
@Override // com.mbridge.msdk.mbbanner.common.b.a
|
|
public final void a(int i) {
|
|
if (i != 2) {
|
|
d.this.g();
|
|
} else {
|
|
d.d(d.this);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbbanner.common.b.a
|
|
public final void a(String str) {
|
|
d.this.t = 2;
|
|
d.c(d.this);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbbanner.common.b.a
|
|
public final void a() {
|
|
d.this.t = 2;
|
|
d.c(d.this);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbbanner.common.b.a
|
|
public final void b(int i) {
|
|
if (i == 1) {
|
|
d.this.e();
|
|
d.this.a("", 1);
|
|
} else {
|
|
d.this.d();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbbanner.common.b.a
|
|
public final void a(CampaignEx campaignEx) {
|
|
d.this.a(campaignEx, false, "");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbbanner.common.b.a
|
|
public final void a(boolean z) {
|
|
d dVar = d.this;
|
|
if (dVar.a != null) {
|
|
dVar.q = z;
|
|
if (z) {
|
|
d.this.a.c();
|
|
} else {
|
|
d.this.a.d();
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbbanner.common.b.a
|
|
public final void a(boolean z, String str) {
|
|
try {
|
|
if (d.this.a != null) {
|
|
if (TextUtils.isEmpty(str)) {
|
|
d.this.a.a();
|
|
d.this.a.b();
|
|
} else {
|
|
CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(CampaignEx.campaignToJsonObject(d.this.b));
|
|
parseCampaignWithBackData.setClickURL(str);
|
|
d.this.a(parseCampaignWithBackData, z, str);
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
af.b("BannerShowManager", e.getMessage());
|
|
}
|
|
}
|
|
};
|
|
private com.mbridge.msdk.mbsignalcommon.b.b I = new com.mbridge.msdk.mbsignalcommon.b.b() { // from class: com.mbridge.msdk.mbbanner.common.c.d.4
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void a(WebView webView, String str) {
|
|
d.this.n = true;
|
|
af.b("BannerCallJS", "fireOnJSBridgeConnected");
|
|
g.a().a(webView);
|
|
d.this.p = true;
|
|
CampaignEx campaignEx = d.this.b;
|
|
if (campaignEx == null || campaignEx.isHasMBTplMark()) {
|
|
return;
|
|
}
|
|
d.this.e();
|
|
d.this.a("", 1);
|
|
}
|
|
|
|
@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) {
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880000);
|
|
bVar.a(i + " WebView receive error: " + i + " message : " + str);
|
|
bVar.b(d.this.s);
|
|
d.this.a(bVar);
|
|
d.this.a(str, 2);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
|
|
public final void a(WebView webView) {
|
|
d.this.d();
|
|
}
|
|
};
|
|
|
|
public void a(CampaignEx campaignEx, boolean z, String str) {
|
|
}
|
|
|
|
public final void a(String str) {
|
|
this.s = str;
|
|
}
|
|
|
|
public final void a(boolean z) {
|
|
this.g = z;
|
|
}
|
|
|
|
public final int b() {
|
|
return this.w;
|
|
}
|
|
|
|
public d(MBBannerView mBBannerView, com.mbridge.msdk.mbbanner.common.b.c cVar, String str, String str2, boolean z, k kVar) {
|
|
this.g = z;
|
|
this.c = mBBannerView;
|
|
this.e = str2;
|
|
this.r = str;
|
|
this.a = new e(cVar, kVar);
|
|
}
|
|
|
|
public final void a(boolean z, int i) {
|
|
this.x = i;
|
|
if (i == 0) {
|
|
k d = h.a().d(com.mbridge.msdk.foundation.controller.c.m().k(), this.e);
|
|
if (d == null) {
|
|
return;
|
|
} else {
|
|
z = d.f() == 1;
|
|
}
|
|
}
|
|
this.g = z;
|
|
}
|
|
|
|
private boolean c() {
|
|
String a = a(this.b);
|
|
if (TextUtils.isEmpty(a)) {
|
|
return false;
|
|
}
|
|
if (this.c != null) {
|
|
if (this.i == null) {
|
|
try {
|
|
MBBannerWebView mBBannerWebView = new MBBannerWebView(com.mbridge.msdk.foundation.controller.c.m().c());
|
|
this.i = mBBannerWebView;
|
|
mBBannerWebView.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
|
|
this.i.setWebViewClient(new com.mbridge.msdk.mbbanner.view.a(this.e, this.u, this.H));
|
|
} catch (Throwable unused) {
|
|
a(com.mbridge.msdk.foundation.c.a.a(880029), 1);
|
|
return false;
|
|
}
|
|
}
|
|
ImageView imageView = this.h;
|
|
if (imageView != null) {
|
|
imageView.setVisibility(8);
|
|
}
|
|
if (this.i.getVisibility() != 0) {
|
|
this.i.setVisibility(0);
|
|
}
|
|
if (this.i.getParent() == null) {
|
|
this.c.addView(this.i);
|
|
d(this.b.isMraid());
|
|
}
|
|
if (this.b.isMraid()) {
|
|
h();
|
|
}
|
|
g();
|
|
com.mbridge.msdk.mbbanner.common.communication.a aVar = new com.mbridge.msdk.mbbanner.common.communication.a(this.c.getContext(), this.r, this.e);
|
|
this.z = aVar;
|
|
aVar.a(this.u);
|
|
this.z.a(this.H);
|
|
this.z.a(this.x);
|
|
this.i.setWebViewListener(this.I);
|
|
this.i.setObject(this.z);
|
|
this.i.loadUrl(a);
|
|
MBBannerWebView mBBannerWebView2 = this.i;
|
|
if (mBBannerWebView2 != null) {
|
|
mBBannerWebView2.postDelayed(new Runnable() { // from class: com.mbridge.msdk.mbbanner.common.c.d.9
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
try {
|
|
if (d.this.i != null) {
|
|
String str = d.this.v == 2 ? "false" : "true";
|
|
d.this.i.evaluateJavascript("(function() {\n var videos = document.getElementsByTagName('video');\n for (var i = 0; i < videos.length; i++) {\n videos[i].muted = " + str + ";\n }\n var audios = document.getElementsByTagName('audio');\n for (var i = 0; i < audios.length; i++) {\n audios[i].muted = " + str + ";\n }\n })()", null);
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}, 1000L);
|
|
}
|
|
} else {
|
|
a(com.mbridge.msdk.foundation.c.a.a(880046), 2);
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880046);
|
|
bVar.b(this.s);
|
|
a(bVar);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
@SuppressLint({"ClickableViewAccessibility"})
|
|
public void d() {
|
|
if (this.c != null) {
|
|
MBBannerWebView mBBannerWebView = this.i;
|
|
if (mBBannerWebView != null && mBBannerWebView.getParent() != null) {
|
|
this.c.removeView(this.i);
|
|
}
|
|
if (this.h == null) {
|
|
ImageView imageView = new ImageView(com.mbridge.msdk.foundation.controller.c.m().c());
|
|
this.h = imageView;
|
|
imageView.setOnTouchListener(new View.OnTouchListener() { // from class: com.mbridge.msdk.mbbanner.common.c.d.10
|
|
@Override // android.view.View.OnTouchListener
|
|
public final boolean onTouch(View view, MotionEvent motionEvent) {
|
|
d.this.E = motionEvent.getRawX();
|
|
d.this.F = motionEvent.getRawY();
|
|
af.b("BannerShowManager", d.this.E + " " + d.this.F);
|
|
return false;
|
|
}
|
|
});
|
|
this.h.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.mbbanner.common.c.d.11
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
d.this.a(BannerUtils.managerCampaignEX(com.mbridge.msdk.mbsignalcommon.communication.d.a(d.this.E, d.this.F), d.this.b), false, "");
|
|
}
|
|
});
|
|
}
|
|
String imageUrl = this.b.getImageUrl();
|
|
if (!TextUtils.isEmpty(imageUrl)) {
|
|
com.mbridge.msdk.foundation.same.c.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(imageUrl, new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.mbbanner.common.c.d.12
|
|
@Override // com.mbridge.msdk.foundation.same.c.c
|
|
public final void onSuccessLoad(Bitmap bitmap, String str) {
|
|
if (d.this.h != null) {
|
|
d.this.h.setImageBitmap(bitmap);
|
|
}
|
|
d.this.n = true;
|
|
d.m(d.this);
|
|
d.this.g();
|
|
d.this.h();
|
|
d dVar = d.this;
|
|
if (dVar.d) {
|
|
return;
|
|
}
|
|
dVar.e();
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.c.c
|
|
public final void onFailedLoad(String str, String str2) {
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880039);
|
|
bVar.b(d.this.s);
|
|
d.this.a(bVar);
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880047);
|
|
bVar.b(this.s);
|
|
a(bVar);
|
|
return;
|
|
}
|
|
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880046);
|
|
bVar2.b(this.s);
|
|
a(bVar2);
|
|
}
|
|
|
|
private String a(CampaignEx campaignEx) {
|
|
if (campaignEx == null) {
|
|
return "";
|
|
}
|
|
try {
|
|
String bannerUrl = campaignEx.getBannerUrl();
|
|
if (!TextUtils.isEmpty(bannerUrl)) {
|
|
return bannerUrl;
|
|
}
|
|
String bannerHtml = campaignEx.getBannerHtml();
|
|
File file = new File(bannerHtml);
|
|
if (!file.exists() || !file.isFile() || !file.canRead()) {
|
|
return bannerHtml;
|
|
}
|
|
return "file:////" + bannerHtml;
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage());
|
|
return "";
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void a(com.mbridge.msdk.foundation.c.b bVar) {
|
|
if (this.b == null || f()) {
|
|
return;
|
|
}
|
|
this.C.removeCallbacks(this.D);
|
|
com.mbridge.msdk.mbbanner.common.b.c cVar = this.a;
|
|
if (cVar != null) {
|
|
cVar.a(bVar);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
/* JADX WARN: Can't wrap try/catch for region: R(20:42|43|44|45|(2:46|47)|48|49|50|(1:52)(1:(1:151)(1:152))|53|54|55|56|57|58|(1:60)|61|62|(1:64)|66) */
|
|
/* JADX WARN: Code restructure failed: missing block: B:144:0x0225, code lost:
|
|
|
|
r0 = move-exception;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:145:0x022a, code lost:
|
|
|
|
r2 = r16;
|
|
com.mbridge.msdk.foundation.tools.af.b(r2, r0.getMessage());
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:147:0x01e5, code lost:
|
|
|
|
r0 = th;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:148:0x01e6, code lost:
|
|
|
|
com.mbridge.msdk.foundation.tools.af.b("BannerCallJS", "transInfoForMraid", r0);
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:153:0x012c, code lost:
|
|
|
|
r0 = th;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:154:0x012d, code lost:
|
|
|
|
r23 = r5;
|
|
*/
|
|
/* JADX WARN: Removed duplicated region for block: B:142:0x0441 */
|
|
/* JADX WARN: Removed duplicated region for block: B:150:0x0131 */
|
|
/* JADX WARN: Removed duplicated region for block: B:52:0x0129 */
|
|
/* JADX WARN: Removed duplicated region for block: B:60:0x01fb */
|
|
/* JADX WARN: Removed duplicated region for block: B:64:0x020f A[Catch: all -> 0x0225, TRY_LEAVE, TryCatch #1 {all -> 0x0225, blocks: (B:62:0x020b, B:64:0x020f), top: B:61:0x020b }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:69:0x0253 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public void e() {
|
|
/*
|
|
Method dump skipped, instructions count: 1096
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.mbbanner.common.c.d.e():void");
|
|
}
|
|
|
|
private synchronized boolean f() {
|
|
boolean isReport;
|
|
isReport = this.b.isReport();
|
|
if (!isReport) {
|
|
this.b.setReport(true);
|
|
}
|
|
return isReport;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void g() {
|
|
ImageView imageView;
|
|
if (!this.g || (imageView = this.j) == null) {
|
|
return;
|
|
}
|
|
if (imageView.getVisibility() != 0) {
|
|
this.j.setVisibility(0);
|
|
this.j.setOnClickListener(this.G);
|
|
}
|
|
if (this.j.getParent() != null || this.c == null) {
|
|
return;
|
|
}
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 12.0f), ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 12.0f));
|
|
layoutParams.addRule(11);
|
|
layoutParams.addRule(10);
|
|
this.c.addView(this.j, layoutParams);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void h() {
|
|
if (this.c == null) {
|
|
return;
|
|
}
|
|
CampaignEx campaignEx = this.b;
|
|
if (campaignEx == null || campaignEx.getPrivacyButtonTemplateVisibility() == 1) {
|
|
MBAdChoice mBAdChoice = new MBAdChoice(com.mbridge.msdk.foundation.controller.c.m().c());
|
|
mBAdChoice.setCampaign(this.b);
|
|
mBAdChoice.setFeedbackDialogEventListener(new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.mbbanner.common.c.d.2
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void showed() {
|
|
String str;
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
|
|
jSONObject.put("status", 1);
|
|
}
|
|
str = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage(), th);
|
|
str = "";
|
|
}
|
|
g.a().a((WebView) d.this.i, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void close() {
|
|
String str;
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
|
|
jSONObject.put("status", 2);
|
|
}
|
|
str = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage(), th);
|
|
str = "";
|
|
}
|
|
g.a().a((WebView) d.this.i, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void summit(String str) {
|
|
String str2;
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
|
|
jSONObject.put("status", 1);
|
|
}
|
|
str2 = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage(), th);
|
|
str2 = "";
|
|
}
|
|
g.a().a((WebView) d.this.i, "onFeedbackAlertStatusNotify", Base64.encodeToString(str2.getBytes(), 2));
|
|
}
|
|
});
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 6.0f), ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 6.0f));
|
|
layoutParams.addRule(11);
|
|
layoutParams.addRule(12);
|
|
this.c.addView(mBAdChoice, layoutParams);
|
|
}
|
|
}
|
|
|
|
private void i() {
|
|
AdSession adSession = this.A;
|
|
if (adSession != null) {
|
|
adSession.finish();
|
|
this.A = null;
|
|
af.a("omsdk", " adSession.finish() ");
|
|
}
|
|
}
|
|
|
|
public final void a() {
|
|
LinkedHashMap<String, com.mbridge.msdk.foundation.same.report.d.c> b;
|
|
i();
|
|
CampaignEx campaignEx = this.b;
|
|
String str = this.e;
|
|
if (campaignEx != null) {
|
|
try {
|
|
String a = com.mbridge.msdk.mbsignalcommon.mraid.c.a(campaignEx.getId());
|
|
if (!TextUtils.isEmpty(a)) {
|
|
new com.mbridge.msdk.foundation.same.report.h(com.mbridge.msdk.foundation.controller.c.m().c()).b(campaignEx.getRequestId(), campaignEx.getRequestIdNotice(), campaignEx.getId(), str, a, campaignEx.isBidCampaign());
|
|
com.mbridge.msdk.mbsignalcommon.mraid.c.b(campaignEx.getId());
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerReport", th.getMessage());
|
|
}
|
|
}
|
|
if (this.a != null) {
|
|
this.a = null;
|
|
}
|
|
MBBannerWebView mBBannerWebView = this.i;
|
|
if (mBBannerWebView != null) {
|
|
mBBannerWebView.setWebViewListener(null);
|
|
}
|
|
if (this.I != null) {
|
|
this.I = null;
|
|
}
|
|
ImageView imageView = this.j;
|
|
if (imageView != null) {
|
|
imageView.setOnClickListener(null);
|
|
}
|
|
ImageView imageView2 = this.h;
|
|
if (imageView2 != null) {
|
|
imageView2.setOnClickListener(null);
|
|
}
|
|
MBBannerView mBBannerView = this.c;
|
|
if (mBBannerView != null) {
|
|
mBBannerView.removeAllViews();
|
|
}
|
|
MBBannerWebView mBBannerWebView2 = this.i;
|
|
if (mBBannerWebView2 != null) {
|
|
mBBannerWebView2.release();
|
|
}
|
|
com.mbridge.msdk.mbbanner.common.communication.a aVar = this.z;
|
|
if (aVar != null) {
|
|
aVar.a();
|
|
}
|
|
if (this.H != null) {
|
|
this.H = null;
|
|
}
|
|
com.mbridge.msdk.foundation.d.b.a().c(this.e);
|
|
String str2 = this.e;
|
|
try {
|
|
if (TextUtils.isEmpty(str2) || (b = com.mbridge.msdk.foundation.same.report.d.d.a().b()) == null || b.isEmpty()) {
|
|
return;
|
|
}
|
|
Iterator<Map.Entry<String, com.mbridge.msdk.foundation.same.report.d.c>> it = b.entrySet().iterator();
|
|
while (it.hasNext()) {
|
|
Map.Entry<String, com.mbridge.msdk.foundation.same.report.d.c> next = it.next();
|
|
if (next != null) {
|
|
com.mbridge.msdk.foundation.same.report.d.c value = next.getValue();
|
|
if (value.s()) {
|
|
it.remove();
|
|
}
|
|
if (value.i().equals(str2)) {
|
|
it.remove();
|
|
}
|
|
}
|
|
}
|
|
} catch (Throwable th2) {
|
|
af.b("BannerReport", th2.getMessage());
|
|
}
|
|
}
|
|
|
|
public final void b(boolean z) {
|
|
this.l = z;
|
|
e();
|
|
}
|
|
|
|
public final void c(boolean z) {
|
|
this.m = z;
|
|
e();
|
|
}
|
|
|
|
private void a(CampaignEx campaignEx, Context context, String str) {
|
|
if (campaignEx != null) {
|
|
try {
|
|
List<String> pv_urls = campaignEx.getPv_urls();
|
|
if (pv_urls == null || pv_urls.size() <= 0) {
|
|
return;
|
|
}
|
|
Iterator<String> it = pv_urls.iterator();
|
|
while (it.hasNext()) {
|
|
com.mbridge.msdk.click.a.a(context, campaignEx, str, it.next(), false, true);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
private void b(CampaignEx campaignEx, Context context, String str) {
|
|
if (campaignEx != null) {
|
|
try {
|
|
if (TextUtils.isEmpty(campaignEx.getOnlyImpressionURL())) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.click.a.a(context, campaignEx, str, campaignEx.getOnlyImpressionURL(), false, true, com.mbridge.msdk.click.a.a.h);
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
private void c(final CampaignEx campaignEx, final Context context, String str) {
|
|
if (!TextUtils.isEmpty(campaignEx.getImpressionURL())) {
|
|
new Thread(new Runnable() { // from class: com.mbridge.msdk.mbbanner.common.c.d.3
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
try {
|
|
j.a(com.mbridge.msdk.foundation.db.g.a(context)).a(campaignEx.getId());
|
|
} catch (Exception e) {
|
|
af.b("BannerShowManager", e.getMessage());
|
|
}
|
|
}
|
|
}).start();
|
|
com.mbridge.msdk.click.a.a(context, campaignEx, str, campaignEx.getImpressionURL(), false, true, com.mbridge.msdk.click.a.a.g);
|
|
}
|
|
if (TextUtils.isEmpty(str) || campaignEx.getNativeVideoTracking() == null || campaignEx.getNativeVideoTracking().p() == null) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.click.a.a(context, campaignEx, str, campaignEx.getNativeVideoTracking().p(), false, false);
|
|
}
|
|
|
|
private void d(boolean z) {
|
|
if (this.c != null) {
|
|
View b = com.mbridge.msdk.foundation.d.b.a().b(this.e);
|
|
if (com.mbridge.msdk.foundation.d.b.a().b() && z && b != null) {
|
|
ViewGroup viewGroup = (ViewGroup) b.getParent();
|
|
if (viewGroup != null) {
|
|
viewGroup.removeView(b);
|
|
}
|
|
b.setVisibility(0);
|
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) b.getLayoutParams();
|
|
if (layoutParams == null) {
|
|
layoutParams = new RelativeLayout.LayoutParams(com.mbridge.msdk.foundation.d.b.b, com.mbridge.msdk.foundation.d.b.a);
|
|
}
|
|
layoutParams.addRule(12);
|
|
b.setLayoutParams(layoutParams);
|
|
this.c.addView(b);
|
|
}
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.e, new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.mbbanner.common.c.d.5
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void showed() {
|
|
String str;
|
|
d.this.c.onPause();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
|
|
jSONObject.put("status", 1);
|
|
}
|
|
str = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage(), th);
|
|
str = "";
|
|
}
|
|
g.a().a((WebView) d.this.i, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void close() {
|
|
String str;
|
|
d.this.c.onResume();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
|
|
jSONObject.put("status", 2);
|
|
}
|
|
str = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage(), th);
|
|
str = "";
|
|
}
|
|
g.a().a((WebView) d.this.i, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void summit(String str) {
|
|
String str2;
|
|
d.this.c.onResume();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
|
|
jSONObject.put("status", 2);
|
|
}
|
|
str2 = jSONObject.toString();
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage(), th);
|
|
str2 = "";
|
|
}
|
|
g.a().a((WebView) d.this.i, "onFeedbackAlertStatusNotify", Base64.encodeToString(str2.getBytes(), 2));
|
|
}
|
|
});
|
|
this.b.setCampaignUnitId(this.e);
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.e, this.b);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void a(String str, int i) {
|
|
try {
|
|
CampaignEx campaignEx = this.b;
|
|
if (campaignEx != null) {
|
|
com.mbridge.msdk.foundation.same.report.d.c a = com.mbridge.msdk.mbbanner.common.d.a.a(this.e, campaignEx.getLocalRequestId());
|
|
a.g(this.w);
|
|
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
|
|
eVar.a("result", Integer.valueOf(i));
|
|
if (TextUtils.isEmpty(str)) {
|
|
str = "";
|
|
}
|
|
eVar.a("reason", str);
|
|
a.f(TextUtils.isEmpty(this.b.getBannerUrl()) ? 2 : 1);
|
|
com.mbridge.msdk.mbbanner.common.d.a.a("2000068", a, eVar);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage());
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:10:0x001f */
|
|
/* JADX WARN: Removed duplicated region for block: B:13:0x0030 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final void a(com.mbridge.msdk.foundation.entity.CampaignUnit r5) {
|
|
/*
|
|
Method dump skipped, instructions count: 295
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.mbbanner.common.c.d.a(com.mbridge.msdk.foundation.entity.CampaignUnit):void");
|
|
}
|
|
|
|
public final void a(int i, int i2, int i3, int i4) {
|
|
if (i == i3 && i2 == i4) {
|
|
return;
|
|
}
|
|
MBBannerWebView mBBannerWebView = this.i;
|
|
af.b("BannerCallJS", "fireOnBannerViewSizeChange");
|
|
try {
|
|
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(mBBannerWebView, i, i2);
|
|
} catch (Throwable th) {
|
|
af.b("BannerCallJS", "fireOnBannerViewSizeChange", th);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void c(d dVar) {
|
|
try {
|
|
CampaignEx campaignEx = dVar.b;
|
|
if (campaignEx != null) {
|
|
com.mbridge.msdk.foundation.same.report.d.c a = com.mbridge.msdk.mbbanner.common.d.a.a(dVar.e, campaignEx.getLocalRequestId());
|
|
a.g(dVar.w);
|
|
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
|
|
eVar.a("close_click_type", Integer.valueOf(dVar.t));
|
|
eVar.a(CampaignEx.JSON_KEY_CREATIVE_ID, Long.valueOf(dVar.b.getCreativeId()));
|
|
com.mbridge.msdk.mbbanner.common.d.a.a("2000069", a, eVar);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerShowManager", th.getMessage());
|
|
}
|
|
MBBannerWebView mBBannerWebView = dVar.i;
|
|
if (mBBannerWebView != null && mBBannerWebView.getParent() != null) {
|
|
dVar.c.removeView(dVar.i);
|
|
}
|
|
ImageView imageView = dVar.h;
|
|
if (imageView != null && imageView.getParent() != null) {
|
|
dVar.h.setVisibility(8);
|
|
dVar.c.removeView(dVar.h);
|
|
}
|
|
ImageView imageView2 = dVar.j;
|
|
if (imageView2 != null && imageView2.getParent() != null) {
|
|
dVar.c.removeView(dVar.j);
|
|
dVar.j.setVisibility(8);
|
|
}
|
|
com.mbridge.msdk.foundation.d.b.a().c(dVar.e);
|
|
ImageView imageView3 = dVar.k;
|
|
if (imageView3 != null && imageView3.getParent() != null) {
|
|
dVar.c.removeView(dVar.k);
|
|
dVar.k.setVisibility(8);
|
|
}
|
|
BannerUtils.inserCloseId(dVar.e, dVar.u);
|
|
try {
|
|
CampaignEx campaignEx2 = dVar.b;
|
|
if (campaignEx2 != null) {
|
|
com.mbridge.msdk.foundation.same.report.d.c a2 = com.mbridge.msdk.mbbanner.common.d.a.a(dVar.e, campaignEx2.getLocalRequestId());
|
|
a2.g(dVar.w);
|
|
a2.c(true);
|
|
com.mbridge.msdk.mbbanner.common.d.a.a("2000152", a2, null);
|
|
}
|
|
} catch (Throwable th2) {
|
|
af.b("BannerShowManager", th2.getMessage());
|
|
}
|
|
com.mbridge.msdk.mbbanner.common.b.c cVar = dVar.a;
|
|
if (cVar != null) {
|
|
cVar.e();
|
|
}
|
|
dVar.i();
|
|
}
|
|
|
|
public static /* synthetic */ void d(d dVar) {
|
|
ImageView imageView;
|
|
if (dVar.g && (imageView = dVar.j) != null && imageView.getVisibility() == 0) {
|
|
dVar.j.setVisibility(8);
|
|
dVar.j.setOnClickListener(null);
|
|
if (dVar.c == null || dVar.j.getParent() == null) {
|
|
return;
|
|
}
|
|
dVar.c.removeView(dVar.j);
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void m(d dVar) {
|
|
if (dVar.h != null) {
|
|
MBBannerWebView mBBannerWebView = dVar.i;
|
|
if (mBBannerWebView != null) {
|
|
mBBannerWebView.setVisibility(8);
|
|
}
|
|
if (dVar.h.getVisibility() != 0) {
|
|
dVar.h.setVisibility(0);
|
|
}
|
|
dVar.w = 2;
|
|
if (dVar.c != null) {
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
|
|
layoutParams.addRule(10);
|
|
dVar.h.setScaleType(ImageView.ScaleType.FIT_XY);
|
|
if (dVar.h.getParent() == null) {
|
|
dVar.c.addView(dVar.h, layoutParams);
|
|
}
|
|
dVar.d(true);
|
|
}
|
|
}
|
|
}
|
|
}
|