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
This commit is contained in:
2026-02-18 16:13:44 -08:00
parent c080f0d97f
commit f3960ee359
44288 changed files with 10998761 additions and 0 deletions

View File

@@ -0,0 +1,131 @@
.class final Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field private final fileChannel:Ljava/nio/channels/FileChannel;
# direct methods
.method public constructor <init>(Ljava/nio/channels/FileChannel;)V
.locals 0
.line 39
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->fileChannel:Ljava/nio/channels/FileChannel;
return-void
.end method
# virtual methods
.method public read(JLcom/mbridge/msdk/thrid/okio/Buffer;J)V
.locals 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-wide/16 v0, 0x0
cmp-long v2, p4, v0
if-ltz v2, :cond_1
:goto_0
cmp-long v2, p4, v0
if-lez v2, :cond_0
iget-object v3, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->fileChannel:Ljava/nio/channels/FileChannel;
move-wide v4, p1
move-wide v6, p4
move-object v8, p3
.line 63
invoke-virtual/range {v3 .. v8}, Ljava/nio/channels/FileChannel;->transferTo(JJLjava/nio/channels/WritableByteChannel;)J
move-result-wide v2
add-long/2addr p1, v2
sub-long/2addr p4, v2
goto :goto_0
:cond_0
return-void
.line 60
:cond_1
new-instance p1, Ljava/lang/IndexOutOfBoundsException;
invoke-direct {p1}, Ljava/lang/IndexOutOfBoundsException;-><init>()V
throw p1
.end method
.method public write(JLcom/mbridge/msdk/thrid/okio/Buffer;J)V
.locals 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-wide/16 v0, 0x0
cmp-long v2, p4, v0
if-ltz v2, :cond_1
.line 45
invoke-virtual {p3}, Lcom/mbridge/msdk/thrid/okio/Buffer;->size()J
move-result-wide v2
cmp-long v2, p4, v2
if-gtz v2, :cond_1
:goto_0
cmp-long v2, p4, v0
if-lez v2, :cond_0
iget-object v3, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->fileChannel:Ljava/nio/channels/FileChannel;
move-object v4, p3
move-wide v5, p1
move-wide v7, p4
.line 48
invoke-virtual/range {v3 .. v8}, Ljava/nio/channels/FileChannel;->transferFrom(Ljava/nio/channels/ReadableByteChannel;JJ)J
move-result-wide v2
add-long/2addr p1, v2
sub-long/2addr p4, v2
goto :goto_0
:cond_0
return-void
.line 45
:cond_1
new-instance p1, Ljava/lang/IndexOutOfBoundsException;
invoke-direct {p1}, Ljava/lang/IndexOutOfBoundsException;-><init>()V
throw p1
.end method

View File

@@ -0,0 +1,577 @@
.class Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/mbridge/msdk/thrid/okio/Source;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "RelaySource"
.end annotation
# instance fields
.field private fileOperator:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
.field private sourcePos:J
.field final synthetic this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.field private final timeout:Lcom/mbridge/msdk/thrid/okio/Timeout;
# direct methods
.method public constructor <init>(Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;)V
.locals 1
iput-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 224
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 225
new-instance v0, Lcom/mbridge/msdk/thrid/okio/Timeout;
invoke-direct {v0}, Lcom/mbridge/msdk/thrid/okio/Timeout;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->timeout:Lcom/mbridge/msdk/thrid/okio/Timeout;
.line 228
new-instance v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
iget-object p1, p1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
invoke-virtual {p1}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object p1
invoke-direct {v0, p1}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;-><init>(Ljava/nio/channels/FileChannel;)V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->fileOperator:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
return-void
.end method
# virtual methods
.method public close()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->fileOperator:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
if-nez v0, :cond_0
return-void
:cond_0
const/4 v0, 0x0
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->fileOperator:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 348
monitor-enter v1
:try_start_0
iget-object v2, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 349
iget v3, v2, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->sourceCount:I
add-int/lit8 v3, v3, -0x1
iput v3, v2, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->sourceCount:I
if-nez v3, :cond_1
.line 351
iget-object v3, v2, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
.line 352
iput-object v0, v2, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
move-object v0, v3
goto :goto_0
:catchall_0
move-exception v0
goto :goto_1
.line 354
:cond_1
:goto_0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_2
.line 357
invoke-static {v0}, Lcom/mbridge/msdk/thrid/okhttp/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
:cond_2
return-void
.line 354
:goto_1
:try_start_1
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public read(Lcom/mbridge/msdk/thrid/okio/Buffer;J)J
.locals 21
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
move-object/from16 v1, p0
move-wide/from16 v2, p2
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->fileOperator:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
if-eqz v0, :cond_6
iget-object v4, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 258
monitor-enter v4
:goto_0
:try_start_0
iget-wide v5, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 260
iget-wide v7, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamPos:J
cmp-long v5, v5, v7
const-wide/16 v9, 0x20
if-nez v5, :cond_4
.line 262
iget-boolean v5, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->complete:Z
const-wide/16 v11, -0x1
if-eqz v5, :cond_0
monitor-exit v4
return-wide v11
:catchall_0
move-exception v0
goto/16 :goto_4
.line 265
:cond_0
iget-object v5, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamReader:Ljava/lang/Thread;
if-eqz v5, :cond_1
iget-object v5, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->timeout:Lcom/mbridge/msdk/thrid/okio/Timeout;
.line 266
invoke-virtual {v5, v0}, Lcom/mbridge/msdk/thrid/okio/Timeout;->waitUntilNotified(Ljava/lang/Object;)V
goto :goto_0
.line 271
:cond_1
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v5
iput-object v5, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamReader:Ljava/lang/Thread;
.line 273
monitor-exit v4
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v4, 0x0
:try_start_1
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 302
iget-object v5, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstream:Lcom/mbridge/msdk/thrid/okio/Source;
iget-object v6, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamBuffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
iget-wide v13, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->bufferMaxSize:J
invoke-interface {v5, v6, v13, v14}, Lcom/mbridge/msdk/thrid/okio/Source;->read(Lcom/mbridge/msdk/thrid/okio/Buffer;J)J
move-result-wide v5
cmp-long v0, v5, v11
if-nez v0, :cond_2
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 306
invoke-virtual {v0, v7, v8}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->commit(J)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_2
iget-object v2, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 332
monitor-enter v2
:try_start_2
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 333
iput-object v4, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamReader:Ljava/lang/Thread;
.line 334
invoke-virtual {v0}, Ljava/lang/Object;->notifyAll()V
.line 335
monitor-exit v2
return-wide v11
:catchall_1
move-exception v0
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
throw v0
:catchall_2
move-exception v0
goto :goto_3
.line 311
:cond_2
:try_start_3
invoke-static {v5, v6, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide v2
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 312
iget-object v11, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamBuffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
const-wide/16 v13, 0x0
move-object/from16 v12, p1
move-wide v15, v2
invoke-virtual/range {v11 .. v16}, Lcom/mbridge/msdk/thrid/okio/Buffer;->copyTo(Lcom/mbridge/msdk/thrid/okio/Buffer;JJ)Lcom/mbridge/msdk/thrid/okio/Buffer;
iget-wide v11, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
add-long/2addr v11, v2
iput-wide v11, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
iget-object v15, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->fileOperator:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
add-long v16, v7, v9
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 316
iget-object v0, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamBuffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
.line 317
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;->clone()Lcom/mbridge/msdk/thrid/okio/Buffer;
move-result-object v18
move-wide/from16 v19, v5
.line 316
invoke-virtual/range {v15 .. v20}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->write(JLcom/mbridge/msdk/thrid/okio/Buffer;J)V
iget-object v7, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 319
monitor-enter v7
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_2
:try_start_4
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 321
iget-object v8, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->buffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
iget-object v0, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamBuffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-virtual {v8, v0, v5, v6}, Lcom/mbridge/msdk/thrid/okio/Buffer;->write(Lcom/mbridge/msdk/thrid/okio/Buffer;J)V
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 322
iget-object v0, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->buffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;->size()J
move-result-wide v8
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
iget-wide v10, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->bufferMaxSize:J
cmp-long v8, v8, v10
if-lez v8, :cond_3
.line 323
iget-object v0, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->buffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;->size()J
move-result-wide v8
iget-object v10, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
iget-wide v10, v10, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->bufferMaxSize:J
sub-long/2addr v8, v10
invoke-virtual {v0, v8, v9}, Lcom/mbridge/msdk/thrid/okio/Buffer;->skip(J)V
goto :goto_1
:catchall_3
move-exception v0
goto :goto_2
:cond_3
:goto_1
iget-object v8, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 327
iget-wide v9, v8, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamPos:J
add-long/2addr v9, v5
iput-wide v9, v8, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamPos:J
.line 328
monitor-exit v7
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_3
.line 332
monitor-enter v8
:try_start_5
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 333
iput-object v4, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamReader:Ljava/lang/Thread;
.line 334
invoke-virtual {v0}, Ljava/lang/Object;->notifyAll()V
.line 335
monitor-exit v8
return-wide v2
:catchall_4
move-exception v0
monitor-exit v8
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_4
throw v0
.line 328
:goto_2
:try_start_6
monitor-exit v7
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_3
:try_start_7
throw v0
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_2
:goto_3
iget-object v2, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 332
monitor-enter v2
:try_start_8
iget-object v3, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 333
iput-object v4, v3, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamReader:Ljava/lang/Thread;
.line 334
invoke-virtual {v3}, Ljava/lang/Object;->notifyAll()V
.line 335
monitor-exit v2
:try_end_8
.catchall {:try_start_8 .. :try_end_8} :catchall_5
.line 336
throw v0
:catchall_5
move-exception v0
.line 335
:try_start_9
monitor-exit v2
:try_end_9
.catchall {:try_start_9 .. :try_end_9} :catchall_5
throw v0
.line 276
:cond_4
:try_start_a
iget-object v0, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->buffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;->size()J
move-result-wide v5
sub-long v5, v7, v5
iget-wide v11, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
cmp-long v0, v11, v5
if-gez v0, :cond_5
.line 281
monitor-exit v4
:try_end_a
.catchall {:try_start_a .. :try_end_a} :catchall_0
sub-long/2addr v7, v11
.line 293
invoke-static {v2, v3, v7, v8}, Ljava/lang/Math;->min(JJ)J
move-result-wide v2
iget-object v11, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->fileOperator:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
iget-wide v4, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
add-long v12, v4, v9
move-object/from16 v14, p1
move-wide v15, v2
.line 294
invoke-virtual/range {v11 .. v16}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->read(JLcom/mbridge/msdk/thrid/okio/Buffer;J)V
iget-wide v4, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
add-long/2addr v4, v2
iput-wide v4, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
return-wide v2
:cond_5
sub-long/2addr v7, v11
.line 285
:try_start_b
invoke-static {v2, v3, v7, v8}, Ljava/lang/Math;->min(JJ)J
move-result-wide v2
iget-object v0, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->this$0:Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.line 286
iget-object v9, v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->buffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
iget-wide v7, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
sub-long v11, v7, v5
move-object/from16 v10, p1
move-wide v13, v2
invoke-virtual/range {v9 .. v14}, Lcom/mbridge/msdk/thrid/okio/Buffer;->copyTo(Lcom/mbridge/msdk/thrid/okio/Buffer;JJ)Lcom/mbridge/msdk/thrid/okio/Buffer;
iget-wide v5, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
add-long/2addr v5, v2
iput-wide v5, v1, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->sourcePos:J
.line 288
monitor-exit v4
return-wide v2
.line 289
:goto_4
monitor-exit v4
:try_end_b
.catchall {:try_start_b .. :try_end_b} :catchall_0
throw v0
.line 252
:cond_6
new-instance v0, Ljava/lang/IllegalStateException;
const-string v2, "closed"
invoke-direct {v0, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public timeout()Lcom/mbridge/msdk/thrid/okio/Timeout;
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;->timeout:Lcom/mbridge/msdk/thrid/okio/Timeout;
return-object v0
.end method

View File

@@ -0,0 +1,557 @@
.class final Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;
}
.end annotation
# static fields
.field private static final FILE_HEADER_SIZE:J = 0x20L
.field static final PREFIX_CLEAN:Lcom/mbridge/msdk/thrid/okio/ByteString;
.field static final PREFIX_DIRTY:Lcom/mbridge/msdk/thrid/okio/ByteString;
.field private static final SOURCE_FILE:I = 0x2
.field private static final SOURCE_UPSTREAM:I = 0x1
# instance fields
.field final buffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
.field final bufferMaxSize:J
.field complete:Z
.field file:Ljava/io/RandomAccessFile;
.field private final metadata:Lcom/mbridge/msdk/thrid/okio/ByteString;
.field sourceCount:I
.field upstream:Lcom/mbridge/msdk/thrid/okio/Source;
.field final upstreamBuffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
.field upstreamPos:J
.field upstreamReader:Ljava/lang/Thread;
# direct methods
.method static constructor <clinit>()V
.locals 1
const-string v0, "OkHttp cache v1\n"
.line 45
invoke-static {v0}, Lcom/mbridge/msdk/thrid/okio/ByteString;->encodeUtf8(Ljava/lang/String;)Lcom/mbridge/msdk/thrid/okio/ByteString;
move-result-object v0
sput-object v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->PREFIX_CLEAN:Lcom/mbridge/msdk/thrid/okio/ByteString;
const-string v0, "OkHttp DIRTY :(\n"
.line 46
invoke-static {v0}, Lcom/mbridge/msdk/thrid/okio/ByteString;->encodeUtf8(Ljava/lang/String;)Lcom/mbridge/msdk/thrid/okio/ByteString;
move-result-object v0
sput-object v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->PREFIX_DIRTY:Lcom/mbridge/msdk/thrid/okio/ByteString;
return-void
.end method
.method private constructor <init>(Ljava/io/RandomAccessFile;Lcom/mbridge/msdk/thrid/okio/Source;JLcom/mbridge/msdk/thrid/okio/ByteString;J)V
.locals 1
.line 107
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 79
new-instance v0, Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-direct {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamBuffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
.line 94
new-instance v0, Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-direct {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;-><init>()V
iput-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->buffer:Lcom/mbridge/msdk/thrid/okio/Buffer;
iput-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
iput-object p2, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstream:Lcom/mbridge/msdk/thrid/okio/Source;
if-nez p2, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
iput-boolean p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->complete:Z
iput-wide p3, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstreamPos:J
iput-object p5, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->metadata:Lcom/mbridge/msdk/thrid/okio/ByteString;
iput-wide p6, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->bufferMaxSize:J
return-void
.end method
.method public static edit(Ljava/io/File;Lcom/mbridge/msdk/thrid/okio/Source;Lcom/mbridge/msdk/thrid/okio/ByteString;J)Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.locals 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 126
new-instance v8, Ljava/io/RandomAccessFile;
const-string v0, "rw"
invoke-direct {v8, p0, v0}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 127
new-instance p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
const-wide/16 v3, 0x0
move-object v0, p0
move-object v1, v8
move-object v2, p1
move-object v5, p2
move-wide v6, p3
invoke-direct/range {v0 .. v7}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;-><init>(Ljava/io/RandomAccessFile;Lcom/mbridge/msdk/thrid/okio/Source;JLcom/mbridge/msdk/thrid/okio/ByteString;J)V
const-wide/16 p1, 0x0
.line 130
invoke-virtual {v8, p1, p2}, Ljava/io/RandomAccessFile;->setLength(J)V
sget-object v2, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->PREFIX_DIRTY:Lcom/mbridge/msdk/thrid/okio/ByteString;
const-wide/16 v3, -0x1
const-wide/16 v5, -0x1
move-object v1, p0
.line 131
invoke-direct/range {v1 .. v6}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->writeHeader(Lcom/mbridge/msdk/thrid/okio/ByteString;JJ)V
return-object p0
.end method
.method public static read(Ljava/io/File;)Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
.locals 10
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 144
new-instance v1, Ljava/io/RandomAccessFile;
const-string v0, "rw"
invoke-direct {v1, p0, v0}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 145
new-instance p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
invoke-virtual {v1}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object v0
invoke-direct {p0, v0}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;-><init>(Ljava/nio/channels/FileChannel;)V
.line 148
new-instance v0, Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-direct {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;-><init>()V
const-wide/16 v3, 0x0
const-wide/16 v6, 0x20
move-object v2, p0
move-object v5, v0
.line 149
invoke-virtual/range {v2 .. v7}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->read(JLcom/mbridge/msdk/thrid/okio/Buffer;J)V
sget-object v2, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->PREFIX_CLEAN:Lcom/mbridge/msdk/thrid/okio/ByteString;
.line 150
invoke-virtual {v2}, Lcom/mbridge/msdk/thrid/okio/ByteString;->size()I
move-result v3
int-to-long v3, v3
invoke-virtual {v0, v3, v4}, Lcom/mbridge/msdk/thrid/okio/Buffer;->readByteString(J)Lcom/mbridge/msdk/thrid/okio/ByteString;
move-result-object v3
.line 151
invoke-virtual {v3, v2}, Lcom/mbridge/msdk/thrid/okio/ByteString;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 152
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;->readLong()J
move-result-wide v8
.line 153
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;->readLong()J
move-result-wide v6
.line 156
new-instance v0, Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-direct {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;-><init>()V
const-wide/16 v2, 0x20
add-long v3, v8, v2
move-object v2, p0
move-object v5, v0
.line 157
invoke-virtual/range {v2 .. v7}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->read(JLcom/mbridge/msdk/thrid/okio/Buffer;J)V
.line 158
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;->readByteString()Lcom/mbridge/msdk/thrid/okio/ByteString;
move-result-object v5
.line 161
new-instance p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;
const/4 v2, 0x0
const-wide/16 v6, 0x0
move-object v0, p0
move-wide v3, v8
invoke-direct/range {v0 .. v7}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;-><init>(Ljava/io/RandomAccessFile;Lcom/mbridge/msdk/thrid/okio/Source;JLcom/mbridge/msdk/thrid/okio/ByteString;J)V
return-object p0
.line 151
:cond_0
new-instance p0, Ljava/io/IOException;
const-string v0, "unreadable cache file"
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private writeHeader(Lcom/mbridge/msdk/thrid/okio/ByteString;JJ)V
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 166
new-instance v3, Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-direct {v3}, Lcom/mbridge/msdk/thrid/okio/Buffer;-><init>()V
.line 167
invoke-virtual {v3, p1}, Lcom/mbridge/msdk/thrid/okio/Buffer;->write(Lcom/mbridge/msdk/thrid/okio/ByteString;)Lcom/mbridge/msdk/thrid/okio/Buffer;
.line 168
invoke-virtual {v3, p2, p3}, Lcom/mbridge/msdk/thrid/okio/Buffer;->writeLong(J)Lcom/mbridge/msdk/thrid/okio/Buffer;
.line 169
invoke-virtual {v3, p4, p5}, Lcom/mbridge/msdk/thrid/okio/Buffer;->writeLong(J)Lcom/mbridge/msdk/thrid/okio/Buffer;
.line 170
invoke-virtual {v3}, Lcom/mbridge/msdk/thrid/okio/Buffer;->size()J
move-result-wide p1
const-wide/16 p3, 0x20
cmp-long p1, p1, p3
if-nez p1, :cond_0
.line 172
new-instance v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
iget-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
invoke-virtual {p1}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object p1
invoke-direct {v0, p1}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;-><init>(Ljava/nio/channels/FileChannel;)V
const-wide/16 v1, 0x0
const-wide/16 v4, 0x20
.line 173
invoke-virtual/range {v0 .. v5}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->write(JLcom/mbridge/msdk/thrid/okio/Buffer;J)V
return-void
.line 170
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-direct {p1}, Ljava/lang/IllegalArgumentException;-><init>()V
throw p1
.end method
.method private writeMetadata(J)V
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 177
new-instance v3, Lcom/mbridge/msdk/thrid/okio/Buffer;
invoke-direct {v3}, Lcom/mbridge/msdk/thrid/okio/Buffer;-><init>()V
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->metadata:Lcom/mbridge/msdk/thrid/okio/ByteString;
.line 178
invoke-virtual {v3, v0}, Lcom/mbridge/msdk/thrid/okio/Buffer;->write(Lcom/mbridge/msdk/thrid/okio/ByteString;)Lcom/mbridge/msdk/thrid/okio/Buffer;
.line 180
new-instance v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
invoke-virtual {v1}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object v1
invoke-direct {v0, v1}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;-><init>(Ljava/nio/channels/FileChannel;)V
const-wide/16 v1, 0x20
add-long/2addr v1, p1
iget-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->metadata:Lcom/mbridge/msdk/thrid/okio/ByteString;
.line 181
invoke-virtual {p1}, Lcom/mbridge/msdk/thrid/okio/ByteString;->size()I
move-result p1
int-to-long v4, p1
invoke-virtual/range {v0 .. v5}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/FileOperator;->write(JLcom/mbridge/msdk/thrid/okio/Buffer;J)V
return-void
.end method
# virtual methods
.method public commit(J)V
.locals 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 186
invoke-direct {p0, p1, p2}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->writeMetadata(J)V
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
.line 187
invoke-virtual {v0}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Ljava/nio/channels/FileChannel;->force(Z)V
sget-object v3, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->PREFIX_CLEAN:Lcom/mbridge/msdk/thrid/okio/ByteString;
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->metadata:Lcom/mbridge/msdk/thrid/okio/ByteString;
.line 190
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/ByteString;->size()I
move-result v0
int-to-long v6, v0
move-object v2, p0
move-wide v4, p1
invoke-direct/range {v2 .. v7}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->writeHeader(Lcom/mbridge/msdk/thrid/okio/ByteString;JJ)V
iget-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
.line 191
invoke-virtual {p1}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object p1
invoke-virtual {p1, v1}, Ljava/nio/channels/FileChannel;->force(Z)V
.line 194
monitor-enter p0
const/4 p1, 0x1
:try_start_0
iput-boolean p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->complete:Z
.line 196
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstream:Lcom/mbridge/msdk/thrid/okio/Source;
.line 198
invoke-static {p1}, Lcom/mbridge/msdk/thrid/okhttp/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
const/4 p1, 0x0
iput-object p1, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->upstream:Lcom/mbridge/msdk/thrid/okio/Source;
return-void
:catchall_0
move-exception p1
.line 196
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public isClosed()Z
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public metadata()Lcom/mbridge/msdk/thrid/okio/ByteString;
.locals 1
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->metadata:Lcom/mbridge/msdk/thrid/okio/ByteString;
return-object v0
.end method
.method public newSource()Lcom/mbridge/msdk/thrid/okio/Source;
.locals 1
.line 216
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->file:Ljava/io/RandomAccessFile;
if-nez v0, :cond_0
.line 217
monitor-exit p0
const/4 v0, 0x0
return-object v0
:catchall_0
move-exception v0
goto :goto_0
:cond_0
iget v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->sourceCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;->sourceCount:I
.line 219
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 221
new-instance v0, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;
invoke-direct {v0, p0}, Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay$RelaySource;-><init>(Lcom/mbridge/msdk/thrid/okhttp/internal/cache2/Relay;)V
return-object v0
.line 219
:goto_0
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method