Files
rr3-apk/smali_classes2/com/facebook/appevents/AppEventDiskStore.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

432 lines
11 KiB
Smali

.class public final Lcom/facebook/appevents/AppEventDiskStore;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/facebook/appevents/AppEventDiskStore$MovedClassObjectInputStream;
}
.end annotation
# static fields
.field public static final INSTANCE:Lcom/facebook/appevents/AppEventDiskStore;
.field private static final PERSISTED_EVENTS_FILENAME:Ljava/lang/String; = "AppEventsLogger.persistedevents"
.field private static final TAG:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Lcom/facebook/appevents/AppEventDiskStore;
invoke-direct {v0}, Lcom/facebook/appevents/AppEventDiskStore;-><init>()V
sput-object v0, Lcom/facebook/appevents/AppEventDiskStore;->INSTANCE:Lcom/facebook/appevents/AppEventDiskStore;
const-class v0, Lcom/facebook/appevents/AppEventDiskStore;
.line 26
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/facebook/appevents/AppEventDiskStore;->TAG:Ljava/lang/String;
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 declared-synchronized readAndClearStore()Lcom/facebook/appevents/PersistedEvents;
.locals 7
const-class v0, Lcom/facebook/appevents/AppEventDiskStore;
monitor-enter v0
.line 33
:try_start_0
invoke-static {}, Lcom/facebook/appevents/internal/AppEventUtility;->assertIsNotMainThread()V
.line 36
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context;
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v2, 0x0
:try_start_1
const-string v3, "AppEventsLogger.persistedevents"
.line 38
invoke-virtual {v1, v3}, Landroid/content/Context;->openFileInput(Ljava/lang/String;)Ljava/io/FileInputStream;
move-result-object v3
const-string v4, "context.openFileInput(PERSISTED_EVENTS_FILENAME)"
invoke-static {v3, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 39
new-instance v4, Lcom/facebook/appevents/AppEventDiskStore$MovedClassObjectInputStream;
new-instance v5, Ljava/io/BufferedInputStream;
invoke-direct {v5, v3}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V
invoke-direct {v4, v5}, Lcom/facebook/appevents/AppEventDiskStore$MovedClassObjectInputStream;-><init>(Ljava/io/InputStream;)V
:try_end_1
.catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_3
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2
.catchall {:try_start_1 .. :try_end_1} :catchall_2
.line 40
:try_start_2
invoke-virtual {v4}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;
move-result-object v3
if-eqz v3, :cond_0
check-cast v3, Lcom/facebook/appevents/PersistedEvents;
:try_end_2
.catch Ljava/io/FileNotFoundException; {:try_start_2 .. :try_end_2} :catch_6
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1
.catchall {:try_start_2 .. :try_end_2} :catchall_1
.line 46
:try_start_3
invoke-static {v4}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:try_start_4
const-string v2, "AppEventsLogger.persistedevents"
.line 53
invoke-virtual {v1, v2}, Landroid/content/Context;->getFileStreamPath(Ljava/lang/String;)Ljava/io/File;
move-result-object v1
invoke-virtual {v1}, Ljava/io/File;->delete()Z
:try_end_4
.catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0
.catchall {:try_start_4 .. :try_end_4} :catchall_0
goto :goto_0
:catchall_0
move-exception v1
goto/16 :goto_7
:catch_0
move-exception v1
:try_start_5
sget-object v2, Lcom/facebook/appevents/AppEventDiskStore;->TAG:Ljava/lang/String;
const-string v4, "Got unexpected exception when removing events file: "
.line 55
invoke-static {v2, v4, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
:goto_0
move-object v2, v3
goto :goto_6
:catchall_1
move-exception v2
goto :goto_3
:catch_1
move-exception v3
goto :goto_1
.line 40
:cond_0
:try_start_6
new-instance v3, Ljava/lang/NullPointerException;
const-string v5, "null cannot be cast to non-null type com.facebook.appevents.PersistedEvents"
invoke-direct {v3, v5}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v3
:try_end_6
.catch Ljava/io/FileNotFoundException; {:try_start_6 .. :try_end_6} :catch_6
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_1
.catchall {:try_start_6 .. :try_end_6} :catchall_1
:catchall_2
move-exception v3
move-object v4, v2
move-object v2, v3
goto :goto_3
:catch_2
move-exception v3
move-object v4, v2
goto :goto_1
:catch_3
move-object v4, v2
goto :goto_5
:goto_1
:try_start_7
sget-object v5, Lcom/facebook/appevents/AppEventDiskStore;->TAG:Ljava/lang/String;
const-string v6, "Got unexpected exception while reading events: "
.line 44
invoke-static {v5, v6, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_1
.line 46
:try_start_8
invoke-static {v4}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V
:try_end_8
.catchall {:try_start_8 .. :try_end_8} :catchall_0
:try_start_9
const-string v3, "AppEventsLogger.persistedevents"
.line 53
invoke-virtual {v1, v3}, Landroid/content/Context;->getFileStreamPath(Ljava/lang/String;)Ljava/io/File;
move-result-object v1
invoke-virtual {v1}, Ljava/io/File;->delete()Z
:try_end_9
.catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_4
.catchall {:try_start_9 .. :try_end_9} :catchall_0
goto :goto_6
:catch_4
move-exception v1
:try_start_a
sget-object v3, Lcom/facebook/appevents/AppEventDiskStore;->TAG:Ljava/lang/String;
const-string v4, "Got unexpected exception when removing events file: "
.line 55
:goto_2
invoke-static {v3, v4, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_6
.line 46
:goto_3
invoke-static {v4}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V
:try_end_a
.catchall {:try_start_a .. :try_end_a} :catchall_0
:try_start_b
const-string v3, "AppEventsLogger.persistedevents"
.line 53
invoke-virtual {v1, v3}, Landroid/content/Context;->getFileStreamPath(Ljava/lang/String;)Ljava/io/File;
move-result-object v1
invoke-virtual {v1}, Ljava/io/File;->delete()Z
:try_end_b
.catch Ljava/lang/Exception; {:try_start_b .. :try_end_b} :catch_5
.catchall {:try_start_b .. :try_end_b} :catchall_0
goto :goto_4
:catch_5
move-exception v1
:try_start_c
sget-object v3, Lcom/facebook/appevents/AppEventDiskStore;->TAG:Ljava/lang/String;
const-string v4, "Got unexpected exception when removing events file: "
.line 55
invoke-static {v3, v4, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:goto_4
throw v2
.line 46
:catch_6
:goto_5
invoke-static {v4}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V
:try_end_c
.catchall {:try_start_c .. :try_end_c} :catchall_0
:try_start_d
const-string v3, "AppEventsLogger.persistedevents"
.line 53
invoke-virtual {v1, v3}, Landroid/content/Context;->getFileStreamPath(Ljava/lang/String;)Ljava/io/File;
move-result-object v1
invoke-virtual {v1}, Ljava/io/File;->delete()Z
:try_end_d
.catch Ljava/lang/Exception; {:try_start_d .. :try_end_d} :catch_7
.catchall {:try_start_d .. :try_end_d} :catchall_0
goto :goto_6
:catch_7
move-exception v1
:try_start_e
sget-object v3, Lcom/facebook/appevents/AppEventDiskStore;->TAG:Ljava/lang/String;
const-string v4, "Got unexpected exception when removing events file: "
goto :goto_2
:goto_6
if-nez v2, :cond_1
.line 59
new-instance v2, Lcom/facebook/appevents/PersistedEvents;
invoke-direct {v2}, Lcom/facebook/appevents/PersistedEvents;-><init>()V
:try_end_e
.catchall {:try_start_e .. :try_end_e} :catchall_0
.line 61
:cond_1
monitor-exit v0
return-object v2
:goto_7
monitor-exit v0
throw v1
.end method
.method public static final saveEventsToDisk$facebook_core_release(Lcom/facebook/appevents/PersistedEvents;)V
.locals 6
const-string v0, "AppEventsLogger.persistedevents"
.line 68
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context;
move-result-object v1
const/4 v2, 0x0
.line 71
:try_start_0
new-instance v3, Ljava/io/ObjectOutputStream;
.line 72
new-instance v4, Ljava/io/BufferedOutputStream;
const/4 v5, 0x0
invoke-virtual {v1, v0, v5}, Landroid/content/Context;->openFileOutput(Ljava/lang/String;I)Ljava/io/FileOutputStream;
move-result-object v5
invoke-direct {v4, v5}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V
.line 71
invoke-direct {v3, v4}, Ljava/io/ObjectOutputStream;-><init>(Ljava/io/OutputStream;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
.line 73
:try_start_1
invoke-virtual {v3, p0}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 82
invoke-static {v3}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V
goto :goto_2
:catchall_0
move-exception p0
move-object v2, v3
goto :goto_0
:catchall_1
move-exception p0
:goto_0
:try_start_2
sget-object v3, Lcom/facebook/appevents/AppEventDiskStore;->TAG:Ljava/lang/String;
const-string v4, "Got unexpected exception while persisting events: "
.line 75
invoke-static {v3, v4, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
.line 77
:try_start_3
invoke-virtual {v1, v0}, Landroid/content/Context;->getFileStreamPath(Ljava/lang/String;)Ljava/io/File;
move-result-object p0
invoke-virtual {p0}, Ljava/io/File;->delete()Z
:try_end_3
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0
.catchall {:try_start_3 .. :try_end_3} :catchall_2
goto :goto_1
:catchall_2
move-exception p0
goto :goto_3
.line 82
:catch_0
:goto_1
invoke-static {v2}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V
:goto_2
return-void
:goto_3
invoke-static {v2}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V
throw p0
.end method