- 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
294 lines
8.4 KiB
Smali
294 lines
8.4 KiB
Smali
.class public Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
.super Landroid/os/HandlerThread;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field public static instance:Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
|
|
|
|
# instance fields
|
|
.field public context:Landroid/content/Context;
|
|
|
|
.field public device_info:Lcom/singular/sdk/internal/DeviceInfo;
|
|
|
|
.field public handler:Landroid/os/Handler;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
.line 41
|
|
invoke-direct {p0, p1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput-object p1, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->handler:Landroid/os/Handler;
|
|
|
|
iput-object p1, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->context:Landroid/content/Context;
|
|
|
|
iput-object p1, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->device_info:Lcom/singular/sdk/internal/DeviceInfo;
|
|
|
|
.line 43
|
|
invoke-virtual {p0}, Ljava/lang/Thread;->start()V
|
|
|
|
.line 44
|
|
new-instance p1, Landroid/os/Handler;
|
|
|
|
invoke-virtual {p0}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
|
|
|
|
iput-object p1, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->handler:Landroid/os/Handler;
|
|
|
|
iput-object p2, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->context:Landroid/content/Context;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$000(Lcom/singular/sdk/internal/SingularExceptionReporter;)Lcom/singular/sdk/internal/DeviceInfo;
|
|
.locals 0
|
|
|
|
.line 20
|
|
iget-object p0, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->device_info:Lcom/singular/sdk/internal/DeviceInfo;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$002(Lcom/singular/sdk/internal/SingularExceptionReporter;Lcom/singular/sdk/internal/DeviceInfo;)Lcom/singular/sdk/internal/DeviceInfo;
|
|
.locals 0
|
|
|
|
.line 20
|
|
iput-object p1, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->device_info:Lcom/singular/sdk/internal/DeviceInfo;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$100(Lcom/singular/sdk/internal/SingularExceptionReporter;)Landroid/content/Context;
|
|
.locals 0
|
|
|
|
.line 20
|
|
iget-object p0, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->context:Landroid/content/Context;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$200(Lcom/singular/sdk/internal/SingularExceptionReporter;Lorg/json/JSONObject;)I
|
|
.locals 0
|
|
|
|
.line 20
|
|
invoke-virtual {p0, p1}, Lcom/singular/sdk/internal/SingularExceptionReporter;->postExceptionDataToServer(Lorg/json/JSONObject;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static getReporter(Landroid/content/Context;)Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
.locals 3
|
|
|
|
sget-object v0, Lcom/singular/sdk/internal/SingularExceptionReporter;->instance:Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-class v0, Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
|
|
.line 31
|
|
monitor-enter v0
|
|
|
|
.line 32
|
|
:try_start_0
|
|
new-instance v1, Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
|
|
const-string v2, "singular_exception_reporter"
|
|
|
|
invoke-direct {v1, v2, p0}, Lcom/singular/sdk/internal/SingularExceptionReporter;-><init>(Ljava/lang/String;Landroid/content/Context;)V
|
|
|
|
sput-object v1, Lcom/singular/sdk/internal/SingularExceptionReporter;->instance:Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
|
|
.line 33
|
|
invoke-virtual {v1}, Lcom/singular/sdk/internal/SingularExceptionReporter;->initDeviceInfo()V
|
|
|
|
.line 34
|
|
monitor-exit v0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
sget-object p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->instance:Lcom/singular/sdk/internal/SingularExceptionReporter;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final initDeviceInfo()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->device_info:Lcom/singular/sdk/internal/DeviceInfo;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->handler:Landroid/os/Handler;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->context:Landroid/content/Context;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 51
|
|
new-instance v0, Lcom/singular/sdk/internal/SingularExceptionReporter$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/singular/sdk/internal/SingularExceptionReporter$1;-><init>(Lcom/singular/sdk/internal/SingularExceptionReporter;)V
|
|
|
|
iget-object v1, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->handler:Landroid/os/Handler;
|
|
|
|
.line 63
|
|
invoke-virtual {v1, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final postExceptionDataToServer(Lorg/json/JSONObject;)I
|
|
.locals 3
|
|
|
|
.line 115
|
|
:try_start_0
|
|
new-instance v0, Ljava/net/URL;
|
|
|
|
const-string v1, "https://exceptions.singular.net/v2/exceptions/android"
|
|
|
|
invoke-direct {v0, v1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 117
|
|
invoke-virtual {v0}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/google/firebase/perf/network/FirebasePerfUrlConnection;->instrument(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/net/URLConnection;
|
|
|
|
check-cast v0, Ljava/net/HttpURLConnection;
|
|
|
|
const-string v1, "POST"
|
|
|
|
.line 119
|
|
invoke-virtual {v0, v1}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
|
|
|
|
const-string v1, "Content-Type"
|
|
|
|
const-string v2, "application/json"
|
|
|
|
.line 120
|
|
invoke-virtual {v0, v1, v2}, Ljava/net/URLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/16 v1, 0x2710
|
|
|
|
.line 121
|
|
invoke-virtual {v0, v1}, Ljava/net/URLConnection;->setConnectTimeout(I)V
|
|
|
|
.line 122
|
|
invoke-virtual {v0, v1}, Ljava/net/URLConnection;->setReadTimeout(I)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 123
|
|
invoke-virtual {v0, v1}, Ljava/net/URLConnection;->setDoOutput(Z)V
|
|
|
|
.line 126
|
|
invoke-virtual {p1}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "Content-Length"
|
|
|
|
.line 127
|
|
array-length v2, p1
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/net/URLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 128
|
|
invoke-virtual {v0}, Ljava/net/URLConnection;->getOutputStream()Ljava/io/OutputStream;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p1}, Ljava/io/OutputStream;->write([B)V
|
|
|
|
.line 130
|
|
invoke-virtual {v0}, Ljava/net/URLConnection;->connect()V
|
|
|
|
.line 132
|
|
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getResponseCode()I
|
|
|
|
move-result p1
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return p1
|
|
|
|
:catch_0
|
|
const/4 p1, -0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public reportException(Ljava/lang/Throwable;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->handler:Landroid/os/Handler;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 69
|
|
new-instance v0, Lcom/singular/sdk/internal/SingularExceptionReporter$2;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/singular/sdk/internal/SingularExceptionReporter$2;-><init>(Lcom/singular/sdk/internal/SingularExceptionReporter;Ljava/lang/Throwable;)V
|
|
|
|
iget-object p1, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->handler:Landroid/os/Handler;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 108
|
|
invoke-virtual {p1, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V
|
|
|
|
iget-object p1, p0, Lcom/singular/sdk/internal/SingularExceptionReporter;->handler:Landroid/os/Handler;
|
|
|
|
.line 109
|
|
invoke-virtual {p1, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|