- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
108 lines
3.9 KiB
Java
108 lines
3.9 KiB
Java
package com.mbridge.msdk.mbsignalcommon.mraid;
|
|
|
|
import android.webkit.WebView;
|
|
import java.net.URLEncoder;
|
|
import java.util.Locale;
|
|
import java.util.Map;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class a {
|
|
|
|
/* renamed from: com.mbridge.msdk.mbsignalcommon.mraid.a$a, reason: collision with other inner class name */
|
|
public static class C0211a {
|
|
private static final a a = new a();
|
|
}
|
|
|
|
public static a a() {
|
|
return C0211a.a;
|
|
}
|
|
|
|
public final void a(WebView webView) {
|
|
c(webView, "javascript:window.mraidbridge.fireReadyEvent();");
|
|
}
|
|
|
|
public final void a(WebView webView, Map<String, Object> map) {
|
|
if (map == null || map.size() == 0) {
|
|
return;
|
|
}
|
|
JSONObject jSONObject = new JSONObject();
|
|
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
|
try {
|
|
jSONObject.put(entry.getKey(), entry.getValue());
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
String jSONObject2 = jSONObject.toString();
|
|
try {
|
|
jSONObject2 = URLEncoder.encode(jSONObject2, "UTF-8");
|
|
} catch (Exception e2) {
|
|
e2.printStackTrace();
|
|
}
|
|
c(webView, String.format("javascript:window.mraidbridge.fireChangeEvent(%s);", jSONObject2));
|
|
}
|
|
|
|
public final void a(WebView webView, String str, String str2) {
|
|
try {
|
|
str2 = URLEncoder.encode(str2, "UTF-8");
|
|
str = URLEncoder.encode(str, "UTF-8");
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
c(webView, String.format("javascript:window.mraidbridge.fireErrorEvent('%1s', '%2s');", str2, str));
|
|
}
|
|
|
|
public final void a(WebView webView, float f, float f2) {
|
|
c(webView, String.format(Locale.CHINA, "javascript:window.mraidbridge.notifySizeChangeEvent(%.1f, %.1f);", Float.valueOf(f), Float.valueOf(f2)));
|
|
}
|
|
|
|
public final void a(WebView webView, double d) {
|
|
c(webView, String.format(Locale.CHINA, "javascript:window.mraidbridge.audioVolumeChange(%s);", Double.valueOf(d)));
|
|
}
|
|
|
|
public final void b(WebView webView, float f, float f2) {
|
|
c(webView, String.format(Locale.CHINA, "javascript:window.mraidbridge.setScreenSize(%.1f, %.1f);", Float.valueOf(f), Float.valueOf(f2)));
|
|
}
|
|
|
|
public final void c(WebView webView, float f, float f2) {
|
|
c(webView, String.format(Locale.CHINA, "javascript:window.mraidbridge.setMaxSize(%.1f, %.1f);", Float.valueOf(f), Float.valueOf(f2)));
|
|
}
|
|
|
|
public final void a(WebView webView, float f, float f2, float f3, float f4) {
|
|
c(webView, String.format(Locale.CHINA, "javascript:window.mraidbridge.setDefaultPosition(%.1f, %.1f, %.1f, %.1f);", Float.valueOf(f), Float.valueOf(f2), Float.valueOf(f3), Float.valueOf(f4)));
|
|
}
|
|
|
|
public final void b(WebView webView, float f, float f2, float f3, float f4) {
|
|
c(webView, String.format(Locale.CHINA, "javascript:window.mraidbridge.setCurrentPosition(%.1f, %.1f, %.1f, %.1f);", Float.valueOf(f), Float.valueOf(f2), Float.valueOf(f3), Float.valueOf(f4)));
|
|
}
|
|
|
|
public final void a(WebView webView, String str) {
|
|
try {
|
|
str = URLEncoder.encode(str, "UTF-8");
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
c(webView, String.format("javascript:window.mraidbridge.nativeCallComplete('%s');", str));
|
|
}
|
|
|
|
public final void b(WebView webView, String str) {
|
|
try {
|
|
str = URLEncoder.encode(str, "UTF-8");
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
c(webView, String.format("javascript:window.mraidbridge.setIsViewable(%s);", str));
|
|
}
|
|
|
|
private void c(WebView webView, String str) {
|
|
if (webView != null) {
|
|
try {
|
|
webView.loadUrl(str);
|
|
} catch (Throwable th) {
|
|
th.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|