Puzzle King v2.3.8版本的 MD5 值为:1734eb975c9d2843afa462aec387292e
以下内容为反编译后的 WindVaneWebView.java 源代码,内容仅作参考
package com.mbridge.msdk.mbsignalcommon.windvane;
import android.content.Context;
import android.content.IntentFilter;
import android.os.Handler;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.MotionEvent;
import com.mbridge.msdk.foundation.tools.aa;
import com.mbridge.msdk.mbsignalcommon.base.BaseWebView;
import com.safedk.android.analytics.brandsafety.DetectTouchUtils;
import com.safedk.android.internal.partials.MintegralNetworkBridge;
public class WindVaneWebView extends BaseWebView {
protected k b;
protected c c;
protected f d;
private Object e;
private Object f;
private String g;
private d h;
private String i;
private boolean j;
private float k;
private float l;
@Override
public boolean dispatchTouchEvent(MotionEvent me) {
DetectTouchUtils.viewOnTouch(com.safedk.android.utils.g.o, this, me);
return super.dispatchTouchEvent(me);
}
@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (1 == 0) {
setMeasuredDimension(0, 0);
} else {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}
public WindVaneWebView(Context context) {
super(context);
this.j = false;
this.k = 0.0f;
this.l = 0.0f;
}
public WindVaneWebView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.j = false;
this.k = 0.0f;
this.l = 0.0f;
}
public WindVaneWebView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.j = false;
this.k = 0.0f;
this.l = 0.0f;
}
public void setSignalCommunication(c cVar) {
this.c = cVar;
cVar.a(this);
}
public c getSignalCommunication() {
return this.c;
}
public void setRid(String str) {
this.i = str;
}
public String getRid() {
return this.i;
}
public Object getJsObject(String str) {
f fVar = this.d;
if (fVar == null) {
return null;
}
return fVar.a(str);
}
public void registerWindVanePlugin(Class cls) {
f fVar = this.d;
if (fVar == null) {
return;
}
fVar.a(cls.getSimpleName(), cls);
}
@Override
protected final void a() {
super.a();
getSettings().setSavePassword(false);
getSettings().setUserAgentString(getSettings().getUserAgentString() + " WindVane/3.0.2");
if (this.b == null) {
this.b = new k(this);
}
setWebViewChromeClient(this.b);
this.mWebViewClient = new l();
setWebViewClient(this.mWebViewClient);
if (this.c == null) {
i iVar = new i(this.a);
this.c = iVar;
setSignalCommunication(iVar);
}
this.d = new f(this.a, this);
}
public void setApiManagerContext(Context context) {
f fVar = this.d;
if (fVar != null) {
fVar.a(context);
}
}
public void setApiManagerJSFactory(Object obj) {
f fVar = this.d;
if (fVar != null) {
fVar.a(obj);
}
}
public void setWebViewChromeClient(k kVar) {
this.b = kVar;
setWebChromeClient(kVar);
}
public void setObject(Object obj) {
this.e = obj;
}
public Object getObject() {
return this.e;
}
public void setMraidObject(Object obj) {
this.f = obj;
}
public Object getMraidObject() {
return this.f;
}
public void setWebViewListener(d dVar) {
this.h = dVar;
k kVar = this.b;
if (kVar != null) {
kVar.a(dVar);
}
if (this.mWebViewClient != null) {
this.mWebViewClient.a(dVar);
}
}
public d getWebViewListener() {
return this.h;
}
public boolean isDestoryed() {
return this.j;
}
public void release() {
try {
setVisibility(8);
removeAllViews();
setDownloadListener(null);
this.e = null;
if (aa.m(getContext()) == 0) {
this.j = true;
destroy();
} else {
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
WindVaneWebView.this.j = true;
WindVaneWebView.this.destroy();
}
}, r0 * 1000);
}
} catch (Throwable th) {
th.printStackTrace();
}
}
public void clearWebView() {
if (this.j) {
return;
}
MintegralNetworkBridge.webviewLoadUrl(this, "about:blank");
}
public void setWebViewTransparent() {
super.setTransparent();
}
public String getCampaignId() {
return this.g;
}
public void setCampaignId(String str) {
this.g = str;
}
@Override
public boolean onTouchEvent(MotionEvent motionEvent) {
if (this.mWebViewClient != null && (this.mWebViewClient.b() instanceof IntentFilter)) {
String url = getUrl();
if (!TextUtils.isEmpty(url) && url.contains("https://play.google.com")) {
if (motionEvent.getAction() == 0) {
this.k = motionEvent.getRawX();
this.l = motionEvent.getRawY();
} else {
float rawX = motionEvent.getRawX() - this.k;
float y = motionEvent.getY() - this.l;
if ((rawX >= 0.0f || rawX * (-1.0f) <= 48) && ((rawX <= 0.0f || rawX <= 48) && ((y >= 0.0f || (-1.0f) * y <= 48) && (y <= 0.0f || y <= 48)))) {
setClickable(false);
return true;
}
}
}
}
return super.onTouchEvent(motionEvent);
}
}