Step Record v1.1.5版本的 MD5 值为:5797275f89198878d2f00ee92d534382
以下内容为反编译后的 b.java 源代码,内容仅作参考
package sg.bigo.ads.ad.interstitial.a.a;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.Point;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.chartboost.heliumsdk.impl.tStt1z;
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.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.InterfaceC0469b, sg.bigo.ads.ad.interstitial.a.b.b {
final a.C0513a a;
@Nullable
final d b;
@Nullable
final p c;
@NonNull
final Ad d;
@NonNull
final sg.bigo.ads.api.core.c e;
long i;
sg.bigo.ads.core.b.b j;
public f k;
public e l;
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 C0472b r = new C0472b(0);
public final class a {
private a() {
}
public a(b bVar, byte b) {
this();
}
@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.i);
}
}
@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.i);
}
}
}
public static final class C0472b {
private boolean a;
private int b;
private WeakReference<Activity> c;
private C0472b() {
this.a = false;
this.b = -1;
}
public C0472b(byte b) {
this();
}
private void b() {
if (this.a) {
int i = this.b;
this.b = -1;
if (i == 0 || i == 1) {
WeakReference<Activity> weakReference = this.c;
Activity activity = weakReference == null ? null : weakReference.get();
if (activity == null) {
return;
}
activity.setRequestedOrientation(i);
}
}
}
public final void a() {
this.a = true;
b();
}
public final void a(Activity activity, int i) {
this.b = i;
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.C0513a c0513a, @Nullable b.a aVar) {
this.a = c0513a;
this.u = c0513a == null ? null : c0513a.b;
this.b = dVar;
this.c = pVar;
this.d = ad;
this.e = cVar;
this.s = aVar;
this.t = !TextUtils.isEmpty(r7);
}
@Override
@Nullable
public final View a() {
return this.n;
}
@Override
public final void a(int i) {
if (i == 1) {
this.r.a();
d dVar = this.b;
if (dVar != null) {
dVar.b();
}
}
}
@Override
@SuppressLint({"AddJavascriptInterface"})
public final boolean a(Context context) {
int i;
int i2;
byte b = 0;
if (!this.t) {
return false;
}
if (this.l == null) {
try {
this.l = new e(context, n.INTERSTITIAL);
} catch (NoClassDefFoundError unused) {
sg.bigo.ads.common.l.a.a(0, "HtmlVastCompanion", "Banner webview is not support");
}
e eVar = this.l;
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.l.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 a(@NonNull String str, @Nullable Point point) {
b bVar = b.this;
sg.bigo.ads.common.l.a.a(0, 3, "HtmlVastCompanion", "handle ad click.");
b.a aVar = bVar.s;
if (aVar == null || !aVar.c()) {
str = null;
}
sg.bigo.ads.api.core.e a2 = sg.bigo.ads.ad.interstitial.a.a.a.a(bVar.d, bVar.e, str, bVar.c, bVar.b, bVar.a);
f fVar = bVar.k;
if (fVar != null) {
fVar.a(point, a2);
}
}
@Override
public final boolean a(Activity activity, int i3) {
b.this.r.a(activity, i3);
return true;
}
@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.i);
}
}
@Override
public final boolean b(Activity activity, int i3) {
b.this.r.a(activity, i3);
return true;
}
@Override
public final void c() {
sg.bigo.ads.common.l.a.a(0, "HtmlVastCompanion", "onRenderProcessGone");
}
@Override
public final void d() {
sg.bigo.ads.common.l.a.a(0, 3, "HtmlVastCompanion", "onExpand");
}
@Override
public final void e() {
sg.bigo.ads.common.l.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();
}
}
};
String t1H1KH1K = tStt1z.t1H1KH1K(tStt1z.t1H1KH1K(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.i = SystemClock.elapsedRealtime();
b.a aVar = this.s;
if (aVar != null) {
aVar.a(this.e);
}
this.l.a(t1H1KH1K, new e.d() {
@Override
public final void a() {
sg.bigo.ads.common.l.a.a(0, 3, "HtmlVastCompanion", "onReady");
}
});
this.h = true;
t.a();
}
c.C0517c b2 = this.l.b();
this.m = b2;
if (b2 != null) {
b2.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.C0513a c0513a = this.a;
if (c0513a != null) {
i2 = c0513a.c;
i = c0513a.d;
} else {
i = 0;
i2 = 0;
}
WebView webView = this.m;
if (webView != null) {
Object parent = webView.getParent();
if (parent instanceof FrameLayout) {
this.n = (View) parent;
sg.bigo.ads.ad.banner.b.a(this);
Context context2 = webView.getContext();
int i3 = context2.getResources().getDisplayMetrics().widthPixels;
int c = sg.bigo.ads.common.utils.e.c(context2);
if (sg.bigo.ads.common.utils.e.a(context2, i2) > i3 || sg.bigo.ads.common.utils.e.a(context2, i) > c) {
i2 = 0;
}
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) webView.getLayoutParams();
if (i2 > 0 && i > 0) {
layoutParams.gravity = 17;
layoutParams.width = sg.bigo.ads.common.utils.e.a(context2, i2);
layoutParams.height = sg.bigo.ads.common.utils.e.a(context2, i);
} else {
layoutParams.width = -1;
layoutParams.height = -1;
}
}
}
this.m.addJavascriptInterface(new a(this, b), "BGN_PLAYABLE");
}
return true;
}
@Override
public final boolean b() {
if (this.t) {
return this.g;
}
return false;
}
@Override
public final void c() {
sg.bigo.ads.common.l.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.l;
if (eVar != null) {
eVar.d();
this.l = null;
}
WebView webView = this.m;
if (webView != null) {
u.a(webView);
this.m = null;
}
Ad ad = this.d;
if (ad instanceof l) {
((l) ad).n();
}
}
@Override
public final void d() {
b.a aVar;
if (this.o || this.p || this.q || (aVar = this.s) == null || this.i <= 0) {
return;
}
aVar.d(this.e, SystemClock.elapsedRealtime() - this.i);
}
}