- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
801 lines
30 KiB
Java
801 lines
30 KiB
Java
package com.mbridge.msdk.splash.c;
|
|
|
|
import android.content.Context;
|
|
import android.net.Uri;
|
|
import android.os.Bundle;
|
|
import android.os.Handler;
|
|
import android.os.Looper;
|
|
import android.os.Message;
|
|
import android.text.TextUtils;
|
|
import android.view.View;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.work.WorkRequest;
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.mbridge.msdk.c.k;
|
|
import com.mbridge.msdk.foundation.db.j;
|
|
import com.mbridge.msdk.foundation.download.DownloadError;
|
|
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.entity.CampaignUnit;
|
|
import com.mbridge.msdk.foundation.same.c;
|
|
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.n;
|
|
import com.mbridge.msdk.foundation.tools.o;
|
|
import com.mbridge.msdk.out.MBridgeIds;
|
|
import com.mbridge.msdk.splash.a.c;
|
|
import com.mbridge.msdk.splash.c.c;
|
|
import com.mbridge.msdk.splash.c.g;
|
|
import com.mbridge.msdk.splash.view.MBSplashView;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.concurrent.CopyOnWriteArrayList;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class e {
|
|
private static String a = "SplashLoadManager";
|
|
private String b;
|
|
private String c;
|
|
private long d;
|
|
private long e;
|
|
private com.mbridge.msdk.splash.d.b f;
|
|
private MBSplashView h;
|
|
private k i;
|
|
private boolean j;
|
|
private int k;
|
|
private int l;
|
|
private int m;
|
|
private String n;
|
|
private int o;
|
|
private boolean p;
|
|
private volatile boolean q;
|
|
private com.mbridge.msdk.videocommon.listener.a r;
|
|
private H5DownLoadManager.ZipDownloadListener s;
|
|
private String t;
|
|
private int u;
|
|
private int w;
|
|
private List<CampaignEx> x;
|
|
private String v = "";
|
|
private String y = "";
|
|
private Handler z = new Handler(Looper.getMainLooper()) { // from class: com.mbridge.msdk.splash.c.e.1
|
|
@Override // android.os.Handler
|
|
public final void handleMessage(@NonNull Message message) {
|
|
super.handleMessage(message);
|
|
int i = message.what;
|
|
if (i == 1) {
|
|
Object obj = message.obj;
|
|
int i2 = message.arg1;
|
|
if (obj instanceof CampaignEx) {
|
|
CampaignEx campaignEx = (CampaignEx) obj;
|
|
e.this.a(H5DownLoadManager.getInstance().getH5ResAddress(campaignEx.getAdZip()), campaignEx, i2);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (i != 2) {
|
|
if (i != 3) {
|
|
return;
|
|
}
|
|
Object obj2 = message.obj;
|
|
if (obj2 instanceof CampaignEx) {
|
|
e eVar = e.this;
|
|
eVar.b((CampaignEx) obj2, eVar.o);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
Object obj3 = message.obj;
|
|
try {
|
|
if (obj3 instanceof Bundle) {
|
|
int i3 = ((Bundle) obj3).getInt("type");
|
|
String string = ((Bundle) obj3).getString("msg");
|
|
CampaignEx campaignEx2 = (CampaignEx) ((Bundle) obj3).getSerializable("campaignex");
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(i3 == 1 ? 880004 : i3 == 2 ? 880006 : 880027);
|
|
bVar.a(string);
|
|
e eVar2 = e.this;
|
|
eVar2.a(bVar, eVar2.n, e.this.o, campaignEx2);
|
|
}
|
|
} catch (Exception e) {
|
|
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880024);
|
|
bVar2.a((Throwable) e);
|
|
e eVar3 = e.this;
|
|
eVar3.a(bVar2, eVar3.n, e.this.o, (CampaignEx) null);
|
|
}
|
|
}
|
|
};
|
|
private Runnable A = new Runnable() { // from class: com.mbridge.msdk.splash.c.e.4
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880010);
|
|
e eVar = e.this;
|
|
eVar.a(bVar, eVar.n, e.this.o, (CampaignEx) null);
|
|
}
|
|
};
|
|
private Context g = com.mbridge.msdk.foundation.controller.c.m().c();
|
|
|
|
public final String a() {
|
|
return this.v;
|
|
}
|
|
|
|
public final void a(int i) {
|
|
this.k = i;
|
|
}
|
|
|
|
public final void a(int i, int i2) {
|
|
this.m = i;
|
|
this.l = i2;
|
|
}
|
|
|
|
public final void a(k kVar) {
|
|
this.i = kVar;
|
|
}
|
|
|
|
public final void a(com.mbridge.msdk.splash.d.b bVar) {
|
|
this.f = bVar;
|
|
}
|
|
|
|
public final void a(MBSplashView mBSplashView) {
|
|
this.h = mBSplashView;
|
|
}
|
|
|
|
public final void a(boolean z) {
|
|
this.j = z;
|
|
}
|
|
|
|
public final void b(int i) {
|
|
this.w = i;
|
|
}
|
|
|
|
public final void c() {
|
|
if (this.f != null) {
|
|
this.f = null;
|
|
}
|
|
if (this.r != null) {
|
|
this.r = null;
|
|
}
|
|
if (this.s != null) {
|
|
this.s = null;
|
|
}
|
|
}
|
|
|
|
public e(String str, String str2, long j) {
|
|
this.c = str;
|
|
this.b = str2;
|
|
this.e = j;
|
|
}
|
|
|
|
public final String b() {
|
|
return com.mbridge.msdk.foundation.same.c.a(this.x);
|
|
}
|
|
|
|
public final void a(String str, int i) {
|
|
this.q = false;
|
|
this.n = str;
|
|
this.o = i;
|
|
CampaignEx a2 = d.a(this.h, this.c, this.b, str, this.j, this.k, false, false);
|
|
long timestamp = a2 != null ? a2.getTimestamp() : 0L;
|
|
if (this.i.m() == 1 && i != 1 && a2 != null) {
|
|
a(a2, i);
|
|
return;
|
|
}
|
|
this.p = true;
|
|
if (i == 1) {
|
|
List<Integer> c = this.i.c();
|
|
if (c == null || c.size() <= 0) {
|
|
this.d = WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS;
|
|
} else {
|
|
this.d = c.get(0).intValue() * 1000;
|
|
}
|
|
} else {
|
|
long j = this.e;
|
|
if (j <= 0) {
|
|
this.d = this.i.r();
|
|
} else {
|
|
this.d = j;
|
|
}
|
|
}
|
|
if (this.i == null || timestamp <= 0 || !TextUtils.isEmpty(str)) {
|
|
a(this.d);
|
|
a(this.g, str, i);
|
|
return;
|
|
}
|
|
if (System.currentTimeMillis() - timestamp > this.i.o() * 1000) {
|
|
a(this.d);
|
|
a(this.g, str, i);
|
|
} else {
|
|
a(a2, i);
|
|
}
|
|
}
|
|
|
|
private void a(long j) {
|
|
this.z.postDelayed(this.A, j);
|
|
}
|
|
|
|
private void a(Context context, final String str, final int i) {
|
|
try {
|
|
if (context == null) {
|
|
a(new com.mbridge.msdk.foundation.c.b(880025), str, i, (CampaignEx) null);
|
|
return;
|
|
}
|
|
if (ap.a(this.b)) {
|
|
a(new com.mbridge.msdk.foundation.c.b(880032), str, i, (CampaignEx) null);
|
|
return;
|
|
}
|
|
MBridgeIds mBridgeIds = new MBridgeIds(this.c, this.b);
|
|
com.mbridge.msdk.splash.f.f fVar = new com.mbridge.msdk.splash.f.f();
|
|
fVar.a(i);
|
|
fVar.b(this.u);
|
|
fVar.a(this.t);
|
|
fVar.c(this.m);
|
|
fVar.d(this.l);
|
|
com.mbridge.msdk.foundation.same.net.f.e a2 = com.mbridge.msdk.splash.f.e.a(context, mBridgeIds, fVar);
|
|
if (a2 == null) {
|
|
a(new com.mbridge.msdk.foundation.c.b(880001), str, i, (CampaignEx) null);
|
|
return;
|
|
}
|
|
if (!TextUtils.isEmpty(str)) {
|
|
a2.a("token", str);
|
|
}
|
|
String d = ak.d(this.b);
|
|
if (!TextUtils.isEmpty(d)) {
|
|
a2.a("j", d);
|
|
}
|
|
com.mbridge.msdk.splash.f.c cVar = new com.mbridge.msdk.splash.f.c(context);
|
|
com.mbridge.msdk.splash.f.b bVar = new com.mbridge.msdk.splash.f.b(i) { // from class: com.mbridge.msdk.splash.c.e.5
|
|
@Override // com.mbridge.msdk.splash.f.b
|
|
public final void a(CampaignUnit campaignUnit, int i2) {
|
|
try {
|
|
e eVar = e.this;
|
|
e.a(eVar, campaignUnit, i2, eVar.b, str);
|
|
e.this.v = campaignUnit.getRequestId();
|
|
e.this.x = campaignUnit.getAds();
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880003);
|
|
bVar2.a((Throwable) e);
|
|
e.this.a(bVar2, str, i2, (campaignUnit == null || campaignUnit.getAds() == null || campaignUnit.getAds().size() == 0) ? null : campaignUnit.getAds().get(0));
|
|
e.this.u = 0;
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.splash.f.b
|
|
public final void a(int i2, String str2) {
|
|
af.b(e.a, str2);
|
|
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880002);
|
|
bVar2.a(str2);
|
|
e.this.a(bVar2, str, i, (CampaignEx) null);
|
|
e.this.u = 0;
|
|
}
|
|
};
|
|
bVar.a(str);
|
|
bVar.setUnitId(this.b);
|
|
bVar.setPlacementId(this.c);
|
|
bVar.setAdType(297);
|
|
cVar.choiceV3OrV5BySetting(1, a2, bVar, str, com.mbridge.msdk.foundation.same.c.a(this.d, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS));
|
|
} catch (Exception e) {
|
|
af.b(a, e.getMessage());
|
|
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880020);
|
|
bVar2.a((Throwable) e);
|
|
a(bVar2, str, i, (CampaignEx) null);
|
|
this.u = 0;
|
|
}
|
|
}
|
|
|
|
private void a(CampaignEx campaignEx, int i) {
|
|
MBSplashView mBSplashView = this.h;
|
|
if (mBSplashView != null) {
|
|
mBSplashView.setDynamicView(false);
|
|
}
|
|
if (campaignEx.isDynamicView()) {
|
|
d(campaignEx, i);
|
|
} else {
|
|
MBSplashView mBSplashView2 = this.h;
|
|
if (mBSplashView2 != null) {
|
|
mBSplashView2.setSplashWebView();
|
|
}
|
|
}
|
|
if (d.a(this.h, campaignEx)) {
|
|
b(campaignEx, i);
|
|
} else {
|
|
c(campaignEx, i);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void b(CampaignEx campaignEx, int i) {
|
|
if (!d.a(this.h, campaignEx) || this.q) {
|
|
return;
|
|
}
|
|
e();
|
|
if (this.p) {
|
|
d.a(campaignEx, this.b);
|
|
}
|
|
this.q = true;
|
|
com.mbridge.msdk.splash.d.b bVar = this.f;
|
|
if (bVar != null) {
|
|
bVar.a(campaignEx, i);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void a(com.mbridge.msdk.foundation.c.b bVar, String str, int i, CampaignEx campaignEx) {
|
|
if (this.p) {
|
|
this.p = false;
|
|
a(bVar, i, str, campaignEx);
|
|
} else {
|
|
a(bVar, i, campaignEx);
|
|
}
|
|
}
|
|
|
|
private void a(com.mbridge.msdk.foundation.c.b bVar, int i, String str, CampaignEx campaignEx) {
|
|
CampaignEx a2 = d.a(this.h, this.c, this.b, str, this.j, this.k, true, false);
|
|
if (a2 != null) {
|
|
a(a2, i);
|
|
} else {
|
|
a(bVar, i, campaignEx);
|
|
}
|
|
}
|
|
|
|
private void a(com.mbridge.msdk.foundation.c.b bVar, int i, CampaignEx campaignEx) {
|
|
if (this.q) {
|
|
return;
|
|
}
|
|
e();
|
|
this.q = true;
|
|
if (bVar != null) {
|
|
bVar.a(campaignEx);
|
|
}
|
|
com.mbridge.msdk.splash.d.b bVar2 = this.f;
|
|
if (bVar2 != null) {
|
|
bVar2.a(bVar, i);
|
|
}
|
|
}
|
|
|
|
private void e() {
|
|
this.z.removeCallbacks(this.A);
|
|
}
|
|
|
|
private void c(CampaignEx campaignEx, int i) {
|
|
this.h.clearResState();
|
|
if (!TextUtils.isEmpty(campaignEx.getAdZip())) {
|
|
f(campaignEx, i);
|
|
}
|
|
if (campaignEx.isDynamicView()) {
|
|
return;
|
|
}
|
|
if (!TextUtils.isEmpty(campaignEx.getAdHtml())) {
|
|
e(campaignEx, i);
|
|
}
|
|
if (!TextUtils.isEmpty(campaignEx.getVideoUrlEncode())) {
|
|
g(campaignEx, i);
|
|
}
|
|
if (TextUtils.isEmpty(campaignEx.getImageUrl())) {
|
|
return;
|
|
}
|
|
d(campaignEx, i);
|
|
}
|
|
|
|
private void d(final CampaignEx campaignEx, final int i) {
|
|
d.a(this.h, campaignEx, new com.mbridge.msdk.splash.view.nativeview.a() { // from class: com.mbridge.msdk.splash.c.e.8
|
|
@Override // com.mbridge.msdk.splash.view.nativeview.a
|
|
public final void a() {
|
|
if (campaignEx.isDynamicView() && e.this.h != null) {
|
|
e.this.h.setImageReady(true);
|
|
e.b(e.this, campaignEx, i);
|
|
}
|
|
e.this.b(campaignEx, i);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.splash.view.nativeview.a
|
|
public final void b() {
|
|
if (!campaignEx.isDynamicView() || e.this.h == null) {
|
|
return;
|
|
}
|
|
e.this.h.setImageReady(false);
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880027);
|
|
e eVar = e.this;
|
|
eVar.a(bVar, eVar.n, i, campaignEx);
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:27:0x00bf, code lost:
|
|
|
|
if (r3 == null) goto L38;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:29:0x00c6, code lost:
|
|
|
|
if (r7.exists() == false) goto L45;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:31:0x00cc, code lost:
|
|
|
|
if (r7.isFile() == false) goto L45;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:33:0x00d2, code lost:
|
|
|
|
if (r7.canRead() == false) goto L45;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:34:0x00d4, code lost:
|
|
|
|
r10.setAdHtml(r7.getAbsolutePath());
|
|
a("file:////" + r7.getAbsolutePath(), r10, r11);
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:35:?, code lost:
|
|
|
|
return;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:37:0x00f4, code lost:
|
|
|
|
a(new com.mbridge.msdk.foundation.c.b(880013), r9.n, r11, r10);
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:38:?, code lost:
|
|
|
|
return;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:39:0x00aa, code lost:
|
|
|
|
r3.close();
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:47:0x00a8, code lost:
|
|
|
|
if (r3 != null) goto L31;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private void e(com.mbridge.msdk.foundation.entity.CampaignEx r10, int r11) {
|
|
/*
|
|
Method dump skipped, instructions count: 272
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.splash.c.e.e(com.mbridge.msdk.foundation.entity.CampaignEx, int):void");
|
|
}
|
|
|
|
private void f(final CampaignEx campaignEx, final int i) {
|
|
if (campaignEx.isDynamicView()) {
|
|
o.a(5, "", campaignEx.getAdZip(), new o.a() { // from class: com.mbridge.msdk.splash.c.e.9
|
|
@Override // com.mbridge.msdk.foundation.tools.o.a
|
|
public final void a(String str, String str2, String str3, String str4, boolean z) {
|
|
if (z) {
|
|
return;
|
|
}
|
|
e.a(e.this, campaignEx, str, true, "");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.tools.o.a
|
|
public final void a(String str, DownloadError downloadError) {
|
|
String str2 = "";
|
|
if (downloadError != null) {
|
|
try {
|
|
if (downloadError.getException() != null) {
|
|
str2 = downloadError.getException().getMessage();
|
|
}
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
e.printStackTrace();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
e.a(e.this, campaignEx, str, false, str2);
|
|
}
|
|
}, campaignEx);
|
|
return;
|
|
}
|
|
this.s = new H5DownLoadManager.ZipDownloadListener() { // from class: com.mbridge.msdk.splash.c.e.10
|
|
@Override // com.mbridge.msdk.foundation.download.download.H5DownLoadManager.H5ResDownloadListerInter
|
|
public final void onSuccess(String str, String str2, boolean z) {
|
|
Message obtain = Message.obtain();
|
|
obtain.what = 1;
|
|
obtain.obj = campaignEx;
|
|
obtain.arg1 = i;
|
|
e.this.z.sendMessage(obtain);
|
|
if (z) {
|
|
return;
|
|
}
|
|
CampaignEx campaignEx2 = campaignEx;
|
|
e.a(e.this, campaignEx, campaignEx2 != null ? campaignEx2.getAdZip() : "", true, "");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.download.download.H5DownLoadManager.H5ResDownloadListerInter
|
|
public final void onFailed(String str, String str2) {
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880006);
|
|
e eVar = e.this;
|
|
eVar.a(bVar, eVar.n, i, campaignEx);
|
|
Message obtain = Message.obtain();
|
|
obtain.what = 2;
|
|
Bundle bundle = new Bundle();
|
|
bundle.putSerializable("campaignex", campaignEx);
|
|
bundle.putString("msg", str);
|
|
bundle.putInt("type", 2);
|
|
obtain.obj = bundle;
|
|
e.this.z.sendMessage(obtain);
|
|
e.a(e.this, campaignEx, str2, false, str);
|
|
}
|
|
};
|
|
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
|
cVar.b(297);
|
|
cVar.a(2);
|
|
cVar.a(campaignEx);
|
|
cVar.c(campaignEx.getAabEntity() != null ? campaignEx.getAabEntity().h3c : 0);
|
|
H5DownLoadManager.getInstance().downloadH5Res(cVar, campaignEx.getAdZip(), this.s);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void a(String str, final CampaignEx campaignEx, final int i) {
|
|
g gVar;
|
|
g.c cVar = new g.c();
|
|
cVar.c(this.b);
|
|
cVar.b(this.c);
|
|
cVar.a(campaignEx);
|
|
cVar.a(str);
|
|
cVar.a(this.j);
|
|
cVar.a(this.k);
|
|
g.b bVar = new g.b() { // from class: com.mbridge.msdk.splash.c.e.2
|
|
@Override // com.mbridge.msdk.splash.c.g.b
|
|
public final void a() {
|
|
if (campaignEx.isHasMBTplMark()) {
|
|
return;
|
|
}
|
|
e.c(e.this, campaignEx, i);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.splash.c.g.b
|
|
public final void a(String str2) {
|
|
e.a(e.this, str2, i, campaignEx);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.splash.c.g.b
|
|
public final void a(int i2) {
|
|
if (i2 == 1) {
|
|
e.c(e.this, campaignEx, i);
|
|
} else {
|
|
e.a(e.this, "readyState 2", i, campaignEx);
|
|
}
|
|
}
|
|
};
|
|
gVar = g.a.a;
|
|
gVar.a(this.h, cVar, bVar);
|
|
}
|
|
|
|
private void g(final CampaignEx campaignEx, int i) {
|
|
this.r = new com.mbridge.msdk.videocommon.listener.a() { // from class: com.mbridge.msdk.splash.c.e.3
|
|
@Override // com.mbridge.msdk.videocommon.listener.a
|
|
public final void a(String str) {
|
|
e.this.h.setVideoReady(true);
|
|
Message obtain = Message.obtain();
|
|
obtain.obj = campaignEx;
|
|
obtain.what = 3;
|
|
e.this.z.sendMessage(obtain);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.videocommon.listener.a
|
|
public final void a(String str, String str2) {
|
|
e.this.h.setVideoReady(false);
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880004);
|
|
bVar.a(str);
|
|
e eVar = e.this;
|
|
eVar.a(bVar, eVar.n, e.this.o, campaignEx);
|
|
Message obtain = Message.obtain();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putSerializable("campaignex", campaignEx);
|
|
bundle.putString("msg", str);
|
|
bundle.putInt("type", 1);
|
|
obtain.obj = bundle;
|
|
obtain.what = 2;
|
|
e.this.z.sendMessage(obtain);
|
|
}
|
|
};
|
|
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = new CopyOnWriteArrayList<>();
|
|
copyOnWriteArrayList.add(campaignEx);
|
|
com.mbridge.msdk.videocommon.download.b.getInstance().createUnitCache(this.g, this.b, copyOnWriteArrayList, 297, this.r);
|
|
if (!com.mbridge.msdk.videocommon.download.b.getInstance().a(297, this.b, campaignEx.isBidCampaign())) {
|
|
com.mbridge.msdk.videocommon.download.b.getInstance().load(this.b);
|
|
} else {
|
|
this.h.setVideoReady(true);
|
|
b(campaignEx, i);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r2v0, types: [com.mbridge.msdk.foundation.same.report.d.a.a] */
|
|
/* JADX WARN: Type inference failed for: r2v3, types: [com.mbridge.msdk.foundation.entity.CampaignEx] */
|
|
/* JADX WARN: Type inference failed for: r2v4 */
|
|
/* JADX WARN: Type inference failed for: r2v5 */
|
|
public static /* synthetic */ void a(e eVar, CampaignUnit campaignUnit, int i, String str, String str2) {
|
|
ArrayList arrayList;
|
|
com.mbridge.msdk.foundation.c.b bVar;
|
|
CampaignEx campaignEx;
|
|
int i2;
|
|
k kVar;
|
|
final CampaignEx campaignEx2 = 0;
|
|
campaignEx2 = 0;
|
|
campaignEx2 = 0;
|
|
if (campaignUnit == null || campaignUnit.getAds() == null) {
|
|
arrayList = null;
|
|
} else {
|
|
arrayList = new ArrayList();
|
|
final CampaignEx campaignEx3 = campaignUnit.getAds().get(0);
|
|
campaignEx3.setCampaignUnitId(eVar.b);
|
|
new Thread(new Runnable() { // from class: com.mbridge.msdk.splash.c.e.7
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
j.a(com.mbridge.msdk.foundation.db.g.a(e.this.g)).a();
|
|
n.a(e.this.g, campaignEx3);
|
|
}
|
|
}).start();
|
|
eVar.t = campaignUnit.getSessionId();
|
|
if (campaignEx3.getOfferType() != 99 && (!TextUtils.isEmpty(campaignEx3.getAdZip()) || !TextUtils.isEmpty(campaignEx3.getAdHtml()))) {
|
|
if (ak.c(campaignEx3)) {
|
|
campaignEx3.setRtinsType(ak.c(eVar.g, campaignEx3.getPackageName()) ? 1 : 2);
|
|
}
|
|
if (com.mbridge.msdk.foundation.same.c.a(eVar.g, campaignEx3)) {
|
|
arrayList.add(campaignEx3);
|
|
} else {
|
|
ak.a(eVar.b, campaignEx3, com.mbridge.msdk.foundation.same.a.x);
|
|
eVar.y = "APP ALREADY INSTALLED";
|
|
}
|
|
try {
|
|
com.mbridge.msdk.foundation.same.c.a(campaignEx3, eVar.g, null, new c.a() { // from class: com.mbridge.msdk.splash.c.e.6
|
|
@Override // com.mbridge.msdk.foundation.same.c.a
|
|
public final void a(String str3, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
|
try {
|
|
com.mbridge.msdk.foundation.same.report.d.d.a().a(str3, cVar, campaignEx3, e.this.g, campaignEx2);
|
|
} catch (Exception e) {
|
|
af.b("SplashReport", e.getMessage());
|
|
}
|
|
}
|
|
});
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (arrayList == null || arrayList.size() <= 0) {
|
|
if (eVar.y.contains("INSTALLED")) {
|
|
bVar = new com.mbridge.msdk.foundation.c.b(880021, "APP ALREADY INSTALLED");
|
|
} else {
|
|
bVar = new com.mbridge.msdk.foundation.c.b(880003);
|
|
}
|
|
if (campaignUnit != null && campaignUnit.getAds() != null && campaignUnit.getAds().size() != 0) {
|
|
campaignEx2 = campaignUnit.getAds().get(0);
|
|
}
|
|
eVar.a(bVar, str2, i, campaignEx2);
|
|
return;
|
|
}
|
|
try {
|
|
i2 = eVar.u + 1;
|
|
eVar.u = i2;
|
|
kVar = eVar.i;
|
|
} catch (Exception e2) {
|
|
e2.printStackTrace();
|
|
}
|
|
if (kVar != null) {
|
|
if (i2 > kVar.w()) {
|
|
}
|
|
campaignEx = (CampaignEx) arrayList.get(0);
|
|
if (TextUtils.isEmpty(campaignEx.getAdZip()) || (!TextUtils.isEmpty(campaignEx.getAdHtml()) && campaignEx.getAdHtml().contains("<MBTPLMARK>"))) {
|
|
campaignEx.setHasMBTplMark(true);
|
|
campaignEx.setIsMraid(false);
|
|
} else {
|
|
campaignEx.setHasMBTplMark(false);
|
|
campaignEx.setIsMraid(true);
|
|
}
|
|
eVar.a(campaignEx, i);
|
|
}
|
|
eVar.u = 0;
|
|
campaignEx = (CampaignEx) arrayList.get(0);
|
|
if (TextUtils.isEmpty(campaignEx.getAdZip())) {
|
|
}
|
|
campaignEx.setHasMBTplMark(true);
|
|
campaignEx.setIsMraid(false);
|
|
eVar.a(campaignEx, i);
|
|
}
|
|
|
|
public static /* synthetic */ void b(e eVar, final CampaignEx campaignEx, final int i) {
|
|
c cVar;
|
|
if (campaignEx.isDynamicView()) {
|
|
c.a aVar = new c.a();
|
|
aVar.b(eVar.b).a(eVar.c).a(eVar.j).a(campaignEx).a(eVar.k).h(eVar.w);
|
|
try {
|
|
if (!TextUtils.isEmpty(campaignEx.getAdZip())) {
|
|
Uri parse = Uri.parse(campaignEx.getAdZip());
|
|
String queryParameter = parse.getQueryParameter("hdbtn");
|
|
String queryParameter2 = parse.getQueryParameter("alecfc");
|
|
String queryParameter3 = parse.getQueryParameter("hdinfo");
|
|
String queryParameter4 = parse.getQueryParameter("shake_show");
|
|
String queryParameter5 = parse.getQueryParameter("shake_strength");
|
|
String queryParameter6 = parse.getQueryParameter("shake_time");
|
|
String queryParameter7 = parse.getQueryParameter("n_logo");
|
|
if (!TextUtils.isEmpty(queryParameter)) {
|
|
aVar.b(Integer.parseInt(queryParameter));
|
|
}
|
|
if (!TextUtils.isEmpty(queryParameter2)) {
|
|
aVar.c(Integer.parseInt(queryParameter2));
|
|
}
|
|
if (!TextUtils.isEmpty(queryParameter3)) {
|
|
aVar.d(Integer.parseInt(queryParameter3));
|
|
}
|
|
if (!TextUtils.isEmpty(queryParameter4)) {
|
|
aVar.e(Integer.parseInt(queryParameter4));
|
|
}
|
|
if (!TextUtils.isEmpty(queryParameter5)) {
|
|
aVar.f(Integer.parseInt(queryParameter5));
|
|
}
|
|
if (!TextUtils.isEmpty(queryParameter6)) {
|
|
aVar.g(Integer.parseInt(queryParameter6));
|
|
}
|
|
if (!TextUtils.isEmpty(queryParameter7)) {
|
|
aVar.i(Integer.parseInt(queryParameter7) == 0 ? 0 : 1);
|
|
}
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b(a, th.getMessage());
|
|
}
|
|
cVar = c.a.a;
|
|
cVar.a(eVar.h, new com.mbridge.msdk.splash.a.c(aVar), new com.mbridge.msdk.splash.b.a() { // from class: com.mbridge.msdk.splash.c.e.11
|
|
@Override // com.mbridge.msdk.splash.b.a
|
|
public final void a(View view) {
|
|
if (e.this.h != null) {
|
|
e.this.h.setDynamicView(true);
|
|
e.this.h.setSplashNativeView(view);
|
|
e.this.b(campaignEx, i);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.splash.b.a
|
|
public final void a(String str) {
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880034);
|
|
bVar.a(str);
|
|
e eVar2 = e.this;
|
|
eVar2.a(bVar, eVar2.n, i, campaignEx);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(e eVar, CampaignEx campaignEx, String str, boolean z, String str2) {
|
|
try {
|
|
com.mbridge.msdk.foundation.entity.n nVar = new com.mbridge.msdk.foundation.entity.n();
|
|
nVar.e(2);
|
|
nVar.a("m_download_end");
|
|
if (campaignEx != null) {
|
|
nVar.d(campaignEx.isMraid() ? com.mbridge.msdk.foundation.entity.n.a : com.mbridge.msdk.foundation.entity.n.b);
|
|
nVar.g(campaignEx.getRequestIdNotice());
|
|
}
|
|
nVar.a("url", str);
|
|
nVar.a("scenes", "1");
|
|
if (z) {
|
|
nVar.b(1);
|
|
} else {
|
|
nVar.b(3);
|
|
nVar.h(str2);
|
|
}
|
|
com.mbridge.msdk.foundation.same.report.d.d.a().a(nVar, campaignEx);
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b(a, e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void c(e eVar, CampaignEx campaignEx, int i) {
|
|
if (eVar.h.isH5Ready()) {
|
|
return;
|
|
}
|
|
eVar.h.setH5Ready(true);
|
|
eVar.b(campaignEx, i);
|
|
}
|
|
|
|
public static /* synthetic */ void a(e eVar, String str, int i, CampaignEx campaignEx) {
|
|
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880009);
|
|
bVar.a(str);
|
|
eVar.a(bVar, eVar.n, i, campaignEx);
|
|
}
|
|
}
|