Files
rr3-apk/smali_classes2/com/facebook/internal/instrument/crashreport/CrashHandler$Companion.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- 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
2026-02-18 16:13:44 -08:00

399 lines
10 KiB
Smali

.class public final Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/facebook/internal/instrument/crashreport/CrashHandler;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Companion"
.end annotation
# direct methods
.method public static synthetic $r8$lambda$L8xg4V2BJVMcFEijkW4S5MhWWwI(Ljava/util/List;Lcom/facebook/GraphResponse;)V
.locals 0
.line 0
invoke-static {p0, p1}, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;->sendExceptionReports$lambda-5(Ljava/util/List;Lcom/facebook/GraphResponse;)V
return-void
.end method
.method public static synthetic $r8$lambda$WtsPGsweIsnOue9CG5UA2hmg1lM(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/internal/instrument/InstrumentData;)I
.locals 0
.line 0
invoke-static {p0, p1}, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;->sendExceptionReports$lambda-2(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/internal/instrument/InstrumentData;)I
move-result p0
return p0
.end method
.method private constructor <init>()V
.locals 0
.line 34
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
.line 0
invoke-direct {p0}, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;-><init>()V
return-void
.end method
.method private final sendExceptionReports()V
.locals 6
.line 60
invoke-static {}, Lcom/facebook/internal/Utility;->isDataProcessingRestricted()Z
move-result v0
if-eqz v0, :cond_0
return-void
.line 63
:cond_0
invoke-static {}, Lcom/facebook/internal/instrument/InstrumentUtility;->listExceptionReportFiles()[Ljava/io/File;
move-result-object v0
.line 89
new-instance v1, Ljava/util/ArrayList;
array-length v2, v0
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
.line 90
array-length v2, v0
const/4 v3, 0x0
move v4, v3
:goto_0
if-ge v4, v2, :cond_1
aget-object v5, v0, v4
.line 66
invoke-static {v5}, Lcom/facebook/internal/instrument/InstrumentData$Builder;->load(Ljava/io/File;)Lcom/facebook/internal/instrument/InstrumentData;
move-result-object v5
invoke-interface {v1, v5}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
add-int/lit8 v4, v4, 0x1
goto :goto_0
.line 93
:cond_1
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 94
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_2
:goto_1
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_3
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
move-object v4, v2
check-cast v4, Lcom/facebook/internal/instrument/InstrumentData;
.line 67
invoke-virtual {v4}, Lcom/facebook/internal/instrument/InstrumentData;->isValid()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v0, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_1
.line 93
:cond_3
new-instance v1, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion$$ExternalSyntheticLambda0;
invoke-direct {v1}, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion$$ExternalSyntheticLambda0;-><init>()V
.line 68
invoke-static {v0, v1}, Lkotlin/collections/CollectionsKt;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
move-result-object v0
.line 69
new-instance v1, Lorg/json/JSONArray;
invoke-direct {v1}, Lorg/json/JSONArray;-><init>()V
.line 72
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v2
const/4 v4, 0x5
invoke-static {v2, v4}, Ljava/lang/Math;->min(II)I
move-result v2
invoke-static {v3, v2}, Lkotlin/ranges/RangesKt;->until(II)Lkotlin/ranges/IntRange;
move-result-object v2
.line 96
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_2
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_4
move-object v3, v2
check-cast v3, Lkotlin/collections/IntIterator;
invoke-virtual {v3}, Lkotlin/collections/IntIterator;->nextInt()I
move-result v3
.line 73
invoke-interface {v0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v3
invoke-virtual {v1, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
goto :goto_2
.line 76
:cond_4
sget-object v2, Lcom/facebook/internal/instrument/InstrumentUtility;->INSTANCE:Lcom/facebook/internal/instrument/InstrumentUtility;
new-instance v2, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion$$ExternalSyntheticLambda1;
invoke-direct {v2, v0}, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion$$ExternalSyntheticLambda1;-><init>(Ljava/util/List;)V
const-string v0, "crash_reports"
invoke-static {v0, v1, v2}, Lcom/facebook/internal/instrument/InstrumentUtility;->sendReports(Ljava/lang/String;Lorg/json/JSONArray;Lcom/facebook/GraphRequest$Callback;)V
return-void
.end method
.method private static final sendExceptionReports$lambda-2(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/internal/instrument/InstrumentData;)I
.locals 1
const-string v0, "o2"
.line 68
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p0, p1}, Lcom/facebook/internal/instrument/InstrumentData;->compareTo(Lcom/facebook/internal/instrument/InstrumentData;)I
move-result p0
return p0
.end method
.method private static final sendExceptionReports$lambda-5(Ljava/util/List;Lcom/facebook/GraphResponse;)V
.locals 1
const-string v0, "$validReports"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "response"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 78
:try_start_0
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getError()Lcom/facebook/FacebookRequestError;
move-result-object v0
if-nez v0, :cond_1
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getJsonObject()Lorg/json/JSONObject;
move-result-object p1
if-nez p1, :cond_0
const/4 p1, 0x0
goto :goto_0
:cond_0
const-string v0, "success"
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getBoolean(Ljava/lang/String;)Z
move-result p1
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object p1
:goto_0
sget-object v0, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_1
.line 79
check-cast p0, Ljava/lang/Iterable;
.line 98
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p0
:goto_1
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result p1
if-eqz p1, :cond_1
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object p1
check-cast p1, Lcom/facebook/internal/instrument/InstrumentData;
.line 79
invoke-virtual {p1}, Lcom/facebook/internal/instrument/InstrumentData;->clear()V
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_1
:catch_0
:cond_1
return-void
.end method
# virtual methods
.method public final declared-synchronized enable()V
.locals 3
monitor-enter p0
.line 42
:try_start_0
invoke-static {}, Lcom/facebook/FacebookSdk;->getAutoLogAppEventsEnabled()Z
move-result v0
if-eqz v0, :cond_0
.line 43
invoke-direct {p0}, Lcom/facebook/internal/instrument/crashreport/CrashHandler$Companion;->sendExceptionReports()V
goto :goto_0
:catchall_0
move-exception v0
goto :goto_1
.line 45
:cond_0
:goto_0
invoke-static {}, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->access$getInstance$cp()Lcom/facebook/internal/instrument/crashreport/CrashHandler;
move-result-object v0
if-eqz v0, :cond_1
.line 46
invoke-static {}, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->access$getTAG$cp()Ljava/lang/String;
move-result-object v0
const-string v1, "Already enabled!"
invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 47
monitor-exit p0
return-void
.line 49
:cond_1
:try_start_1
invoke-static {}, Ljava/lang/Thread;->getDefaultUncaughtExceptionHandler()Ljava/lang/Thread$UncaughtExceptionHandler;
move-result-object v0
.line 50
new-instance v1, Lcom/facebook/internal/instrument/crashreport/CrashHandler;
const/4 v2, 0x0
invoke-direct {v1, v0, v2}, Lcom/facebook/internal/instrument/crashreport/CrashHandler;-><init>(Ljava/lang/Thread$UncaughtExceptionHandler;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
invoke-static {v1}, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->access$setInstance$cp(Lcom/facebook/internal/instrument/crashreport/CrashHandler;)V
.line 51
invoke-static {}, Lcom/facebook/internal/instrument/crashreport/CrashHandler;->access$getInstance$cp()Lcom/facebook/internal/instrument/crashreport/CrashHandler;
move-result-object v0
invoke-static {v0}, Ljava/lang/Thread;->setDefaultUncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 52
monitor-exit p0
return-void
:goto_1
monitor-exit p0
throw v0
.end method