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

755 lines
19 KiB
Smali

.class public final Lcom/facebook/appevents/SessionEventsState;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/facebook/appevents/SessionEventsState$Companion;
}
.end annotation
# static fields
.field public static final Companion:Lcom/facebook/appevents/SessionEventsState$Companion;
.field private static final MAX_ACCUMULATED_LOG_EVENTS:I
.field private static final TAG:Ljava/lang/String;
# instance fields
.field private accumulatedEvents:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/facebook/appevents/AppEvent;",
">;"
}
.end annotation
.end field
.field private final anonymousAppDeviceGUID:Ljava/lang/String;
.field private final attributionIdentifiers:Lcom/facebook/internal/AttributionIdentifiers;
.field private final inFlightEvents:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/facebook/appevents/AppEvent;",
">;"
}
.end annotation
.end field
.field private numSkippedEventsDueToFullBuffer:I
# direct methods
.method static constructor <clinit>()V
.locals 2
new-instance v0, Lcom/facebook/appevents/SessionEventsState$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lcom/facebook/appevents/SessionEventsState$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lcom/facebook/appevents/SessionEventsState;->Companion:Lcom/facebook/appevents/SessionEventsState$Companion;
const-class v0, Lcom/facebook/appevents/SessionEventsState;
.line 145
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/facebook/appevents/SessionEventsState;->TAG:Ljava/lang/String;
const/16 v0, 0x3e8
sput v0, Lcom/facebook/appevents/SessionEventsState;->MAX_ACCUMULATED_LOG_EVENTS:I
return-void
.end method
.method public constructor <init>(Lcom/facebook/internal/AttributionIdentifiers;Ljava/lang/String;)V
.locals 1
const-string v0, "attributionIdentifiers"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "anonymousAppDeviceGUID"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 23
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/facebook/appevents/SessionEventsState;->attributionIdentifiers:Lcom/facebook/internal/AttributionIdentifiers;
iput-object p2, p0, Lcom/facebook/appevents/SessionEventsState;->anonymousAppDeviceGUID:Ljava/lang/String;
.line 28
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
.line 29
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Lcom/facebook/appevents/SessionEventsState;->inFlightEvents:Ljava/util/List;
return-void
.end method
.method private final populateRequest(Lcom/facebook/GraphRequest;Landroid/content/Context;ILorg/json/JSONArray;Z)V
.locals 3
invoke-static {p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
return-void
.line 123
:cond_0
:try_start_0
sget-object v0, Lcom/facebook/appevents/internal/AppEventsLoggerUtility;->INSTANCE:Lcom/facebook/appevents/internal/AppEventsLoggerUtility;
.line 124
sget-object v0, Lcom/facebook/appevents/internal/AppEventsLoggerUtility$GraphAPIActivityType;->CUSTOM_APP_EVENTS:Lcom/facebook/appevents/internal/AppEventsLoggerUtility$GraphAPIActivityType;
iget-object v1, p0, Lcom/facebook/appevents/SessionEventsState;->attributionIdentifiers:Lcom/facebook/internal/AttributionIdentifiers;
iget-object v2, p0, Lcom/facebook/appevents/SessionEventsState;->anonymousAppDeviceGUID:Ljava/lang/String;
.line 123
invoke-static {v0, v1, v2, p5, p2}, Lcom/facebook/appevents/internal/AppEventsLoggerUtility;->getJSONObjectForGraphAPICall(Lcom/facebook/appevents/internal/AppEventsLoggerUtility$GraphAPIActivityType;Lcom/facebook/internal/AttributionIdentifiers;Ljava/lang/String;ZLandroid/content/Context;)Lorg/json/JSONObject;
move-result-object p2
iget p5, p0, Lcom/facebook/appevents/SessionEventsState;->numSkippedEventsDueToFullBuffer:I
if-lez p5, :cond_1
const-string p5, "num_skipped_events"
.line 130
invoke-virtual {p2, p5, p3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
.line 134
:catch_0
:try_start_1
new-instance p2, Lorg/json/JSONObject;
invoke-direct {p2}, Lorg/json/JSONObject;-><init>()V
.line 136
:cond_1
:goto_0
invoke-virtual {p1, p2}, Lcom/facebook/GraphRequest;->setGraphObject(Lorg/json/JSONObject;)V
.line 137
invoke-virtual {p1}, Lcom/facebook/GraphRequest;->getParameters()Landroid/os/Bundle;
move-result-object p2
.line 138
invoke-virtual {p4}, Lorg/json/JSONArray;->toString()Ljava/lang/String;
move-result-object p3
const-string p4, "events.toString()"
invoke-static {p3, p4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
const-string p4, "custom_events"
.line 139
invoke-virtual {p2, p4, p3}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 140
invoke-virtual {p1, p3}, Lcom/facebook/GraphRequest;->setTag(Ljava/lang/Object;)V
.line 141
invoke-virtual {p1, p2}, Lcom/facebook/GraphRequest;->setParameters(Landroid/os/Bundle;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
return-void
.line 142
:goto_1
invoke-static {p1, p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public final declared-synchronized accumulatePersistedEvents(Ljava/util/List;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/facebook/appevents/AppEvent;",
">;)V"
}
.end annotation
monitor-enter p0
:try_start_0
invoke-static {p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-eqz v0, :cond_0
monitor-exit p0
return-void
:cond_0
:try_start_1
const-string v0, "events"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
.line 110
check-cast p1, Ljava/util/Collection;
invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 111
monitor-exit p0
return-void
:catchall_0
move-exception p1
:try_start_2
invoke-static {p1, p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return-void
:catchall_1
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized addEvent(Lcom/facebook/appevents/AppEvent;)V
.locals 2
monitor-enter p0
:try_start_0
invoke-static {p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-eqz v0, :cond_0
monitor-exit p0
return-void
:cond_0
:try_start_1
const-string v0, "event"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
.line 36
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
iget-object v1, p0, Lcom/facebook/appevents/SessionEventsState;->inFlightEvents:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
add-int/2addr v0, v1
sget v1, Lcom/facebook/appevents/SessionEventsState;->MAX_ACCUMULATED_LOG_EVENTS:I
if-lt v0, v1, :cond_1
iget p1, p0, Lcom/facebook/appevents/SessionEventsState;->numSkippedEventsDueToFullBuffer:I
add-int/lit8 p1, p1, 0x1
iput p1, p0, Lcom/facebook/appevents/SessionEventsState;->numSkippedEventsDueToFullBuffer:I
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
:cond_1
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
.line 39
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 41
:goto_0
monitor-exit p0
return-void
:goto_1
:try_start_2
invoke-static {p1, p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return-void
:catchall_1
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized clearInFlightAndStats(Z)V
.locals 1
monitor-enter p0
:try_start_0
invoke-static {p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-eqz v0, :cond_0
monitor-exit p0
return-void
:cond_0
if-eqz p1, :cond_1
:try_start_1
iget-object p1, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->inFlightEvents:Ljava/util/List;
.line 50
check-cast v0, Ljava/util/Collection;
invoke-interface {p1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
:cond_1
:goto_0
iget-object p1, p0, Lcom/facebook/appevents/SessionEventsState;->inFlightEvents:Ljava/util/List;
.line 52
invoke-interface {p1}, Ljava/util/List;->clear()V
const/4 p1, 0x0
iput p1, p0, Lcom/facebook/appevents/SessionEventsState;->numSkippedEventsDueToFullBuffer:I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 54
monitor-exit p0
return-void
:goto_1
:try_start_2
invoke-static {p1, p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return-void
:catchall_1
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized getAccumulatedEventCount()I
.locals 2
monitor-enter p0
:try_start_0
invoke-static {p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
const/4 v1, 0x0
if-eqz v0, :cond_0
monitor-exit p0
return v1
:cond_0
:try_start_1
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
.line 45
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
:try_start_2
invoke-static {v0, p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return v1
:catchall_1
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized getEventsToPersist()Ljava/util/List;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/facebook/appevents/AppEvent;",
">;"
}
.end annotation
monitor-enter p0
:try_start_0
invoke-static {p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
const/4 v1, 0x0
if-eqz v0, :cond_0
monitor-exit p0
return-object v1
:cond_0
:try_start_1
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
.line 101
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
iput-object v2, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 102
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
:try_start_2
invoke-static {v0, p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return-object v1
:catchall_1
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final populateRequest(Lcom/facebook/GraphRequest;Landroid/content/Context;ZZ)I
.locals 8
invoke-static {p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_0
return v1
:cond_0
:try_start_0
const-string v0, "request"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "applicationContext"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 64
monitor-enter p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget v5, p0, Lcom/facebook/appevents/SessionEventsState;->numSkippedEventsDueToFullBuffer:I
.line 68
sget-object v0, Lcom/facebook/appevents/eventdeactivation/EventDeactivationManager;->INSTANCE:Lcom/facebook/appevents/eventdeactivation/EventDeactivationManager;
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
invoke-static {v0}, Lcom/facebook/appevents/eventdeactivation/EventDeactivationManager;->processEvents(Ljava/util/List;)V
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->inFlightEvents:Ljava/util/List;
iget-object v2, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
.line 71
check-cast v2, Ljava/util/Collection;
invoke-interface {v0, v2}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
iget-object v0, p0, Lcom/facebook/appevents/SessionEventsState;->accumulatedEvents:Ljava/util/List;
.line 72
invoke-interface {v0}, Ljava/util/List;->clear()V
.line 73
new-instance v0, Lorg/json/JSONArray;
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
iget-object v2, p0, Lcom/facebook/appevents/SessionEventsState;->inFlightEvents:Ljava/util/List;
.line 74
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_1
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_4
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/facebook/appevents/AppEvent;
.line 75
invoke-virtual {v3}, Lcom/facebook/appevents/AppEvent;->isChecksumValid()Z
move-result v4
if-eqz v4, :cond_3
if-nez p3, :cond_2
.line 76
invoke-virtual {v3}, Lcom/facebook/appevents/AppEvent;->isImplicit()Z
move-result v4
if-nez v4, :cond_1
goto :goto_1
:catchall_0
move-exception p1
goto :goto_2
.line 77
:cond_2
:goto_1
invoke-virtual {v3}, Lcom/facebook/appevents/AppEvent;->getJsonObject()Lorg/json/JSONObject;
move-result-object v3
invoke-virtual {v0, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
goto :goto_0
.line 80
:cond_3
sget-object v4, Lcom/facebook/internal/Utility;->INSTANCE:Lcom/facebook/internal/Utility;
sget-object v4, Lcom/facebook/appevents/SessionEventsState;->TAG:Ljava/lang/String;
const-string v6, "Event with invalid checksum: "
invoke-static {v6, v3}, Lkotlin/jvm/internal/Intrinsics;->stringPlus(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
move-result-object v3
invoke-static {v4, v3}, Lcom/facebook/internal/Utility;->logd(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_0
.line 83
:cond_4
invoke-virtual {v0}, Lorg/json/JSONArray;->length()I
move-result p3
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-nez p3, :cond_5
.line 84
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
return v1
:catchall_1
move-exception p1
goto :goto_3
.line 86
:cond_5
:try_start_3
sget-object p3, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
.line 64
:try_start_4
monitor-exit p0
move-object v2, p0
move-object v3, p1
move-object v4, p2
move-object v6, v0
move v7, p4
.line 87
invoke-direct/range {v2 .. v7}, Lcom/facebook/appevents/SessionEventsState;->populateRequest(Lcom/facebook/GraphRequest;Landroid/content/Context;ILorg/json/JSONArray;Z)V
.line 88
invoke-virtual {v0}, Lorg/json/JSONArray;->length()I
move-result p1
return p1
.line 64
:goto_2
monitor-exit p0
throw p1
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
.line 88
:goto_3
invoke-static {p1, p0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
return v1
.end method