我要上王者 v1.1版本的 MD5 值为:b7d3566522def961cabeb92cb17f5db9
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.anythink.expressad.advanced.c;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.http.SslError;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import com.anythink.core.common.b.n;
import com.anythink.expressad.advanced.js.NativeAdvancedJSBridgeImpl;
import com.anythink.expressad.advanced.js.NativeAdvancedJsUtils;
import com.anythink.expressad.advanced.view.ATNativeAdvancedView;
import com.anythink.expressad.advanced.view.ATNativeAdvancedWebview;
import com.anythink.expressad.foundation.g.c.d;
import com.anythink.expressad.foundation.h.p;
import com.anythink.expressad.foundation.h.t;
import com.anythink.expressad.foundation.h.x;
import com.anythink.expressad.videocommon.b.e;
import com.anythink.expressad.videocommon.b.i;
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;
public final class a {
private static String f2858a = "NativeAdvancedLoadManager";
private static final int j = 1;
private static final int k = 2;
private static final int l = 3;
private static final int m = 4;
private static final int n = 5;
private int A;
private String f2859b;
private String c;
private long d;
private com.anythink.expressad.advanced.b.a e;
private ATNativeAdvancedView g;
private com.anythink.expressad.d.c h;
private com.anythink.expressad.foundation.d.c i;
private int o;
private int p;
private int q;
private int r;
private String s;
private int t;
private boolean u;
private volatile boolean v;
private com.anythink.expressad.videocommon.d.c w;
private i.d x;
private i.d y;
private String z;
private String B = "";
private Handler C = new Handler(Looper.getMainLooper()) {
@Override
public final void handleMessage(Message message) {
Object obj;
super.handleMessage(message);
int i = message.what;
if (i == 1) {
Object obj2 = message.obj;
int i2 = message.arg1;
if (obj2 == null || !(obj2 instanceof com.anythink.expressad.foundation.d.c)) {
return;
}
com.anythink.expressad.foundation.d.c cVar = (com.anythink.expressad.foundation.d.c) obj2;
a.a(a.this, i.a().c(cVar.c()), cVar, i2);
} else if (i == 2) {
Object obj3 = message.obj;
if (obj3 == null || !(obj3 instanceof String)) {
return;
}
a aVar = a.this;
String obj4 = obj3.toString();
String unused = a.this.s;
aVar.b(obj4, a.this.t);
} else if (i == 3) {
Object obj5 = message.obj;
if (obj5 == null || !(obj5 instanceof com.anythink.expressad.foundation.d.c)) {
return;
}
a aVar2 = a.this;
aVar2.a((com.anythink.expressad.foundation.d.c) obj5, aVar2.t);
} else if (i == 4) {
Object obj6 = message.obj;
if (obj6 == null || !(obj6 instanceof com.anythink.expressad.foundation.d.c)) {
return;
}
if (a.this.g != null) {
a.this.g.setEndCardReady(true);
}
a aVar3 = a.this;
aVar3.a((com.anythink.expressad.foundation.d.c) obj6, aVar3.t);
} else if (i == 5 && (obj = message.obj) != null && (obj instanceof com.anythink.expressad.foundation.d.c)) {
if (a.this.g != null) {
a.this.g.setVideoReady(true);
}
a aVar4 = a.this;
aVar4.a((com.anythink.expressad.foundation.d.c) obj, aVar4.t);
}
}
};
private Runnable D = new Runnable() {
@Override
public final void run() {
a aVar = a.this;
String unused = aVar.s;
aVar.b("load timeout", a.this.t);
}
};
private Context f = n.a().f();
private static void g() {
}
private static void j() {
}
public a(String str, String str2) {
this.c = str;
this.f2859b = str2;
}
public final void a(com.anythink.expressad.d.c cVar) {
this.h = cVar;
}
public final void a(ATNativeAdvancedView aTNativeAdvancedView) {
this.g = aTNativeAdvancedView;
}
public final void a(int i) {
this.o = i;
}
private int e() {
return this.p;
}
private void b(int i) {
this.p = i;
}
public final void a(int i, int i2) {
this.r = i;
this.q = i2;
}
private void a(long j2) {
this.C.postDelayed(this.D, j2);
}
private void f() {
try {
int i = this.A + 1;
this.A = i;
com.anythink.expressad.d.c cVar = this.h;
if (cVar == null || i > cVar.t()) {
this.A = 0;
}
new StringBuilder("onload 算出 下次的offset是:").append(this.A);
} catch (Exception e) {
e.printStackTrace();
}
}
public final String a() {
return this.B;
}
private void h() {
this.A = 0;
}
public final void a(com.anythink.expressad.advanced.b.a aVar) {
this.e = aVar;
}
public final void b() {
if (this.e != null) {
this.e = null;
}
b("LoadManager release", this.t);
if (this.w != null) {
this.w = null;
}
if (this.x != null) {
this.x = null;
}
}
public final com.anythink.expressad.foundation.d.c c() {
return this.i;
}
private void a(com.anythink.expressad.foundation.d.c cVar) {
this.i = cVar;
if (c.a(this.g, cVar)) {
a(cVar, 2);
return;
}
ATNativeAdvancedView aTNativeAdvancedView = this.g;
if (aTNativeAdvancedView != null) {
aTNativeAdvancedView.clearResState();
}
if (!TextUtils.isEmpty(cVar.c())) {
new StringBuilder("start download zip: ").append(cVar.c());
this.x = new AnonymousClass8(cVar);
i.a().b(cVar.c(), (i.a) this.x);
}
if (!TextUtils.isEmpty(cVar.d())) {
new StringBuilder("start download HTML: ").append(cVar.d());
com.anythink.core.common.o.b.b.a().a(new AnonymousClass7(cVar));
}
if (!TextUtils.isEmpty(cVar.S())) {
new StringBuilder("start download Video: ").append(cVar.S());
this.w = new AnonymousClass2(cVar);
ArrayList arrayList = new ArrayList();
arrayList.add(cVar);
e.a().a(this.f2859b, arrayList, com.anythink.expressad.foundation.g.a.aX, this.w);
if (!e.a().a(com.anythink.expressad.foundation.g.a.aX, this.f2859b, cVar.A())) {
e.a().d(this.f2859b);
} else {
this.g.setVideoReady(true);
a(cVar, 2);
}
}
if (!TextUtils.isEmpty(cVar.be())) {
new StringBuilder("start download image: ").append(cVar.be());
com.anythink.expressad.foundation.g.d.b.a(n.a().f()).a(cVar.be(), new AnonymousClass6(cVar));
}
if (!TextUtils.isEmpty(cVar.I())) {
new StringBuilder("start download EndCard: ").append(cVar.I());
this.y = new AnonymousClass5(cVar);
i.a().b(cVar.I(), (i.a) this.y);
}
if (TextUtils.isEmpty(cVar.y())) {
return;
}
new StringBuilder("start download gitUrl: ").append(cVar.y());
com.anythink.expressad.foundation.g.d.b.a(n.a().f()).a(cVar.y(), new AnonymousClass4(cVar));
}
public void a(com.anythink.expressad.foundation.d.c cVar, int i) {
if (!c.a(this.g, cVar) || this.v) {
return;
}
i();
this.v = true;
com.anythink.expressad.advanced.b.a aVar = this.e;
if (aVar != null) {
aVar.a(cVar, i);
}
}
private void a(String str, int i) {
b(str, i);
}
public void b(String str, int i) {
if (this.v) {
return;
}
i();
this.v = true;
com.anythink.expressad.advanced.b.a aVar = this.e;
if (aVar != null) {
aVar.a(str, i);
}
}
private void i() {
this.C.removeCallbacks(this.D);
}
private void b(com.anythink.expressad.foundation.d.c cVar) {
ATNativeAdvancedView aTNativeAdvancedView = this.g;
if (aTNativeAdvancedView != null) {
aTNativeAdvancedView.clearResState();
}
if (!TextUtils.isEmpty(cVar.c())) {
new StringBuilder("start download zip: ").append(cVar.c());
this.x = new AnonymousClass8(cVar);
i.a().b(cVar.c(), (i.a) this.x);
}
if (!TextUtils.isEmpty(cVar.d())) {
new StringBuilder("start download HTML: ").append(cVar.d());
com.anythink.core.common.o.b.b.a().a(new AnonymousClass7(cVar));
}
if (!TextUtils.isEmpty(cVar.S())) {
new StringBuilder("start download Video: ").append(cVar.S());
this.w = new AnonymousClass2(cVar);
ArrayList arrayList = new ArrayList();
arrayList.add(cVar);
e.a().a(this.f2859b, arrayList, com.anythink.expressad.foundation.g.a.aX, this.w);
if (!e.a().a(com.anythink.expressad.foundation.g.a.aX, this.f2859b, cVar.A())) {
e.a().d(this.f2859b);
} else {
this.g.setVideoReady(true);
a(cVar, 2);
}
}
if (!TextUtils.isEmpty(cVar.be())) {
new StringBuilder("start download image: ").append(cVar.be());
com.anythink.expressad.foundation.g.d.b.a(n.a().f()).a(cVar.be(), new AnonymousClass6(cVar));
}
if (!TextUtils.isEmpty(cVar.I())) {
new StringBuilder("start download EndCard: ").append(cVar.I());
this.y = new AnonymousClass5(cVar);
i.a().b(cVar.I(), (i.a) this.y);
}
if (TextUtils.isEmpty(cVar.y())) {
return;
}
new StringBuilder("start download gitUrl: ").append(cVar.y());
com.anythink.expressad.foundation.g.d.b.a(n.a().f()).a(cVar.y(), new AnonymousClass4(cVar));
}
final class AnonymousClass4 implements com.anythink.expressad.foundation.g.d.c {
final com.anythink.expressad.foundation.d.c f2866a;
final int f2867b = 2;
AnonymousClass4(com.anythink.expressad.foundation.d.c cVar) {
this.f2866a = cVar;
}
@Override
public final void a(Bitmap bitmap, String str) {
String unused = a.f2858a;
if (a.this.C != null) {
a.this.C.post(new Runnable() {
@Override
public final void run() {
a.this.a(AnonymousClass4.this.f2866a, AnonymousClass4.this.f2867b);
}
});
}
}
@Override
public final void a(String str, String str2) {
String unused = a.f2858a;
if (a.this.C != null) {
a.this.C.post(new Runnable() {
@Override
public final void run() {
a.this.a(AnonymousClass4.this.f2866a, AnonymousClass4.this.f2867b);
}
});
}
}
}
private void c(com.anythink.expressad.foundation.d.c cVar) {
com.anythink.expressad.foundation.g.d.b.a(n.a().f()).a(cVar.y(), new AnonymousClass4(cVar));
}
final class AnonymousClass5 implements i.d {
final com.anythink.expressad.foundation.d.c f2870a;
final int f2871b = 2;
AnonymousClass5(com.anythink.expressad.foundation.d.c cVar) {
this.f2870a = cVar;
}
@Override
public final void a(String str) {
String unused = a.f2858a;
if (a.this.C != null) {
Message obtain = Message.obtain();
obtain.what = 4;
obtain.obj = this.f2870a;
obtain.arg1 = this.f2871b;
a.this.C.sendMessage(obtain);
}
}
@Override
public final void a(String str, String str2) {
String unused = a.f2858a;
if (a.this.g != null) {
a.this.g.setEndCardReady(false);
}
Message obtain = Message.obtain();
obtain.what = 2;
obtain.obj = str;
a.this.C.sendMessage(obtain);
}
}
private void d(com.anythink.expressad.foundation.d.c cVar) {
this.y = new AnonymousClass5(cVar);
i.a().b(cVar.I(), (i.a) this.y);
}
final class AnonymousClass6 implements com.anythink.expressad.foundation.g.d.c {
final com.anythink.expressad.foundation.d.c f2872a;
final int f2873b = 2;
AnonymousClass6(com.anythink.expressad.foundation.d.c cVar) {
this.f2872a = cVar;
}
@Override
public final void a(Bitmap bitmap, String str) {
String unused = a.f2858a;
if (a.this.C != null) {
a.this.C.post(new Runnable() {
@Override
public final void run() {
a.this.a(AnonymousClass6.this.f2872a, AnonymousClass6.this.f2873b);
}
});
}
}
@Override
public final void a(String str, String str2) {
String unused = a.f2858a;
if (a.this.C != null) {
a.this.C.post(new Runnable() {
@Override
public final void run() {
a.this.a(AnonymousClass6.this.f2872a, AnonymousClass6.this.f2873b);
}
});
}
}
}
private void e(com.anythink.expressad.foundation.d.c cVar) {
com.anythink.expressad.foundation.g.d.b.a(n.a().f()).a(cVar.be(), new AnonymousClass6(cVar));
}
final class AnonymousClass7 implements Runnable {
final com.anythink.expressad.foundation.d.c f2876a;
final int f2877b = 2;
AnonymousClass7(com.anythink.expressad.foundation.d.c cVar) {
this.f2876a = cVar;
}
@Override
public final void run() {
File file;
final File file2;
FileOutputStream fileOutputStream = null;
try {
try {
try {
file2 = new File(this.f2876a.d());
try {
if (!file2.exists()) {
String b2 = d.b(com.anythink.expressad.foundation.g.c.a.ANYTHINK_700_HTML);
String a2 = p.a(x.a(this.f2876a.d()));
if (TextUtils.isEmpty(a2)) {
a2 = String.valueOf(System.currentTimeMillis());
}
file = new File(b2, a2.concat(".html"));
try {
if (!file.exists()) {
FileOutputStream fileOutputStream2 = new FileOutputStream(file);
try {
StringBuilder sb = new StringBuilder();
sb.append("<script>");
com.anythink.expressad.d.b.a.a();
sb.append(com.anythink.expressad.d.b.a.b());
sb.append("</script>");
sb.append(this.f2876a.d());
fileOutputStream2.write(sb.toString().getBytes());
fileOutputStream2.flush();
fileOutputStream = fileOutputStream2;
} catch (Exception e) {
e = e;
fileOutputStream = fileOutputStream2;
e.printStackTrace();
this.f2876a.j("");
if (fileOutputStream != null) {
fileOutputStream.close();
}
file2 = file;
if (file2.exists()) {
}
String unused = a.f2858a;
a aVar = a.this;
String unused2 = aVar.s;
aVar.b("html file write failed", this.f2877b);
return;
} catch (Throwable th) {
th = th;
fileOutputStream = fileOutputStream2;
if (fileOutputStream != null) {
fileOutputStream.close();
}
throw th;
}
}
file2 = file;
} catch (Exception e2) {
e = e2;
}
}
if (fileOutputStream != null) {
fileOutputStream.close();
}
} catch (Exception e3) {
e = e3;
file = file2;
}
} catch (Throwable th2) {
th = th2;
}
} catch (Exception e4) {
e = e4;
file = null;
}
if (file2.exists() || !file2.isFile() || !file2.canRead()) {
String unused3 = a.f2858a;
a aVar2 = a.this;
String unused22 = aVar2.s;
aVar2.b("html file write failed", this.f2877b);
return;
}
this.f2876a.b(file2.getAbsolutePath());
String unused4 = a.f2858a;
n.a().b(new Runnable() {
@Override
public final void run() {
a aVar3 = a.this;
a.a(aVar3, "file:////" + file2.getAbsolutePath(), AnonymousClass7.this.f2876a, AnonymousClass7.this.f2877b);
}
});
} catch (Exception e5) {
a aVar3 = a.this;
String message = e5.getMessage();
String unused5 = a.this.s;
aVar3.b(message, this.f2877b);
}
}
}
private void f(com.anythink.expressad.foundation.d.c cVar) {
com.anythink.core.common.o.b.b.a().a(new AnonymousClass7(cVar));
}
final class AnonymousClass8 implements i.d {
final com.anythink.expressad.foundation.d.c f2880a;
final int f2881b = 2;
AnonymousClass8(com.anythink.expressad.foundation.d.c cVar) {
this.f2880a = cVar;
}
@Override
public final void a(String str) {
String unused = a.f2858a;
Message obtain = Message.obtain();
obtain.what = 1;
obtain.obj = this.f2880a;
obtain.arg1 = this.f2881b;
a.this.C.sendMessage(obtain);
}
@Override
public final void a(String str, String str2) {
String unused = a.f2858a;
StringBuilder sb = new StringBuilder("zip download fail: ");
sb.append(str2);
sb.append(" ");
sb.append(str);
Message obtain = Message.obtain();
obtain.what = 2;
obtain.obj = str;
a.this.C.sendMessage(obtain);
}
}
private void g(com.anythink.expressad.foundation.d.c cVar) {
this.x = new AnonymousClass8(cVar);
i.a().b(cVar.c(), (i.a) this.x);
}
private void a(String str, com.anythink.expressad.foundation.d.c cVar, int i) {
ATNativeAdvancedView aTNativeAdvancedView = this.g;
if (aTNativeAdvancedView == null || aTNativeAdvancedView.getAdvancedNativeWebview() == null) {
return;
}
NativeAdvancedJSBridgeImpl nativeAdvancedJSBridgeImpl = new NativeAdvancedJSBridgeImpl(this.g.getContext(), this.c, this.f2859b);
ArrayList arrayList = new ArrayList();
arrayList.add(cVar);
nativeAdvancedJSBridgeImpl.setCampaignList(arrayList);
nativeAdvancedJSBridgeImpl.setAllowSkip(this.o);
nativeAdvancedJSBridgeImpl.setCountdownS(this.p);
this.g.setAdvancedNativeJSBridgeImpl(nativeAdvancedJSBridgeImpl);
System.currentTimeMillis();
ATNativeAdvancedWebview advancedNativeWebview = this.g.getAdvancedNativeWebview();
if (advancedNativeWebview != null) {
if (advancedNativeWebview == null || !advancedNativeWebview.isDestroyed()) {
advancedNativeWebview.setWebViewListener(new AnonymousClass9(cVar, i));
if (!advancedNativeWebview.isDestroyed()) {
Handler handler = this.C;
if (handler != null) {
handler.post(new AnonymousClass10(advancedNativeWebview, str));
return;
}
return;
}
b("webview has destory", i);
return;
}
b("webview is destroyed", i);
return;
}
b("webview is null", i);
}
public final class AnonymousClass9 extends com.anythink.expressad.atsignalcommon.a.b {
final com.anythink.expressad.foundation.d.c f2882a;
final int f2883b;
AnonymousClass9(com.anythink.expressad.foundation.d.c cVar, int i) {
this.f2882a = cVar;
this.f2883b = i;
}
@Override
public final void readyState(WebView webView, int i) {
super.readyState(webView, i);
if (i == 1) {
a.this.g.setH5Ready(true);
com.anythink.expressad.advanced.a.a.a(this.f2882a.Z());
a.b(a.this, this.f2882a, this.f2883b);
return;
}
a.this.b("readyState 2", this.f2883b);
}
@Override
public final void onReceivedError(WebView webView, int i, String str, String str2) {
super.onReceivedError(webView, i, str, str2);
StringBuilder sb = new StringBuilder("onReceivedError: ");
sb.append(i);
sb.append(" ");
sb.append(str);
sb.append(" ");
sb.append(str2);
a.this.b(str, this.f2883b);
}
@Override
public final void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
super.onReceivedSslError(webView, sslErrorHandler, sslError);
new StringBuilder("onReceivedSslError: ").append(sslError.getPrimaryError());
a aVar = a.this;
aVar.b("onReceivedSslError:" + sslError.getUrl(), this.f2883b);
}
@Override
public final void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
if (!this.f2882a.s()) {
a.this.g.setH5Ready(true);
com.anythink.expressad.advanced.a.a.a(this.f2882a.Z());
a.b(a.this, this.f2882a, this.f2883b);
}
NativeAdvancedJsUtils.fireOnJSBridgeConnected(webView);
}
}
public final class AnonymousClass10 implements Runnable {
final ATNativeAdvancedWebview f2861a;
final String f2862b;
AnonymousClass10(ATNativeAdvancedWebview aTNativeAdvancedWebview, String str) {
this.f2861a = aTNativeAdvancedWebview;
this.f2862b = str;
}
@Override
public final void run() {
this.f2861a.loadUrl(x.c(this.f2862b));
}
}
private void b(com.anythink.expressad.foundation.d.c cVar, int i) {
if (this.g.isH5Ready()) {
a(cVar, i);
}
}
final class AnonymousClass2 implements com.anythink.expressad.videocommon.d.c {
final com.anythink.expressad.foundation.d.c f2863a;
AnonymousClass2(com.anythink.expressad.foundation.d.c cVar) {
this.f2863a = cVar;
}
@Override
public final void a(String str) {
String unused = a.f2858a;
Message obtain = Message.obtain();
obtain.obj = this.f2863a;
obtain.what = 5;
a.this.C.sendMessage(obtain);
}
@Override
public final void a(String str, String str2) {
String unused = a.f2858a;
Message obtain = Message.obtain();
obtain.obj = str;
obtain.what = 2;
a.this.C.sendMessage(obtain);
}
}
private void h(com.anythink.expressad.foundation.d.c cVar) {
this.w = new AnonymousClass2(cVar);
ArrayList arrayList = new ArrayList();
arrayList.add(cVar);
e.a().a(this.f2859b, arrayList, com.anythink.expressad.foundation.g.a.aX, this.w);
if (!e.a().a(com.anythink.expressad.foundation.g.a.aX, this.f2859b, cVar.A())) {
e.a().d(this.f2859b);
return;
}
this.g.setVideoReady(true);
a(cVar, 2);
}
public final String a(String str) {
int k2;
if (this.i != null) {
try {
com.anythink.expressad.videocommon.b.c a2 = e.a().a(this.f2859b, this.i.aZ() + this.i.S() + this.i.B());
if (a2 == null || (k2 = a2.k()) != 5) {
return str;
}
String e = a2.e();
if (new File(e).exists()) {
StringBuilder sb = new StringBuilder("download success locally,use local video url:");
sb.append(e);
sb.append(" state:");
sb.append(k2);
return e;
}
return str;
} catch (Exception e2) {
e2.printStackTrace();
return str;
}
}
return "";
}
public final void a(com.anythink.expressad.foundation.d.d dVar) {
ArrayList arrayList;
if (dVar == null || dVar.J == null) {
arrayList = null;
} else {
arrayList = new ArrayList();
com.anythink.expressad.foundation.d.c cVar = dVar.J.get(0);
cVar.l(this.f2859b);
this.z = dVar.c();
if (cVar.O() != 99 && (!TextUtils.isEmpty(cVar.c()) || !TextUtils.isEmpty(cVar.d()))) {
if (t.a(cVar)) {
cVar.i(t.a(this.f, cVar.ba()) ? 1 : 2);
}
if (cVar.ae() == 1 || !t.a(this.f, cVar.ba())) {
arrayList.add(cVar);
} else {
StringBuilder sb = new StringBuilder("onload: ");
sb.append(cVar.bb());
sb.append(" has been installed.");
if (t.a(cVar)) {
arrayList.add(cVar);
}
}
}
}
if (arrayList != null && arrayList.size() > 0) {
try {
int i = this.A + 1;
this.A = i;
com.anythink.expressad.d.c cVar2 = this.h;
if (cVar2 == null || i > cVar2.t()) {
this.A = 0;
}
new StringBuilder("onload 算出 下次的offset是:").append(this.A);
} catch (Exception e) {
e.printStackTrace();
}
new StringBuilder("onload load成功 size:").append(arrayList.size());
com.anythink.expressad.foundation.d.c cVar3 = (com.anythink.expressad.foundation.d.c) arrayList.get(0);
if (!TextUtils.isEmpty(cVar3.c()) || (!TextUtils.isEmpty(cVar3.d()) && cVar3.d().contains("<MBTPLMARK>"))) {
cVar3.a(true);
cVar3.b(false);
} else {
cVar3.a(false);
cVar3.b(true);
}
this.i = cVar3;
if (c.a(this.g, cVar3)) {
a(cVar3, 2);
return;
}
ATNativeAdvancedView aTNativeAdvancedView = this.g;
if (aTNativeAdvancedView != null) {
aTNativeAdvancedView.clearResState();
}
if (!TextUtils.isEmpty(cVar3.c())) {
new StringBuilder("start download zip: ").append(cVar3.c());
this.x = new AnonymousClass8(cVar3);
i.a().b(cVar3.c(), (i.a) this.x);
}
if (!TextUtils.isEmpty(cVar3.d())) {
new StringBuilder("start download HTML: ").append(cVar3.d());
com.anythink.core.common.o.b.b.a().a(new AnonymousClass7(cVar3));
}
if (!TextUtils.isEmpty(cVar3.S())) {
new StringBuilder("start download Video: ").append(cVar3.S());
this.w = new AnonymousClass2(cVar3);
ArrayList arrayList2 = new ArrayList();
arrayList2.add(cVar3);
e.a().a(this.f2859b, arrayList2, com.anythink.expressad.foundation.g.a.aX, this.w);
if (!e.a().a(com.anythink.expressad.foundation.g.a.aX, this.f2859b, cVar3.A())) {
e.a().d(this.f2859b);
} else {
this.g.setVideoReady(true);
a(cVar3, 2);
}
}
if (!TextUtils.isEmpty(cVar3.be())) {
new StringBuilder("start download image: ").append(cVar3.be());
com.anythink.expressad.foundation.g.d.b.a(n.a().f()).a(cVar3.be(), new AnonymousClass6(cVar3));
}
if (!TextUtils.isEmpty(cVar3.I())) {
new StringBuilder("start download EndCard: ").append(cVar3.I());
this.y = new AnonymousClass5(cVar3);
i.a().b(cVar3.I(), (i.a) this.y);
}
if (TextUtils.isEmpty(cVar3.y())) {
return;
}
new StringBuilder("start download gitUrl: ").append(cVar3.y());
com.anythink.expressad.foundation.g.d.b.a(n.a().f()).a(cVar3.y(), new AnonymousClass4(cVar3));
return;
}
b("invalid campaign", 2);
}
private List<com.anythink.expressad.foundation.d.c> b(com.anythink.expressad.foundation.d.d dVar) {
if (dVar == null || dVar.J == null) {
return null;
}
ArrayList arrayList = new ArrayList();
com.anythink.expressad.foundation.d.c cVar = dVar.J.get(0);
cVar.l(this.f2859b);
this.z = dVar.c();
if (cVar.O() != 99) {
if (TextUtils.isEmpty(cVar.c()) && TextUtils.isEmpty(cVar.d())) {
return arrayList;
}
if (t.a(cVar)) {
cVar.i(t.a(this.f, cVar.ba()) ? 1 : 2);
}
if (cVar.ae() == 1 || !t.a(this.f, cVar.ba())) {
arrayList.add(cVar);
return arrayList;
}
StringBuilder sb = new StringBuilder("onload: ");
sb.append(cVar.bb());
sb.append(" has been installed.");
if (t.a(cVar)) {
arrayList.add(cVar);
return arrayList;
}
return arrayList;
}
return arrayList;
}
private void c(String str, int i) {
b(str, i);
}
static void a(a aVar, String str, com.anythink.expressad.foundation.d.c cVar, int i) {
ATNativeAdvancedView aTNativeAdvancedView = aVar.g;
if (aTNativeAdvancedView == null || aTNativeAdvancedView.getAdvancedNativeWebview() == null) {
return;
}
NativeAdvancedJSBridgeImpl nativeAdvancedJSBridgeImpl = new NativeAdvancedJSBridgeImpl(aVar.g.getContext(), aVar.c, aVar.f2859b);
ArrayList arrayList = new ArrayList();
arrayList.add(cVar);
nativeAdvancedJSBridgeImpl.setCampaignList(arrayList);
nativeAdvancedJSBridgeImpl.setAllowSkip(aVar.o);
nativeAdvancedJSBridgeImpl.setCountdownS(aVar.p);
aVar.g.setAdvancedNativeJSBridgeImpl(nativeAdvancedJSBridgeImpl);
System.currentTimeMillis();
ATNativeAdvancedWebview advancedNativeWebview = aVar.g.getAdvancedNativeWebview();
if (advancedNativeWebview != null) {
if (advancedNativeWebview == null || !advancedNativeWebview.isDestroyed()) {
advancedNativeWebview.setWebViewListener(new AnonymousClass9(cVar, i));
if (!advancedNativeWebview.isDestroyed()) {
Handler handler = aVar.C;
if (handler != null) {
handler.post(new AnonymousClass10(advancedNativeWebview, str));
return;
}
return;
}
aVar.b("webview has destory", i);
return;
}
aVar.b("webview is destroyed", i);
return;
}
aVar.b("webview is null", i);
}
static void b(a aVar, com.anythink.expressad.foundation.d.c cVar, int i) {
if (aVar.g.isH5Ready()) {
aVar.a(cVar, i);
}
}
}