- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
861 lines
20 KiB
Smali
861 lines
20 KiB
Smali
.class public abstract Lcom/singular/sdk/Singular;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field public static isInstanceAlreadyInitialized:Z
|
|
|
|
.field public static final logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
.field public static saved_application_context:Landroid/content/Context;
|
|
|
|
.field public static singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-class v0, Lcom/singular/sdk/Singular;
|
|
|
|
.line 39
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/singular/sdk/internal/SingularLog;->getLogger(Ljava/lang/String;)Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput-boolean v0, Lcom/singular/sdk/Singular;->isInstanceAlreadyInitialized:Z
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput-object v0, Lcom/singular/sdk/Singular;->saved_application_context:Landroid/content/Context;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static customRevenue(Ljava/lang/String;Ljava/lang/String;D)Z
|
|
.locals 6
|
|
|
|
const-string v0, "pcc"
|
|
|
|
const-string v2, "r"
|
|
|
|
.line 270
|
|
invoke-static {p2, p3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "is_revenue_event"
|
|
|
|
sget-object v5, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
move-object v1, p1
|
|
|
|
filled-new-array/range {v0 .. v5}, [Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
.line 268
|
|
invoke-static {p0, p1}, Lcom/singular/sdk/Singular;->event(Ljava/lang/String;[Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static customRevenue(Ljava/lang/String;Ljava/lang/String;DLjava/lang/Object;)Z
|
|
.locals 6
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
.line 204
|
|
invoke-virtual {p4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "com.android.billingclient.api.Purchase"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 206
|
|
:try_start_0
|
|
invoke-virtual {p4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "getSku"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
new-array v3, v2, [Ljava/lang/Class;
|
|
|
|
.line 207
|
|
invoke-virtual {v0, v1, v3}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v1
|
|
|
|
new-array v3, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v1, p4, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
const-string v3, "getOriginalJson"
|
|
|
|
new-array v4, v2, [Ljava/lang/Class;
|
|
|
|
.line 208
|
|
invoke-virtual {v0, v3, v4}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v3
|
|
|
|
new-array v4, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v3, p4, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
const-string v4, "getSignature"
|
|
|
|
new-array v5, v2, [Ljava/lang/Class;
|
|
|
|
.line 209
|
|
invoke-virtual {v0, v4, v5}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
new-array v4, v2, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0, p4, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p4
|
|
|
|
check-cast p4, Ljava/lang/String;
|
|
|
|
const/16 v0, 0xc
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
const-string v4, "pcc"
|
|
|
|
aput-object v4, v0, v2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object p1, v0, v2
|
|
|
|
const-string v2, "r"
|
|
|
|
const/4 v4, 0x2
|
|
|
|
aput-object v2, v0, v4
|
|
|
|
.line 213
|
|
invoke-static {p2, p3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v4, 0x3
|
|
|
|
aput-object v2, v0, v4
|
|
|
|
const-string v2, "pk"
|
|
|
|
const/4 v4, 0x4
|
|
|
|
aput-object v2, v0, v4
|
|
|
|
const/4 v2, 0x5
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "receipt"
|
|
|
|
const/4 v2, 0x6
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x7
|
|
|
|
aput-object v3, v0, v1
|
|
|
|
const-string v1, "receipt_signature"
|
|
|
|
const/16 v2, 0x8
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/16 v1, 0x9
|
|
|
|
aput-object p4, v0, v1
|
|
|
|
const-string p4, "is_revenue_event"
|
|
|
|
const/16 v1, 0xa
|
|
|
|
aput-object p4, v0, v1
|
|
|
|
sget-object p4, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
const/16 v1, 0xb
|
|
|
|
aput-object p4, v0, v1
|
|
|
|
.line 211
|
|
invoke-static {p0, v0}, Lcom/singular/sdk/Singular;->event(Ljava/lang/String;[Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return p0
|
|
|
|
:catch_0
|
|
move-exception p4
|
|
|
|
sget-object v0, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v1, "customRevenue has encountered an unexpected exception. Please verify that the \'purchase\' object is of type \'com.android.billingclient.api.Purchase\'"
|
|
|
|
.line 220
|
|
invoke-virtual {v0, v1, p4}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
.line 224
|
|
:cond_0
|
|
invoke-static {p0, p1, p2, p3}, Lcom/singular/sdk/Singular;->customRevenue(Ljava/lang/String;Ljava/lang/String;D)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static customRevenue(Ljava/lang/String;Ljava/lang/String;DLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ID)Z
|
|
.locals 16
|
|
|
|
const-string v0, "pcc"
|
|
|
|
const-string v2, "r"
|
|
|
|
.line 302
|
|
invoke-static/range {p2 .. p3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "pk"
|
|
|
|
const-string v6, "pn"
|
|
|
|
const-string v8, "pc"
|
|
|
|
const-string v10, "pq"
|
|
|
|
.line 306
|
|
invoke-static/range {p7 .. p7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v11
|
|
|
|
const-string v12, "pp"
|
|
|
|
.line 307
|
|
invoke-static/range {p8 .. p9}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
|
|
|
|
move-result-object v13
|
|
|
|
const-string v14, "is_revenue_event"
|
|
|
|
sget-object v15, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v5, p4
|
|
|
|
move-object/from16 v7, p5
|
|
|
|
move-object/from16 v9, p6
|
|
|
|
filled-new-array/range {v0 .. v15}, [Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
.line 300
|
|
invoke-static {v1, v0}, Lcom/singular/sdk/Singular;->event(Ljava/lang/String;[Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static event(Ljava/lang/String;)Z
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 108
|
|
:try_start_0
|
|
invoke-static {}, Lcom/singular/sdk/Singular;->isInitialized()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 110
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/singular/sdk/internal/Utils;->isEmptyOrNull(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
sget-object p0, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v1, "Event name can not be null or empty"
|
|
|
|
.line 111
|
|
invoke-virtual {p0, v1}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;)I
|
|
|
|
return v0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sget-object v1, Lcom/singular/sdk/Singular;->singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
.line 115
|
|
invoke-virtual {v1, p0}, Lcom/singular/sdk/internal/SingularInstance;->logEvent(Ljava/lang/String;)Z
|
|
|
|
move-result p0
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return p0
|
|
|
|
.line 117
|
|
:goto_0
|
|
invoke-static {p0}, Lcom/singular/sdk/Singular;->reportException(Ljava/lang/Throwable;)V
|
|
|
|
sget-object v1, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v2, "Exception"
|
|
|
|
.line 118
|
|
invoke-virtual {v1, v2, p0}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static varargs event(Ljava/lang/String;[Ljava/lang/Object;)Z
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 144
|
|
:try_start_0
|
|
invoke-static {}, Lcom/singular/sdk/Singular;->isInitialized()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 146
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/singular/sdk/internal/Utils;->isEmptyOrNull(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
sget-object p0, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string p1, "Event name can not be null or empty"
|
|
|
|
.line 147
|
|
invoke-virtual {p0, p1}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;)I
|
|
|
|
return v0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
goto :goto_2
|
|
|
|
.line 151
|
|
:cond_1
|
|
array-length v1, p1
|
|
|
|
rem-int/lit8 v1, v1, 0x2
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
sget-object p0, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string p1, "Extra arguments must be in even numbers."
|
|
|
|
.line 153
|
|
invoke-virtual {p0, p1}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;)I
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return v0
|
|
|
|
.line 158
|
|
:cond_2
|
|
:try_start_1
|
|
new-instance v1, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V
|
|
|
|
move v2, v0
|
|
|
|
.line 159
|
|
:goto_0
|
|
array-length v3, p1
|
|
|
|
if-ge v2, v3, :cond_3
|
|
|
|
.line 160
|
|
aget-object v3, p1, v2
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
add-int/lit8 v4, v2, 0x1
|
|
|
|
aget-object v4, p1, v4
|
|
|
|
invoke-virtual {v1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
add-int/lit8 v2, v2, 0x2
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
.line 164
|
|
:cond_3
|
|
invoke-static {p0, v1}, Lcom/singular/sdk/Singular;->eventJSON(Ljava/lang/String;Lorg/json/JSONObject;)Z
|
|
|
|
move-result p0
|
|
:try_end_1
|
|
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_1
|
|
.catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
return p0
|
|
|
|
:goto_1
|
|
:try_start_2
|
|
sget-object p1, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v1, "error in serializing extra args"
|
|
|
|
.line 167
|
|
invoke-virtual {p1, v1, p0}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
:try_end_2
|
|
.catch Ljava/lang/RuntimeException; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
goto :goto_3
|
|
|
|
.line 171
|
|
:goto_2
|
|
invoke-static {p0}, Lcom/singular/sdk/Singular;->reportException(Ljava/lang/Throwable;)V
|
|
|
|
sget-object p1, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v1, "Exception"
|
|
|
|
.line 172
|
|
invoke-virtual {p1, v1, p0}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:goto_3
|
|
return v0
|
|
.end method
|
|
|
|
.method public static eventJSON(Ljava/lang/String;Lorg/json/JSONObject;)Z
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 314
|
|
:try_start_0
|
|
invoke-static {}, Lcom/singular/sdk/Singular;->isInitialized()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 316
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/singular/sdk/internal/Utils;->isEmptyOrNull(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
sget-object p0, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string p1, "Event name can not be null or empty"
|
|
|
|
.line 317
|
|
invoke-virtual {p0, p1}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;)I
|
|
|
|
return v0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 321
|
|
invoke-virtual {p1}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
sget-object v1, Lcom/singular/sdk/Singular;->singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
.line 322
|
|
invoke-virtual {v1, p0, p1}, Lcom/singular/sdk/internal/SingularInstance;->logEvent(Ljava/lang/String;Ljava/lang/String;)Z
|
|
|
|
move-result p0
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return p0
|
|
|
|
.line 324
|
|
:goto_1
|
|
invoke-static {p0}, Lcom/singular/sdk/Singular;->reportException(Ljava/lang/Throwable;)V
|
|
|
|
sget-object p1, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v1, "Exception"
|
|
|
|
.line 325
|
|
invoke-virtual {p1, v1, p0}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static init(Landroid/content/Context;Lcom/singular/sdk/SingularConfig;)Z
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
sget-object v1, Lcom/singular/sdk/Singular;->singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_1
|
|
sput-boolean v0, Lcom/singular/sdk/Singular;->isInstanceAlreadyInitialized:Z
|
|
|
|
.line 69
|
|
invoke-static {p0, p1}, Lcom/singular/sdk/internal/SingularInstance;->getInstance(Landroid/content/Context;Lcom/singular/sdk/SingularConfig;)Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
move-result-object p1
|
|
|
|
sput-object p1, Lcom/singular/sdk/Singular;->singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
sget-boolean v0, Lcom/singular/sdk/Singular;->isInstanceAlreadyInitialized:Z
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 72
|
|
invoke-virtual {p1}, Lcom/singular/sdk/internal/SingularInstance;->startSessionIfOpenedWithDeeplink()V
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
goto :goto_2
|
|
|
|
.line 76
|
|
:cond_2
|
|
:goto_0
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p0
|
|
|
|
sput-object p0, Lcom/singular/sdk/Singular;->saved_application_context:Landroid/content/Context;
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_3
|
|
|
|
.line 82
|
|
:goto_1
|
|
invoke-static {p0}, Lcom/singular/sdk/Singular;->reportException(Ljava/lang/Throwable;)V
|
|
|
|
sget-object p1, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v0, "Exception"
|
|
|
|
.line 83
|
|
invoke-virtual {p1, v0, p0}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
goto :goto_3
|
|
|
|
:goto_2
|
|
sget-object p1, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v0, "Failed to init() Singular SDK"
|
|
|
|
.line 78
|
|
invoke-virtual {p1, v0}, Lcom/singular/sdk/internal/SingularLog;->debug(Ljava/lang/String;)I
|
|
|
|
const-string v0, "init() IOException"
|
|
|
|
.line 79
|
|
invoke-virtual {p1, v0, p0}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
const/4 p0, 0x0
|
|
|
|
sput-object p0, Lcom/singular/sdk/Singular;->singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
.line 86
|
|
:goto_3
|
|
invoke-static {}, Lcom/singular/sdk/Singular;->isInitialized()Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_3
|
|
:goto_4
|
|
return v0
|
|
.end method
|
|
|
|
.method public static isInitialized()Z
|
|
.locals 2
|
|
|
|
sget-object v0, Lcom/singular/sdk/Singular;->singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
sget-object v0, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v1, "Singular not initialized. You must call Singular.init() "
|
|
|
|
.line 99
|
|
invoke-virtual {v0, v1}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;)I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static reportException(Ljava/lang/Throwable;)V
|
|
.locals 1
|
|
|
|
:try_start_0
|
|
sget-object v0, Lcom/singular/sdk/Singular;->saved_application_context:Landroid/content/Context;
|
|
|
|
.line 91
|
|
invoke-static {v0}, Lcom/singular/sdk/internal/SingularExceptionReporter;->getReporter(Landroid/content/Context;)Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Lcom/singular/sdk/internal/SingularExceptionReporter;->reportException(Ljava/lang/Throwable;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static revenue(Ljava/lang/String;D)Z
|
|
.locals 1
|
|
|
|
const-string v0, "__iap__"
|
|
|
|
.line 187
|
|
invoke-static {v0, p0, p1, p2}, Lcom/singular/sdk/Singular;->customRevenue(Ljava/lang/String;Ljava/lang/String;D)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static revenue(Ljava/lang/String;DLjava/lang/Object;)Z
|
|
.locals 1
|
|
|
|
const-string v0, "__iap__"
|
|
|
|
.line 179
|
|
invoke-static {v0, p0, p1, p2, p3}, Lcom/singular/sdk/Singular;->customRevenue(Ljava/lang/String;Ljava/lang/String;DLjava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static revenue(Ljava/lang/String;DLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ID)Z
|
|
.locals 10
|
|
|
|
const-string v0, "__iap__"
|
|
|
|
move-object v1, p0
|
|
|
|
move-wide v2, p1
|
|
|
|
move-object v4, p3
|
|
|
|
move-object v5, p4
|
|
|
|
move-object v6, p5
|
|
|
|
move/from16 v7, p6
|
|
|
|
move-wide/from16 v8, p7
|
|
|
|
.line 199
|
|
invoke-static/range {v0 .. v9}, Lcom/singular/sdk/Singular;->customRevenue(Ljava/lang/String;Ljava/lang/String;DLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ID)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static setCustomUserId(Ljava/lang/String;)V
|
|
.locals 2
|
|
|
|
.line 409
|
|
:try_start_0
|
|
invoke-static {}, Lcom/singular/sdk/Singular;->isInitialized()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/singular/sdk/Singular;->singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
.line 410
|
|
invoke-virtual {v0, p0}, Lcom/singular/sdk/internal/SingularInstance;->saveCustomUserId(Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 412
|
|
invoke-static {p0}, Lcom/singular/sdk/Singular;->reportException(Ljava/lang/Throwable;)V
|
|
|
|
sget-object v0, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v1, "Exception"
|
|
|
|
.line 413
|
|
invoke-virtual {v0, v1, p0}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static unsetCustomUserId()V
|
|
.locals 3
|
|
|
|
.line 419
|
|
:try_start_0
|
|
invoke-static {}, Lcom/singular/sdk/Singular;->isInitialized()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/singular/sdk/Singular;->singular:Lcom/singular/sdk/internal/SingularInstance;
|
|
|
|
const-string v1, ""
|
|
|
|
.line 420
|
|
invoke-virtual {v0, v1}, Lcom/singular/sdk/internal/SingularInstance;->saveCustomUserId(Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 422
|
|
invoke-static {v0}, Lcom/singular/sdk/Singular;->reportException(Ljava/lang/Throwable;)V
|
|
|
|
sget-object v1, Lcom/singular/sdk/Singular;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
const-string v2, "Exception"
|
|
|
|
.line 423
|
|
invoke-virtual {v1, v2, v0}, Lcom/singular/sdk/internal/SingularLog;->error(Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|