Cyber Surfer v5.2.5版本的 MD5 值为:db13c5fce988de393e52d2679f934b22
以下内容为反编译后的 b.java 源代码,内容仅作参考
package com.ironsource.sdk.b;
import android.os.Build;
import android.util.Log;
import android.webkit.WebView;
import org.json.JSONException;
import org.json.JSONObject;
public class b {
public a f6541a;
public WebView c;
public String d;
public String e = "b";
private String[] f = {"handleGetViewVisibility"};
private final String[] g = {"loadWithUrl", "updateAd", "isExternalAdViewInitiated", "handleGetViewVisibility", "sendMessage"};
public d f6542b = new d();
private static String d(String str) {
return String.format("window.ssa.onMessageReceived(%1$s)", str);
}
private void e(final String str) {
final String str2 = "javascript:try{" + str + "}catch(e){console.log(\"JS exception: \" + JSON.stringify(e));}";
com.ironsource.environment.thread.a.f5901a.a(new Runnable() {
@Override
public final void run() {
try {
b.this.c.evaluateJavascript(str2, null);
} catch (Throwable unused) {
String str3 = b.this.e;
Log.e(str3, "injectJavaScriptIntoWebView | Error while trying inject JS into external adUnit: " + str + "Android API level: " + Build.VERSION.SDK_INT);
}
}
});
}
public final JSONObject a() {
JSONObject jSONObject = new JSONObject();
try {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("visibilityParams", this.f6542b.a());
jSONObject.put("configs", jSONObject2);
jSONObject.put("adViewId", this.d);
return jSONObject;
} catch (JSONException e) {
e.printStackTrace();
return new JSONObject();
}
}
public JSONObject a(JSONObject jSONObject) {
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("id", jSONObject.getString("id"));
jSONObject2.put("data", this.f6542b.a());
} catch (Exception e) {
String str = this.e;
Log.e(str, "Error while trying execute method buildVisibilityMessageForAdUnit | params: " + jSONObject);
e.printStackTrace();
}
return jSONObject2;
}
public final void a(String str) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("adViewId", this.d);
a(str, jSONObject);
} catch (JSONException e) {
e.printStackTrace();
}
}
public final void a(String str, int i, boolean z) {
d dVar = this.f6542b;
if (dVar.f6547a.containsKey(str)) {
dVar.f6547a.put(str, Boolean.valueOf(i == 0));
}
dVar.f6547a.put("isShown", Boolean.valueOf(z));
dVar.f6547a.put("isViewVisible", Boolean.valueOf((dVar.f6547a.get("isWindowVisible").booleanValue() || dVar.f6547a.get("isVisible").booleanValue()) && dVar.f6547a.get("isShown").booleanValue()));
if (!(Build.VERSION.SDK_INT <= 22 ? str.equalsIgnoreCase("isWindowVisible") : str.equalsIgnoreCase("isVisible")) || this.f6541a == null || this.f6542b == null) {
return;
}
a("containerIsVisible", a());
}
public final void a(String str, String str2) {
a aVar = this.f6541a;
if (aVar != null) {
aVar.a(str, str2, this.d);
}
}
public final void a(String str, String str2, String str3) {
if (this.c == null) {
String str4 = "No external adUnit attached to ISNAdView while trying to send message: " + str;
Log.e(this.e, str4);
this.f6541a.a(str3, str4, this.d);
return;
}
try {
new JSONObject(str);
} catch (JSONException unused) {
str = "\"" + str + "\"";
}
e(d(str));
JSONObject jSONObject = new JSONObject();
jSONObject.put("adViewId", this.d);
a(str2, jSONObject);
}
public final void a(String str, JSONObject jSONObject) {
a aVar = this.f6541a;
if (aVar != null) {
aVar.a(str, jSONObject);
}
}
public final void b(String str) {
JSONObject a2 = this.f6542b.a();
a2.put("adViewId", this.d);
a(str, a2);
}
public boolean c(String str) {
for (String str2 : this.f) {
if (str2.equalsIgnoreCase(str)) {
return true;
}
}
return false;
}
}