Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package com.unity3d.services.analytics;
/* loaded from: classes4.dex */
public enum AcquisitionType {
SOFT,
PREMIUM;
/* renamed from: com.unity3d.services.analytics.AcquisitionType$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$unity3d$services$analytics$AcquisitionType;
static {
int[] iArr = new int[AcquisitionType.values().length];
$SwitchMap$com$unity3d$services$analytics$AcquisitionType = iArr;
try {
iArr[AcquisitionType.SOFT.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$unity3d$services$analytics$AcquisitionType[AcquisitionType.PREMIUM.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
@Override // java.lang.Enum
public String toString() {
int i = AnonymousClass1.$SwitchMap$com$unity3d$services$analytics$AcquisitionType[ordinal()];
return i != 1 ? i != 2 ? "" : "premium" : "soft";
}
}

View File

@@ -0,0 +1,160 @@
package com.unity3d.services.analytics;
import androidx.core.app.NotificationCompat;
import com.applovin.sdk.AppLovinEventParameters;
import com.applovin.sdk.AppLovinEventTypes;
import com.tapjoy.TapjoyConstants;
import com.unity3d.services.core.webview.WebViewApp;
import com.unity3d.services.core.webview.WebViewEventCategory;
import java.util.Date;
import java.util.HashMap;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class UnityAnalytics {
protected static JSONArray eventQueue = new JSONArray();
public enum AnalyticsEventType {
POSTEVENT
}
private static JSONObject createItemAcquired(String str, Float f, String str2, Float f2, String str3, String str4, String str5, AcquisitionType acquisitionType) {
HashMap hashMap = new HashMap();
hashMap.put(TapjoyConstants.PREF_SERVER_CURRENCY_TYPE, acquisitionType.toString());
hashMap.put("transaction_context", str);
hashMap.put("amount", f);
hashMap.put("item_id", str2);
hashMap.put("balance", f2);
hashMap.put("item_type", str3);
hashMap.put(AppLovinEventTypes.USER_COMPLETED_LEVEL, str4);
hashMap.put(AppLovinEventParameters.CHECKOUT_TRANSACTION_IDENTIFIER, str5);
HashMap hashMap2 = new HashMap();
hashMap2.put("custom_params", hashMap);
hashMap2.put("ts", 1533594423477L);
hashMap2.put("name", "item_acquired");
HashMap hashMap3 = new HashMap();
hashMap3.put("type", "analytics.custom.v1");
hashMap3.put("msg", hashMap2);
return new JSONObject(hashMap3);
}
private static JSONObject createItemSpent(String str, Float f, String str2, Float f2, String str3, String str4, String str5, AcquisitionType acquisitionType) {
HashMap hashMap = new HashMap();
hashMap.put(TapjoyConstants.PREF_SERVER_CURRENCY_TYPE, acquisitionType.toString());
hashMap.put("transaction_context", str);
hashMap.put("amount", f);
hashMap.put("item_id", str2);
hashMap.put("balance", f2);
hashMap.put("item_type", str3);
hashMap.put(AppLovinEventTypes.USER_COMPLETED_LEVEL, str4);
hashMap.put(AppLovinEventParameters.CHECKOUT_TRANSACTION_IDENTIFIER, str5);
HashMap hashMap2 = new HashMap();
hashMap2.put("custom_params", hashMap);
hashMap2.put("ts", Long.valueOf(new Date().getTime()));
hashMap2.put("name", "item_spent");
HashMap hashMap3 = new HashMap();
hashMap3.put("type", "analytics.custom.v1");
hashMap3.put("msg", hashMap2);
return new JSONObject(hashMap3);
}
private static JSONObject createLevelFail(String str) {
HashMap hashMap = new HashMap();
hashMap.put("level_index", str);
HashMap hashMap2 = new HashMap();
hashMap2.put("custom_params", hashMap);
hashMap2.put("ts", Long.valueOf(new Date().getTime()));
hashMap2.put("name", "level_fail");
HashMap hashMap3 = new HashMap();
hashMap3.put("type", "analytics.custom.v1");
hashMap3.put("msg", hashMap2);
return new JSONObject(hashMap3);
}
private static JSONObject createLevelUp(String str) {
HashMap hashMap = new HashMap();
hashMap.put("new_level_index", str);
HashMap hashMap2 = new HashMap();
hashMap2.put("custom_params", hashMap);
hashMap2.put("ts", Long.valueOf(new Date().getTime()));
hashMap2.put("name", "level_up");
HashMap hashMap3 = new HashMap();
hashMap3.put("type", "analytics.custom.v1");
hashMap3.put("msg", hashMap2);
return new JSONObject(hashMap3);
}
private static JSONObject createAdComplete(String str, String str2, Boolean bool) {
HashMap hashMap = new HashMap();
hashMap.put("rewarded", bool);
hashMap.put("network", str);
hashMap.put("placement_id", str2);
HashMap hashMap2 = new HashMap();
hashMap2.put("custom_params", hashMap);
hashMap2.put("ts", Long.valueOf(new Date().getTime()));
hashMap2.put("name", "ad_complete");
HashMap hashMap3 = new HashMap();
hashMap3.put("type", "analytics.custom.v1");
hashMap3.put("msg", hashMap2);
return new JSONObject(hashMap3);
}
private static JSONObject createIapTransaction(String str, Float f, String str2, Boolean bool, String str3) {
HashMap hashMap = new HashMap();
hashMap.put("ts", Long.valueOf(new Date().getTime()));
hashMap.put("productid", str);
hashMap.put("amount", f);
hashMap.put("currency", str2);
hashMap.put(NotificationCompat.CATEGORY_PROMO, bool);
hashMap.put("receipt", str3);
HashMap hashMap2 = new HashMap();
hashMap2.put("type", "analytics.transaction.v1");
hashMap2.put("msg", hashMap);
return new JSONObject(hashMap2);
}
public static void onItemAcquired(String str, Float f, String str2, Float f2, String str3, String str4, String str5, AcquisitionType acquisitionType) {
postEvent(createItemAcquired(str, f, str2, f2, str3, str4, str5, acquisitionType));
}
public static void onItemSpent(String str, Float f, String str2, Float f2, String str3, String str4, String str5, AcquisitionType acquisitionType) {
postEvent(createItemSpent(str, f, str2, f2, str3, str4, str5, acquisitionType));
}
public static void onLevelFail(String str) {
postEvent(createLevelFail(str));
}
public static void onLevelUp(String str) {
postEvent(createLevelUp(str));
}
public static void onAdComplete(String str, String str2, Boolean bool) {
postEvent(createAdComplete(str, str2, bool));
}
public static void onIapTransaction(String str, Float f, String str2, Boolean bool, String str3) {
postEvent(createIapTransaction(str, f, str2, bool, str3));
}
public static void onEvent(JSONObject jSONObject) {
postEvent(jSONObject);
}
private static synchronized void postEvent(JSONObject jSONObject) {
synchronized (UnityAnalytics.class) {
try {
if (eventQueue.length() < 200) {
eventQueue.put(jSONObject);
}
WebViewApp currentApp = WebViewApp.getCurrentApp();
if (currentApp != null && Boolean.valueOf(currentApp.sendEvent(WebViewEventCategory.ANALYTICS, AnalyticsEventType.POSTEVENT, eventQueue.toString())).booleanValue()) {
eventQueue = new JSONArray();
}
} catch (Throwable th) {
throw th;
}
}
}
}

View File

@@ -0,0 +1,31 @@
package com.unity3d.services.analytics.core.api;
import com.unity3d.services.analytics.interfaces.AnalyticsError;
import com.unity3d.services.analytics.interfaces.IAnalytics;
import com.unity3d.services.core.misc.Utilities;
import com.unity3d.services.core.webview.bridge.WebViewCallback;
import com.unity3d.services.core.webview.bridge.WebViewExposed;
/* loaded from: classes4.dex */
public class Analytics {
public static IAnalytics analyticsInterface;
public static void setAnalyticsInterface(IAnalytics iAnalytics) {
analyticsInterface = iAnalytics;
}
@WebViewExposed
public static void addExtras(final String str, WebViewCallback webViewCallback) {
if (analyticsInterface != null) {
Utilities.runOnUiThread(new Runnable() { // from class: com.unity3d.services.analytics.core.api.Analytics.1
@Override // java.lang.Runnable
public void run() {
Analytics.analyticsInterface.onAddExtras(str);
}
});
webViewCallback.invoke(new Object[0]);
} else {
webViewCallback.error(AnalyticsError.API_NOT_FOUND, str);
}
}
}

View File

@@ -0,0 +1,31 @@
package com.unity3d.services.analytics.core.configuration;
import com.unity3d.services.analytics.core.api.Analytics;
import com.unity3d.services.core.configuration.Configuration;
import com.unity3d.services.core.configuration.ErrorState;
import com.unity3d.services.core.configuration.IModuleConfiguration;
/* loaded from: classes4.dex */
public class AnalyticsModuleConfiguration implements IModuleConfiguration {
private static final Class[] WEB_APP_API_CLASS_LIST = {Analytics.class};
@Override // com.unity3d.services.core.configuration.IModuleConfiguration
public Class[] getWebAppApiClassList() {
return WEB_APP_API_CLASS_LIST;
}
@Override // com.unity3d.services.core.configuration.IModuleConfiguration
public boolean initCompleteState(Configuration configuration) {
return true;
}
@Override // com.unity3d.services.core.configuration.IModuleConfiguration
public boolean initErrorState(Configuration configuration, ErrorState errorState, String str) {
return true;
}
@Override // com.unity3d.services.core.configuration.IModuleConfiguration
public boolean resetState(Configuration configuration) {
return true;
}
}

View File

@@ -0,0 +1,8 @@
package com.unity3d.services.analytics.interfaces;
/* loaded from: classes4.dex */
public class Analytics {
public static void initialize(IAnalytics iAnalytics) {
com.unity3d.services.analytics.core.api.Analytics.setAnalyticsInterface(iAnalytics);
}
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.services.analytics.interfaces;
/* loaded from: classes4.dex */
public enum AnalyticsError {
API_NOT_FOUND
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.services.analytics.interfaces;
/* loaded from: classes4.dex */
public interface IAnalytics {
void onAddExtras(String str);
}