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

363 lines
9.6 KiB
Smali

.class public final Lcom/facebook/gamingservices/TournamentFetcher;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static synthetic $r8$lambda$gepwL2BCmke5lza2LilK3PUOMro(Lcom/facebook/bolts/TaskCompletionSource;Lcom/facebook/GraphResponse;)V
.locals 0
.line 0
invoke-static {p0, p1}, Lcom/facebook/gamingservices/TournamentFetcher;->fetchTournaments$lambda-1(Lcom/facebook/bolts/TaskCompletionSource;Lcom/facebook/GraphResponse;)V
return-void
.end method
.method public constructor <init>()V
.locals 0
.line 25
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private static final fetchTournaments$lambda-1(Lcom/facebook/bolts/TaskCompletionSource;Lcom/facebook/GraphResponse;)V
.locals 6
const-string v0, "$task"
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 55
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getError()Lcom/facebook/FacebookRequestError;
move-result-object v0
if-eqz v0, :cond_3
.line 56
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getError()Lcom/facebook/FacebookRequestError;
move-result-object v0
const/4 v1, 0x0
if-nez v0, :cond_0
move-object v0, v1
goto :goto_0
:cond_0
invoke-virtual {v0}, Lcom/facebook/FacebookRequestError;->getException()Lcom/facebook/FacebookException;
move-result-object v0
:goto_0
if-eqz v0, :cond_2
.line 57
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getError()Lcom/facebook/FacebookRequestError;
move-result-object p1
if-nez p1, :cond_1
goto :goto_1
:cond_1
invoke-virtual {p1}, Lcom/facebook/FacebookRequestError;->getException()Lcom/facebook/FacebookException;
move-result-object v1
:goto_1
invoke-virtual {p0, v1}, Lcom/facebook/bolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V
return-void
.line 60
:cond_2
new-instance p1, Lcom/facebook/gamingservices/GraphAPIException;
const-string v0, "Graph API Error"
invoke-direct {p1, v0}, Lcom/facebook/gamingservices/GraphAPIException;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p1}, Lcom/facebook/bolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V
return-void
.line 64
:cond_3
:try_start_0
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getJSONObject()Lorg/json/JSONObject;
move-result-object p1
if-nez p1, :cond_4
const-string p1, "Failed to get response"
.line 67
new-instance v0, Lcom/facebook/gamingservices/GraphAPIException;
invoke-direct {v0, p1}, Lcom/facebook/gamingservices/GraphAPIException;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v0}, Lcom/facebook/bolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V
return-void
:catch_0
move-exception p1
goto :goto_3
:cond_4
const-string v0, "data"
.line 70
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
move-result-object p1
const/4 v0, 0x1
if-eqz p1, :cond_6
.line 71
invoke-virtual {p1}, Lorg/json/JSONArray;->length()I
move-result v1
if-ge v1, v0, :cond_5
goto :goto_2
.line 77
:cond_5
new-instance v0, Lcom/google/gson/GsonBuilder;
invoke-direct {v0}, Lcom/google/gson/GsonBuilder;-><init>()V
invoke-virtual {v0}, Lcom/google/gson/GsonBuilder;->create()Lcom/google/gson/Gson;
move-result-object v0
.line 78
invoke-virtual {p1}, Lorg/json/JSONArray;->toString()Ljava/lang/String;
move-result-object p1
const-string v1, "data.toString()"
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
const-class v1, [Lcom/facebook/gamingservices/Tournament;
.line 80
invoke-virtual {v0, p1, v1}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
const-string v0, "gson.fromJson(dataString, Array<Tournament>::class.java)"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p1, [Ljava/lang/Object;
invoke-static {p1}, Lkotlin/collections/ArraysKt;->toList([Ljava/lang/Object;)Ljava/util/List;
move-result-object p1
.line 81
invoke-virtual {p0, p1}, Lcom/facebook/bolts/TaskCompletionSource;->setResult(Ljava/lang/Object;)V
goto :goto_4
.line 73
:cond_6
:goto_2
sget-object v1, Lkotlin/jvm/internal/StringCompanionObject;->INSTANCE:Lkotlin/jvm/internal/StringCompanionObject;
sget-object v1, Ljava/util/Locale;->ROOT:Ljava/util/Locale;
const-string v2, "No tournament found"
const/4 v3, 0x2
new-array v4, v3, [Ljava/lang/Object;
invoke-virtual {p1}, Lorg/json/JSONArray;->length()I
move-result p1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
const/4 v5, 0x0
aput-object p1, v4, v5
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
aput-object p1, v4, v0
invoke-static {v4, v3}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object p1
invoke-static {v1, v2, p1}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
const-string v0, "java.lang.String.format(locale, format, *args)"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 74
new-instance v0, Lcom/facebook/gamingservices/GraphAPIException;
invoke-direct {v0, p1}, Lcom/facebook/gamingservices/GraphAPIException;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v0}, Lcom/facebook/bolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
return-void
.line 83
:goto_3
invoke-virtual {p0, p1}, Lcom/facebook/bolts/TaskCompletionSource;->setError(Ljava/lang/Exception;)V
:goto_4
return-void
.end method
# virtual methods
.method public final fetchTournaments()Lcom/facebook/bolts/TaskCompletionSource;
.locals 12
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/facebook/bolts/TaskCompletionSource<",
"Ljava/util/List<",
"Lcom/facebook/gamingservices/Tournament;",
">;>;"
}
.end annotation
.line 34
new-instance v0, Lcom/facebook/bolts/TaskCompletionSource;
invoke-direct {v0}, Lcom/facebook/bolts/TaskCompletionSource;-><init>()V
.line 35
new-instance v10, Landroid/os/Bundle;
invoke-direct {v10}, Landroid/os/Bundle;-><init>()V
.line 37
sget-object v1, Lcom/facebook/AccessToken;->Companion:Lcom/facebook/AccessToken$Companion;
invoke-virtual {v1}, Lcom/facebook/AccessToken$Companion;->getCurrentAccessToken()Lcom/facebook/AccessToken;
move-result-object v2
if-eqz v2, :cond_1
.line 38
invoke-virtual {v2}, Lcom/facebook/AccessToken;->isExpired()Z
move-result v3
if-nez v3, :cond_1
.line 42
invoke-virtual {v2}, Lcom/facebook/AccessToken;->getGraphDomain()Ljava/lang/String;
move-result-object v3
if-eqz v3, :cond_0
const-string v3, "gaming"
.line 43
invoke-virtual {v2}, Lcom/facebook/AccessToken;->getGraphDomain()Ljava/lang/String;
move-result-object v2
invoke-static {v3, v2}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 48
new-instance v11, Lcom/facebook/GraphRequest;
.line 49
invoke-virtual {v1}, Lcom/facebook/AccessToken$Companion;->getCurrentAccessToken()Lcom/facebook/AccessToken;
move-result-object v2
const-string v3, "me/tournaments"
.line 52
sget-object v5, Lcom/facebook/HttpMethod;->GET:Lcom/facebook/HttpMethod;
.line 53
new-instance v6, Lcom/facebook/gamingservices/TournamentFetcher$$ExternalSyntheticLambda0;
invoke-direct {v6, v0}, Lcom/facebook/gamingservices/TournamentFetcher$$ExternalSyntheticLambda0;-><init>(Lcom/facebook/bolts/TaskCompletionSource;)V
const/4 v7, 0x0
const/16 v8, 0x20
const/4 v9, 0x0
move-object v1, v11
move-object v4, v10
.line 48
invoke-direct/range {v1 .. v9}, Lcom/facebook/GraphRequest;-><init>(Lcom/facebook/AccessToken;Ljava/lang/String;Landroid/os/Bundle;Lcom/facebook/HttpMethod;Lcom/facebook/GraphRequest$Callback;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
.line 87
invoke-virtual {v11, v10}, Lcom/facebook/GraphRequest;->setParameters(Landroid/os/Bundle;)V
.line 88
invoke-virtual {v11}, Lcom/facebook/GraphRequest;->executeAsync()Lcom/facebook/GraphRequestAsyncTask;
return-object v0
.line 45
:cond_0
new-instance v0, Lcom/facebook/FacebookException;
const-string v1, "User is not using gaming login"
invoke-direct {v0, v1}, Lcom/facebook/FacebookException;-><init>(Ljava/lang/String;)V
throw v0
.line 39
:cond_1
new-instance v0, Lcom/facebook/FacebookException;
const-string v1, "Attempted to fetch tournament with an invalid access token"
invoke-direct {v0, v1}, Lcom/facebook/FacebookException;-><init>(Ljava/lang/String;)V
throw v0
.end method