360 Wi-Fi v1.0.1版本的 MD5 值为:53dc85b63eb655b13344ce30ddaccae2
以下内容为反编译后的 b.java 源代码,内容仅作参考
package sg.bigo.ads.ad.interstitial.a.a;
import IILiIILllIilI.lliIllIlLlL;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewParent;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.ref.WeakReference;
import sg.bigo.ads.ad.banner.b;
import sg.bigo.ads.ad.banner.f;
import sg.bigo.ads.ad.interstitial.a.b.b;
import sg.bigo.ads.api.Ad;
import sg.bigo.ads.api.core.l;
import sg.bigo.ads.common.h;
import sg.bigo.ads.common.utils.t;
import sg.bigo.ads.common.utils.u;
import sg.bigo.ads.core.b.c;
import sg.bigo.ads.core.e.a.a;
import sg.bigo.ads.core.e.a.p;
import sg.bigo.ads.core.mraid.c;
import sg.bigo.ads.core.mraid.e;
import sg.bigo.ads.core.mraid.n;
import sg.bigo.ads.core.player.d;
public final class b implements b.InterfaceC0307b, sg.bigo.ads.ad.interstitial.a.b.b {
final a.C0360a a;
@Nullable
final d b;
@Nullable
final p c;
@NonNull
final Ad d;
@NonNull
final sg.bigo.ads.api.core.c e;
long f5432i;
sg.bigo.ads.core.b.b j;
public f k;
public e f5433l;
WebView m;
public View n;
boolean o;
boolean p;
@Nullable
final b.a s;
private final boolean t;
private final String u;
boolean f = false;
boolean g = false;
boolean h = false;
boolean q = false;
final C0312b r = new C0312b((byte) 0);
public final class a {
private a() {
}
@JavascriptInterface
public final void gameEnd(String str) {
b.a aVar = b.this.s;
if (aVar != null) {
aVar.b();
}
}
@JavascriptInterface
public final void onBGNDomContentLoaded() {
b bVar = b.this;
bVar.p = true;
b.a aVar = bVar.s;
if (aVar != null) {
aVar.c(bVar.e, SystemClock.elapsedRealtime() - b.this.f5432i);
}
}
@JavascriptInterface
public final void onBGNLoaded() {
b bVar = b.this;
bVar.o = true;
b.a aVar = bVar.s;
if (aVar != null) {
aVar.b(bVar.e, SystemClock.elapsedRealtime() - b.this.f5432i);
}
}
public a(b bVar, byte b) {
this();
}
}
public static final class C0312b {
private boolean a;
private int b;
private WeakReference<Activity> c;
private C0312b() {
this.a = false;
this.b = -1;
}
private void b() {
if (this.a) {
int i2 = this.b;
this.b = -1;
if (i2 == 0 || i2 == 1) {
WeakReference<Activity> weakReference = this.c;
Activity activity = weakReference == null ? null : weakReference.get();
if (activity == null) {
return;
}
activity.setRequestedOrientation(i2);
}
}
}
public final void a() {
this.a = true;
b();
}
public C0312b(byte b) {
this();
}
public final void a(Activity activity, int i2) {
this.b = i2;
this.c = new WeakReference<>(activity);
b();
}
}
public b(@NonNull Ad ad, @NonNull sg.bigo.ads.api.core.c cVar, @Nullable d dVar, @Nullable p pVar, @Nullable a.C0360a c0360a, @Nullable b.a aVar) {
this.a = c0360a;
String str = c0360a == null ? null : c0360a.b;
this.u = str;
this.b = dVar;
this.c = pVar;
this.d = ad;
this.e = cVar;
this.s = aVar;
this.t = !TextUtils.isEmpty(str);
}
@Override
@Nullable
public final View a() {
return this.n;
}
@Override
public final boolean b() {
if (this.t) {
return this.g;
}
return false;
}
@Override
public final void c() {
sg.bigo.ads.common.n.a.a(0, 3, "HtmlVastCompanion", "release");
sg.bigo.ads.ad.banner.b.h(this);
sg.bigo.ads.core.b.b bVar = this.j;
if (bVar != null) {
bVar.b();
}
e eVar = this.f5433l;
if (eVar != null) {
eVar.d();
this.f5433l = null;
}
WebView webView = this.m;
if (webView != null) {
u.a(webView);
this.m = null;
}
Ad ad = this.d;
if (ad instanceof l) {
((l) ad).q();
}
}
@Override
public final void d() {
b.a aVar;
if (this.o || this.p || this.q || (aVar = this.s) == null || this.f5432i <= 0) {
return;
}
aVar.d(this.e, SystemClock.elapsedRealtime() - this.f5432i);
}
@Override
public final void a(int i2) {
if (i2 == 1) {
this.r.a();
d dVar = this.b;
if (dVar != null) {
dVar.b();
}
}
}
@Override
@SuppressLint({"AddJavascriptInterface"})
public final boolean a(Context context) {
int i2;
int i3;
if (this.t) {
if (this.f5433l == null) {
try {
this.f5433l = new e(context, n.INTERSTITIAL);
} catch (NoClassDefFoundError unused) {
sg.bigo.ads.common.n.a.a(0, "HtmlVastCompanion", "Banner webview is not support");
}
e eVar = this.f5433l;
if (eVar == null) {
return false;
}
eVar.g = new e.b() {
@Override
public final void a() {
b bVar = b.this;
bVar.g = true;
bVar.h = false;
bVar.j = c.a.a().a(b.this.m, new View[0]);
b bVar2 = b.this;
if (bVar2.f) {
if (bVar2.m != null) {
sg.bigo.ads.common.n.a.a(0, 3, "HtmlVastCompanion", "javascript:onViewImpression()");
bVar2.m.loadUrl("javascript:onViewImpression()");
}
sg.bigo.ads.core.b.b bVar3 = b.this.j;
if (bVar3 != null) {
bVar3.a();
}
}
sg.bigo.ads.ad.banner.b.b(b.this);
b.a aVar = b.this.s;
if (aVar != null) {
aVar.a();
}
}
@Override
public final void b() {
b bVar = b.this;
bVar.h = false;
bVar.q = true;
sg.bigo.ads.ad.banner.b.c(bVar);
b bVar2 = b.this;
b.a aVar = bVar2.s;
if (aVar != null) {
aVar.a(bVar2.e, SystemClock.elapsedRealtime() - b.this.f5432i);
}
}
@Override
public final void c() {
sg.bigo.ads.common.n.a.a(0, "HtmlVastCompanion", "onRenderProcessGone");
}
@Override
public final void d() {
sg.bigo.ads.common.n.a.a(0, 3, "HtmlVastCompanion", "onExpand");
}
@Override
public final void e() {
sg.bigo.ads.common.n.a.a(0, 3, "HtmlVastCompanion", "onResize");
}
@Override
public final void f() {
f fVar = b.this.k;
if (fVar != null) {
fVar.a();
}
}
@Override
public final void g() {
f fVar = b.this.k;
if (fVar != null) {
fVar.a();
}
}
@Override
public final void a(@NonNull String str, @Nullable h hVar) {
b bVar = b.this;
sg.bigo.ads.common.n.a.a(0, 3, "HtmlVastCompanion", "handle ad click.");
b.a aVar = bVar.s;
sg.bigo.ads.api.core.e a2 = sg.bigo.ads.ad.interstitial.a.a.a.a(bVar.d, bVar.e, (aVar == null || !aVar.c()) ? null : null, bVar.c, bVar.b, bVar.a);
f fVar = bVar.k;
if (fVar != null) {
fVar.a(hVar, a2);
}
}
@Override
public final boolean b(Activity activity, int i4) {
b.this.r.a(activity, i4);
return true;
}
@Override
public final boolean a(Activity activity, int i4) {
b.this.r.a(activity, i4);
return true;
}
};
String lLLIIillILliIIL = lliIllIlLlL.lLLIIillILliIIL(lliIllIlLlL.lLLIIillILliIIL(c.a.a().d(this.u), "\n<script>document.addEventListener('DOMContentLoaded',function(){BGN_PLAYABLE.onBGNDomContentLoaded()});\nwindow.addEventListener('load',function(){BGN_PLAYABLE.onBGNLoaded()});</script>"), "\n<script type=\"text/javascript\">\n document.body.style.margin = '0px';\n</script>");
this.f5432i = SystemClock.elapsedRealtime();
b.a aVar = this.s;
if (aVar != null) {
aVar.a(this.e);
}
this.f5433l.a(lLLIIillILliIIL, new e.d() {
@Override
public final void a() {
sg.bigo.ads.common.n.a.a(0, 3, "HtmlVastCompanion", "onReady");
}
});
this.h = true;
t.a();
}
c.C0364c b = this.f5433l.b();
this.m = b;
if (b != null) {
b.setOverScrollMode(2);
this.m.setHorizontalScrollBarEnabled(false);
this.m.setHorizontalScrollbarOverlay(false);
this.m.setVerticalScrollBarEnabled(false);
this.m.setVerticalScrollbarOverlay(false);
this.m.getSettings().setSupportZoom(false);
this.m.setBackgroundColor(-1);
a.C0360a c0360a = this.a;
if (c0360a != null) {
i3 = c0360a.c;
i2 = c0360a.d;
} else {
i2 = 0;
i3 = 0;
}
WebView webView = this.m;
if (webView != null) {
ViewParent parent = webView.getParent();
if (parent instanceof FrameLayout) {
this.n = (View) parent;
sg.bigo.ads.ad.banner.b.a(this);
Context context2 = webView.getContext();
int i4 = context2.getResources().getDisplayMetrics().widthPixels;
int c = sg.bigo.ads.common.utils.e.c(context2);
if (sg.bigo.ads.common.utils.e.a(context2, i3) > i4 || sg.bigo.ads.common.utils.e.a(context2, i2) > c) {
i3 = 0;
}
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) webView.getLayoutParams();
if (i3 <= 0 || i2 <= 0) {
layoutParams.width = -1;
layoutParams.height = -1;
} else {
layoutParams.gravity = 17;
layoutParams.width = sg.bigo.ads.common.utils.e.a(context2, i3);
layoutParams.height = sg.bigo.ads.common.utils.e.a(context2, i2);
}
}
}
this.m.addJavascriptInterface(new a(this, (byte) 0), "BGN_PLAYABLE");
}
return true;
}
return false;
}
}