Files
rr3-apk/smali_classes2/com/facebook/internal/instrument/ExceptionAnalyzer.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

398 lines
10 KiB
Smali

.class public final Lcom/facebook/internal/instrument/ExceptionAnalyzer;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
# static fields
.field public static final INSTANCE:Lcom/facebook/internal/instrument/ExceptionAnalyzer;
.field private static enabled:Z
# direct methods
.method public static synthetic $r8$lambda$pPDlq7E5Nv4wEVLn6mrA0r-QImQ(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/GraphResponse;)V
.locals 0
.line 0
invoke-static {p0, p1}, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->sendExceptionAnalysisReports$lambda-1(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/GraphResponse;)V
return-void
.end method
.method static constructor <clinit>()V
.locals 1
new-instance v0, Lcom/facebook/internal/instrument/ExceptionAnalyzer;
invoke-direct {v0}, Lcom/facebook/internal/instrument/ExceptionAnalyzer;-><init>()V
sput-object v0, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->INSTANCE:Lcom/facebook/internal/instrument/ExceptionAnalyzer;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 25
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static final enable()V
.locals 1
const/4 v0, 0x1
sput-boolean v0, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->enabled:Z
.line 36
invoke-static {}, Lcom/facebook/FacebookSdk;->getAutoLogAppEventsEnabled()Z
move-result v0
if-eqz v0, :cond_0
sget-object v0, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->INSTANCE:Lcom/facebook/internal/instrument/ExceptionAnalyzer;
.line 37
invoke-virtual {v0}, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->sendExceptionAnalysisReports$facebook_core_release()V
:cond_0
return-void
.end method
.method public static final execute(Ljava/lang/Throwable;)V
.locals 5
sget-boolean v0, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->enabled:Z
if-eqz v0, :cond_3
.line 43
invoke-static {}, Lcom/facebook/internal/instrument/ExceptionAnalyzer;->isDebug$facebook_core_release()Z
move-result v0
if-nez v0, :cond_3
if-nez p0, :cond_0
goto :goto_1
.line 46
:cond_0
new-instance v0, Ljava/util/HashSet;
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
.line 47
invoke-virtual {p0}, Ljava/lang/Throwable;->getStackTrace()[Ljava/lang/StackTraceElement;
move-result-object p0
const-string v1, "e.stackTrace"
invoke-static {p0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 100
array-length v1, p0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_2
aget-object v3, p0, v2
.line 48
sget-object v4, Lcom/facebook/internal/FeatureManager;->INSTANCE:Lcom/facebook/internal/FeatureManager;
invoke-virtual {v3}, Ljava/lang/StackTraceElement;->getClassName()Ljava/lang/String;
move-result-object v3
const-string v4, "it.className"
invoke-static {v3, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {v3}, Lcom/facebook/internal/FeatureManager;->getFeature(Ljava/lang/String;)Lcom/facebook/internal/FeatureManager$Feature;
move-result-object v3
.line 49
sget-object v4, Lcom/facebook/internal/FeatureManager$Feature;->Unknown:Lcom/facebook/internal/FeatureManager$Feature;
if-eq v3, v4, :cond_1
.line 50
invoke-static {v3}, Lcom/facebook/internal/FeatureManager;->disableFeature(Lcom/facebook/internal/FeatureManager$Feature;)V
.line 51
invoke-virtual {v3}, Lcom/facebook/internal/FeatureManager$Feature;->toString()Ljava/lang/String;
move-result-object v3
invoke-interface {v0, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
:cond_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 54
:cond_2
invoke-static {}, Lcom/facebook/FacebookSdk;->getAutoLogAppEventsEnabled()Z
move-result p0
if-eqz p0, :cond_3
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
move-result p0
xor-int/lit8 p0, p0, 0x1
if-eqz p0, :cond_3
.line 55
sget-object p0, Lcom/facebook/internal/instrument/InstrumentData$Builder;->INSTANCE:Lcom/facebook/internal/instrument/InstrumentData$Builder;
new-instance p0, Lorg/json/JSONArray;
invoke-direct {p0, v0}, Lorg/json/JSONArray;-><init>(Ljava/util/Collection;)V
invoke-static {p0}, Lcom/facebook/internal/instrument/InstrumentData$Builder;->build(Lorg/json/JSONArray;)Lcom/facebook/internal/instrument/InstrumentData;
move-result-object p0
invoke-virtual {p0}, Lcom/facebook/internal/instrument/InstrumentData;->save()V
:cond_3
:goto_1
return-void
.end method
.method public static final isDebug$facebook_core_release()Z
.locals 1
.annotation build Landroidx/annotation/VisibleForTesting;
otherwise = 0x2
.end annotation
const/4 v0, 0x0
return v0
.end method
.method private static final sendExceptionAnalysisReports$lambda-1(Lcom/facebook/internal/instrument/InstrumentData;Lcom/facebook/GraphResponse;)V
.locals 1
const-string v0, "$instrumentData"
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
.line 79
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 80
invoke-virtual {p0}, Lcom/facebook/internal/instrument/InstrumentData;->clear()V
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:cond_1
return-void
.end method
# virtual methods
.method public final sendExceptionAnalysisReports$facebook_core_release()V
.locals 12
.annotation build Landroidx/annotation/VisibleForTesting;
otherwise = 0x2
.end annotation
.line 61
invoke-static {}, Lcom/facebook/internal/Utility;->isDataProcessingRestricted()Z
move-result v0
if-eqz v0, :cond_0
return-void
.line 64
:cond_0
invoke-static {}, Lcom/facebook/internal/instrument/InstrumentUtility;->listExceptionAnalysisReportFiles()[Ljava/io/File;
move-result-object v0
.line 65
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
.line 66
array-length v2, v0
const/4 v3, 0x0
move v4, v3
:catch_0
:cond_1
:goto_0
if-ge v4, v2, :cond_2
aget-object v5, v0, v4
add-int/lit8 v4, v4, 0x1
.line 67
invoke-static {v5}, Lcom/facebook/internal/instrument/InstrumentData$Builder;->load(Ljava/io/File;)Lcom/facebook/internal/instrument/InstrumentData;
move-result-object v5
.line 68
invoke-virtual {v5}, Lcom/facebook/internal/instrument/InstrumentData;->isValid()Z
move-result v6
if-eqz v6, :cond_1
.line 69
new-instance v6, Lorg/json/JSONObject;
invoke-direct {v6}, Lorg/json/JSONObject;-><init>()V
:try_start_0
const-string v7, "crash_shield"
.line 71
invoke-virtual {v5}, Lcom/facebook/internal/instrument/InstrumentData;->toString()Ljava/lang/String;
move-result-object v8
invoke-virtual {v6, v7, v8}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 73
sget-object v7, Lcom/facebook/GraphRequest;->Companion:Lcom/facebook/GraphRequest$Companion;
.line 75
sget-object v8, Lkotlin/jvm/internal/StringCompanionObject;->INSTANCE:Lkotlin/jvm/internal/StringCompanionObject;
const-string v8, "%s/instruments"
const/4 v9, 0x1
new-array v10, v9, [Ljava/lang/Object;
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationId()Ljava/lang/String;
move-result-object v11
aput-object v11, v10, v3
invoke-static {v10, v9}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object v9
invoke-static {v8, v9}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v8
const-string v9, "java.lang.String.format(format, *args)"
invoke-static {v8, v9}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 76
new-instance v9, Lcom/facebook/internal/instrument/ExceptionAnalyzer$$ExternalSyntheticLambda0;
invoke-direct {v9, v5}, Lcom/facebook/internal/instrument/ExceptionAnalyzer$$ExternalSyntheticLambda0;-><init>(Lcom/facebook/internal/instrument/InstrumentData;)V
const/4 v5, 0x0
.line 73
invoke-virtual {v7, v5, v8, v6, v9}, Lcom/facebook/GraphRequest$Companion;->newPostRequest(Lcom/facebook/AccessToken;Ljava/lang/String;Lorg/json/JSONObject;Lcom/facebook/GraphRequest$Callback;)Lcom/facebook/GraphRequest;
move-result-object v5
.line 86
invoke-interface {v1, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 92
:cond_2
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
move-result v0
if-eqz v0, :cond_3
return-void
.line 95
:cond_3
new-instance v0, Lcom/facebook/GraphRequestBatch;
invoke-direct {v0, v1}, Lcom/facebook/GraphRequestBatch;-><init>(Ljava/util/Collection;)V
.line 96
invoke-virtual {v0}, Lcom/facebook/GraphRequestBatch;->executeAsync()Lcom/facebook/GraphRequestAsyncTask;
return-void
.end method