Stick Squad 3 v1.2.5.9版本的 MD5 值为:375cf7f77a7075270cd68d1397368279
以下内容为反编译后的 WebViewJSInterface.java 源代码,内容仅作参考
package com.fusepowered.sa.android.publish.slider;
import android.content.Context;
import android.text.TextUtils;
import android.webkit.JavascriptInterface;
import com.fusepowered.sa.android.publish.f.f;
import java.util.ArrayList;
public class WebViewJSInterface {
private Context mContext;
private String trackingUrl;
public WebViewJSInterface(Context context) {
this.mContext = context;
}
private void megreTackingUrls(String str) {
ArrayList arrayList = new ArrayList();
if (str != null) {
String[] split = str.split(",");
if (split.length == 1) {
this.trackingUrl = split[0];
return;
}
String str2 = split[0].split("tracking/adImpression")[0] + "tracking/adImpression";
for (String str3 : split) {
arrayList.add("d=" + str3.split("tracking/adImpression[?]d=")[1]);
}
this.trackingUrl = "http://www.startappexchange.com/tracking/adImpression?" + TextUtils.join("&", arrayList);
}
}
private String substringBetween(String str, String str2, String str3) {
int indexOf;
int indexOf2;
if (str == null || str2 == null || str3 == null || (indexOf = str.indexOf(str2)) == -1 || (indexOf2 = str.indexOf(str3, str2.length() + indexOf)) == -1) {
return null;
}
return str.substring(str2.length() + indexOf, indexOf2);
}
public String getTrackingUrl() {
return this.trackingUrl;
}
@JavascriptInterface
public void processHTML(String str) {
megreTackingUrls(substringBetween(str, "@tracking@", "@tracking@"));
if (this.trackingUrl != null) {
f.b(this.mContext, "trackingUrl", this.trackingUrl);
}
}
@JavascriptInterface
public void processServerEvent(String str) {
if (!f.a(this.mContext, "slideEvent", (Boolean) false).booleanValue() || f.a(this.mContext, "trackingEvent", (Boolean) false).booleanValue()) {
return;
}
megreTackingUrls(substringBetween(str, "@tracking@", "@tracking@"));
if (this.trackingUrl != null) {
f.b(this.mContext, "trackingUrl", this.trackingUrl);
new a(this.mContext).a("");
}
}
}