- 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
394 lines
9.4 KiB
Smali
394 lines
9.4 KiB
Smali
.class public final Lcom/singular/sdk/internal/FixedSizePersistentQueue;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Lcom/singular/sdk/internal/Queue;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
|
|
# instance fields
|
|
.field public final MAX_SIZE:I
|
|
|
|
.field public final bytes:Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;
|
|
|
|
.field public final queueFile:Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-class v0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;
|
|
|
|
.line 34
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/singular/sdk/internal/SingularLog;->getLogger(Ljava/lang/String;)Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/singular/sdk/internal/QueueFile;I)V
|
|
.locals 1
|
|
|
|
.line 56
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 45
|
|
new-instance v0, Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;
|
|
|
|
invoke-direct {v0}, Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->bytes:Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;
|
|
|
|
iput-object p1, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->queueFile:Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
iput p2, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->MAX_SIZE:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static create(Landroid/content/Context;Ljava/lang/String;I)Lcom/singular/sdk/internal/FixedSizePersistentQueue;
|
|
.locals 2
|
|
|
|
.line 48
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
.line 49
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
sget-object p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->logger:Lcom/singular/sdk/internal/SingularLog;
|
|
|
|
.line 50
|
|
invoke-virtual {v0}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
filled-new-array {p1}, [Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "FYI - file %s already exists, will reuse."
|
|
|
|
invoke-virtual {p0, v1, p1}, Lcom/singular/sdk/internal/SingularLog;->debug(Ljava/lang/String;[Ljava/lang/Object;)I
|
|
|
|
.line 53
|
|
:cond_0
|
|
new-instance p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;
|
|
|
|
new-instance p1, Lcom/singular/sdk/internal/QueueFile$Builder;
|
|
|
|
invoke-direct {p1, v0}, Lcom/singular/sdk/internal/QueueFile$Builder;-><init>(Ljava/io/File;)V
|
|
|
|
invoke-virtual {p1}, Lcom/singular/sdk/internal/QueueFile$Builder;->build()Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/singular/sdk/internal/FixedSizePersistentQueue;-><init>(Lcom/singular/sdk/internal/QueueFile;I)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public declared-synchronized add(Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
.line 73
|
|
:try_start_0
|
|
invoke-static {p1}, Lcom/singular/sdk/internal/Utils;->isEmptyOrNull(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->queueFile:Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
.line 76
|
|
invoke-virtual {v0}, Lcom/singular/sdk/internal/QueueFile;->size()I
|
|
|
|
move-result v0
|
|
|
|
iget v1, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->MAX_SIZE:I
|
|
|
|
if-lt v0, v1, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->queueFile:Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 77
|
|
invoke-virtual {v0, v1}, Lcom/singular/sdk/internal/QueueFile;->remove(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->bytes:Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;
|
|
|
|
.line 81
|
|
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->reset()V
|
|
|
|
.line 83
|
|
new-instance v0, Ljava/io/OutputStreamWriter;
|
|
|
|
iget-object v1, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->bytes:Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;)V
|
|
|
|
.line 85
|
|
invoke-virtual {v0, p1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
|
|
|
|
.line 86
|
|
invoke-virtual {v0}, Ljava/io/Writer;->close()V
|
|
|
|
iget-object p1, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->queueFile:Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->bytes:Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;
|
|
|
|
.line 88
|
|
invoke-virtual {v0}, Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;->getArray()[B
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->bytes:Lcom/singular/sdk/internal/FixedSizePersistentQueue$DirectByteArrayOutputStream;
|
|
|
|
invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->size()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {p1, v0, v2, v1}, Lcom/singular/sdk/internal/QueueFile;->add([BII)V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 89
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized isEmpty()Z
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
.line 69
|
|
:try_start_0
|
|
invoke-virtual {p0}, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->size()I
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized peek()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->queueFile:Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
.line 92
|
|
invoke-virtual {v0}, Lcom/singular/sdk/internal/QueueFile;->peek()[B
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 93
|
|
monitor-exit p0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
|
|
.line 94
|
|
:cond_0
|
|
:try_start_1
|
|
new-instance v1, Ljava/lang/String;
|
|
|
|
const-string v2, "UTF-8"
|
|
|
|
invoke-direct {v1, v0, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object v1
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized remove()V
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 116
|
|
:try_start_0
|
|
invoke-virtual {p0, v0}, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->remove(I)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 117
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized remove(I)V
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
.line 120
|
|
:try_start_0
|
|
invoke-virtual {p0}, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-gt p1, v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->queueFile:Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
.line 121
|
|
invoke-virtual {v0, p1}, Lcom/singular/sdk/internal/QueueFile;->remove(I)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 123
|
|
:cond_0
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized size()I
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/singular/sdk/internal/FixedSizePersistentQueue;->queueFile:Lcom/singular/sdk/internal/QueueFile;
|
|
|
|
.line 62
|
|
invoke-virtual {v0}, Lcom/singular/sdk/internal/QueueFile;->size()I
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|