- 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
278 lines
7.6 KiB
Smali
278 lines
7.6 KiB
Smali
.class public Lcom/firemint/realracing/SerialiseNotificationsHelper;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field static final PATH:Ljava/lang/String; = "pastNotifications.bin"
|
|
|
|
.field static final TAG:Ljava/lang/String; = "RR3_NotificationsHelper"
|
|
|
|
.field static bLog:Z = false
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 12
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static AddNotification(Landroid/content/Context;Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 26
|
|
invoke-static {p0}, Lcom/firemint/realracing/SerialiseNotificationsHelper;->LoadInformation(Landroid/content/Context;)Lcom/firemint/realracing/SerialisedNotificationInfo;
|
|
|
|
move-result-object v0
|
|
|
|
.line 27
|
|
invoke-virtual {v0, p1}, Lcom/firemint/realracing/SerialisedNotificationInfo;->AddNotification(Ljava/lang/String;)V
|
|
|
|
.line 28
|
|
invoke-static {p0, v0}, Lcom/firemint/realracing/SerialiseNotificationsHelper;->SaveInformation(Landroid/content/Context;Lcom/firemint/realracing/SerialisedNotificationInfo;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static ClearAll(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
.line 33
|
|
invoke-static {p0}, Lcom/firemint/realracing/SerialiseNotificationsHelper;->LoadInformation(Landroid/content/Context;)Lcom/firemint/realracing/SerialisedNotificationInfo;
|
|
|
|
move-result-object v0
|
|
|
|
.line 34
|
|
invoke-virtual {v0}, Lcom/firemint/realracing/SerialisedNotificationInfo;->ClearAll()V
|
|
|
|
.line 35
|
|
invoke-static {p0, v0}, Lcom/firemint/realracing/SerialiseNotificationsHelper;->SaveInformation(Landroid/content/Context;Lcom/firemint/realracing/SerialisedNotificationInfo;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static GetSavedInfo(Landroid/content/Context;)Lcom/firemint/realracing/SerialisedNotificationInfo;
|
|
.locals 0
|
|
|
|
.line 90
|
|
invoke-static {p0}, Lcom/firemint/realracing/SerialiseNotificationsHelper;->LoadInformation(Landroid/content/Context;)Lcom/firemint/realracing/SerialisedNotificationInfo;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private static LoadInformation(Landroid/content/Context;)Lcom/firemint/realracing/SerialisedNotificationInfo;
|
|
.locals 3
|
|
|
|
const-string v0, "Attempting to load saved information"
|
|
|
|
.line 60
|
|
invoke-static {v0}, Lcom/firemint/realracing/SerialiseNotificationsHelper;->Log(Ljava/lang/String;)V
|
|
|
|
.line 61
|
|
new-instance v0, Lcom/firemint/realracing/SerialisedNotificationInfo;
|
|
|
|
invoke-direct {v0}, Lcom/firemint/realracing/SerialisedNotificationInfo;-><init>()V
|
|
|
|
.line 64
|
|
:try_start_0
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v2, "pastNotifications.bin"
|
|
|
|
invoke-direct {v1, p0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
.line 65
|
|
invoke-virtual {v1}, Ljava/io/File;->exists()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const-string p0, "Found saved file. Loading information"
|
|
|
|
.line 67
|
|
invoke-static {p0}, Lcom/firemint/realracing/SerialiseNotificationsHelper;->Log(Ljava/lang/String;)V
|
|
|
|
.line 68
|
|
new-instance p0, Ljava/io/FileInputStream;
|
|
|
|
invoke-direct {p0, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
.line 69
|
|
new-instance v1, Ljava/io/ObjectInputStream;
|
|
|
|
invoke-direct {v1, p0}, Ljava/io/ObjectInputStream;-><init>(Ljava/io/InputStream;)V
|
|
|
|
.line 70
|
|
invoke-virtual {v1}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/firemint/realracing/SerialisedNotificationInfo;
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
.line 71
|
|
:try_start_1
|
|
invoke-virtual {v1}, Ljava/io/ObjectInputStream;->close()V
|
|
|
|
.line 72
|
|
invoke-virtual {p0}, Ljava/io/FileInputStream;->close()V
|
|
:try_end_1
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
move-object v0, v2
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
move-object v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
:try_start_2
|
|
const-string p0, "Saved file doesn\'t exist. Returning new file"
|
|
|
|
.line 76
|
|
invoke-static {p0}, Lcom/firemint/realracing/SerialiseNotificationsHelper;->Log(Ljava/lang/String;)V
|
|
:try_end_2
|
|
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1
|
|
|
|
goto :goto_1
|
|
|
|
.line 81
|
|
:goto_0
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Caught exception: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v1, "RealRacing3"
|
|
|
|
invoke-static {v1, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:goto_1
|
|
const-string p0, "Loaded Information"
|
|
|
|
.line 84
|
|
invoke-virtual {v0, p0}, Lcom/firemint/realracing/SerialisedNotificationInfo;->Print(Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static Log(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static SaveInformation(Landroid/content/Context;Lcom/firemint/realracing/SerialisedNotificationInfo;)V
|
|
.locals 2
|
|
|
|
.line 43
|
|
:try_start_0
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v1, "pastNotifications.bin"
|
|
|
|
invoke-direct {v0, p0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
.line 44
|
|
new-instance p0, Ljava/io/FileOutputStream;
|
|
|
|
invoke-direct {p0, v0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
|
|
|
|
.line 45
|
|
new-instance v0, Ljava/io/ObjectOutputStream;
|
|
|
|
invoke-direct {v0, p0}, Ljava/io/ObjectOutputStream;-><init>(Ljava/io/OutputStream;)V
|
|
|
|
.line 46
|
|
invoke-virtual {v0, p1}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V
|
|
|
|
.line 47
|
|
invoke-virtual {v0}, Ljava/io/ObjectOutputStream;->close()V
|
|
|
|
.line 48
|
|
invoke-virtual {p0}, Ljava/io/FileOutputStream;->close()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 52
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Caught exception: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "RealRacing3"
|
|
|
|
invoke-static {v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:goto_0
|
|
const-string p0, "Saved Information"
|
|
|
|
.line 55
|
|
invoke-virtual {p1, p0}, Lcom/firemint/realracing/SerialisedNotificationInfo;->Print(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|