Spermatid v6.1.8版本的 MD5 值为:a375ce51a42d528ba6e2583c10478296
以下内容为反编译后的 WindVaneWebView.java 源代码,内容仅作参考
package com.mbridge.msdk.mbjscommon.windvane;
import android.content.Context;
import android.os.Handler;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.MotionEvent;
import com.mbridge.msdk.foundation.tools.ae;
import com.mbridge.msdk.mbjscommon.base.BaseWebView;
public class WindVaneWebView extends BaseWebView {
public l f21140b;
public b f21141c;
public g f21142d;
private Object f21143e;
private Object f21144f;
private String f21145g;
private d f21146h;
private String f21147i;
private boolean f21148j;
private float f21149k;
private float f21150l;
public WindVaneWebView(Context context) {
super(context);
this.f21148j = false;
this.f21149k = 0.0f;
this.f21150l = 0.0f;
}
public void clearWebView() {
if (this.f21148j) {
return;
}
loadUrl("about:blank");
}
public String getCampaignId() {
return this.f21145g;
}
public b getJsBridge() {
return this.f21141c;
}
public Object getJsObject(String str) {
g gVar = this.f21142d;
if (gVar == null) {
return null;
}
return gVar.a(str);
}
public Object getMraidObject() {
return this.f21144f;
}
public Object getObject() {
return this.f21143e;
}
public String getRid() {
return this.f21147i;
}
public d getWebViewListener() {
return this.f21146h;
}
public boolean isDestoryed() {
return this.f21148j;
}
@Override
public boolean onTouchEvent(MotionEvent motionEvent) {
com.mbridge.msdk.mbjscommon.base.b bVar = this.mWebViewClient;
if (bVar != null && (bVar.b() instanceof com.mbridge.msdk.mbjscommon.base.c)) {
String url = getUrl();
if (!TextUtils.isEmpty(url) && url.contains("https://play.google.com")) {
if (motionEvent.getAction() == 0) {
this.f21149k = motionEvent.getRawX();
this.f21150l = motionEvent.getRawY();
} else {
int b10 = ae.b(com.mbridge.msdk.foundation.controller.a.f().j(), 15.0f);
float rawX = motionEvent.getRawX() - this.f21149k;
float y10 = motionEvent.getY() - this.f21150l;
if ((rawX >= 0.0f || rawX * (-1.0f) <= b10) && ((rawX <= 0.0f || rawX <= b10) && ((y10 >= 0.0f || (-1.0f) * y10 <= b10) && (y10 <= 0.0f || y10 <= b10)))) {
setClickable(false);
return true;
}
}
}
}
return super.onTouchEvent(motionEvent);
}
public void registerWindVanePlugin(Class cls) {
g gVar = this.f21142d;
if (gVar == null) {
return;
}
gVar.a(cls);
}
public void release() {
try {
setVisibility(8);
removeAllViews();
setDownloadListener(null);
this.f21143e = null;
if (ae.n(getContext()) == 0) {
this.f21148j = true;
destroy();
} else {
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
WindVaneWebView.this.f21148j = true;
WindVaneWebView.this.destroy();
}
}, r0 * 1000);
}
} catch (Throwable th) {
th.printStackTrace();
}
}
public void setApiManagerContext(Context context) {
g gVar = this.f21142d;
if (gVar != null) {
gVar.a(context);
}
}
public void setApiManagerJSFactory(Object obj) {
g gVar = this.f21142d;
if (gVar != null) {
gVar.a(obj);
}
}
public void setCampaignId(String str) {
this.f21145g = str;
}
public void setJsBridge(b bVar) {
this.f21141c = bVar;
bVar.a(this);
}
public void setMraidObject(Object obj) {
this.f21144f = obj;
}
public void setObject(Object obj) {
this.f21143e = obj;
}
public void setRid(String str) {
this.f21147i = str;
}
public void setWebViewChromeClient(l lVar) {
this.f21140b = lVar;
setWebChromeClient(lVar);
}
public void setWebViewListener(d dVar) {
this.f21146h = dVar;
l lVar = this.f21140b;
if (lVar != null) {
lVar.a(dVar);
}
com.mbridge.msdk.mbjscommon.base.b bVar = this.mWebViewClient;
if (bVar != null) {
bVar.a(dVar);
}
}
public void setWebViewTransparent() {
super.setTransparent();
}
@Override
public final void a() {
super.a();
getSettings().setSavePassword(false);
getSettings().setUserAgentString(getSettings().getUserAgentString() + " WindVane/3.0.2");
if (this.f21140b == null) {
this.f21140b = new l(this);
}
setWebViewChromeClient(this.f21140b);
m mVar = new m();
this.mWebViewClient = mVar;
setWebViewClient(mVar);
if (this.f21141c == null) {
b iVar = new i(this.f21021a);
this.f21141c = iVar;
setJsBridge(iVar);
}
this.f21142d = new g(this.f21021a, this);
}
public WindVaneWebView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.f21148j = false;
this.f21149k = 0.0f;
this.f21150l = 0.0f;
}
public WindVaneWebView(Context context, AttributeSet attributeSet, int i10) {
super(context, attributeSet, i10);
this.f21148j = false;
this.f21149k = 0.0f;
this.f21150l = 0.0f;
}
}