Files
rr3-apk/smali_classes5/okhttp3/internal/http2/Http2Stream$FramingSource.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

625 lines
16 KiB
Smali

.class public final Lokhttp3/internal/http2/Http2Stream$FramingSource;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokio/Source;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Stream;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "FramingSource"
.end annotation
# instance fields
.field public closed:Z
.field public finished:Z
.field public final maxByteCount:J
.field public final readBuffer:Lokio/Buffer;
.field public final receiveBuffer:Lokio/Buffer;
.field public final synthetic this$0:Lokhttp3/internal/http2/Http2Stream;
.field public trailers:Lokhttp3/Headers;
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>(Lokhttp3/internal/http2/Http2Stream;J)V
.locals 0
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 364
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 341
new-instance p1, Lokio/Buffer;
invoke-direct {p1}, Lokio/Buffer;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 344
new-instance p1, Lokio/Buffer;
invoke-direct {p1}, Lokio/Buffer;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
iput-wide p2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->maxByteCount:J
return-void
.end method
.method public static synthetic access$202(Lokhttp3/internal/http2/Http2Stream$FramingSource;Lokhttp3/Headers;)Lokhttp3/Headers;
.locals 0
.line 339
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->trailers:Lokhttp3/Headers;
return-object p1
.end method
# virtual methods
.method public close()V
.locals 5
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 499
monitor-enter v0
const/4 v1, 0x1
:try_start_0
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 501
invoke-virtual {v1}, Lokio/Buffer;->size()J
move-result-wide v1
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 502
invoke-virtual {v3}, Lokio/Buffer;->clear()V
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 503
invoke-virtual {v3}, Ljava/lang/Object;->notifyAll()V
.line 504
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-wide/16 v3, 0x0
cmp-long v0, v1, v3
if-lez v0, :cond_0
.line 506
invoke-virtual {p0, v1, v2}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->updateConnectionFlowControl(J)V
:cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 508
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream;->cancelStreamIfNecessary()V
return-void
:catchall_0
move-exception v1
.line 504
:try_start_1
monitor-exit v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v1
.end method
.method public read(Lokio/Buffer;J)J
.locals 11
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-ltz v2, :cond_8
:goto_0
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 377
monitor-enter v2
:try_start_0
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 378
iget-object v3, v3, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v3}, Lokio/AsyncTimeout;->enter()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 380
iget-object v4, v3, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-eqz v4, :cond_1
.line 382
iget-object v3, v3, Lokhttp3/internal/http2/Http2Stream;->errorException:Ljava/io/IOException;
if-eqz v3, :cond_0
goto :goto_1
.line 384
:cond_0
new-instance v3, Lokhttp3/internal/http2/StreamResetException;
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
iget-object v4, v4, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
invoke-direct {v3, v4}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V
goto :goto_1
:catchall_0
move-exception p1
goto/16 :goto_3
:cond_1
const/4 v3, 0x0
:goto_1
iget-boolean v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
if-nez v4, :cond_7
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 390
invoke-virtual {v4}, Lokio/Buffer;->size()J
move-result-wide v4
cmp-long v4, v4, v0
const-wide/16 v5, -0x1
if-lez v4, :cond_2
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 392
invoke-virtual {v4}, Lokio/Buffer;->size()J
move-result-wide v7
invoke-static {p2, p3, v7, v8}, Ljava/lang/Math;->min(JJ)J
move-result-wide p2
invoke-virtual {v4, p1, p2, p3}, Lokio/Buffer;->read(Lokio/Buffer;J)J
move-result-wide p1
iget-object p3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 393
iget-wide v7, p3, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
add-long/2addr v7, p1
iput-wide v7, p3, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
if-nez v3, :cond_4
.line 395
iget-object p3, p3, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget-object p3, p3, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
.line 397
invoke-virtual {p3}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result p3
div-int/lit8 p3, p3, 0x2
int-to-long v9, p3
cmp-long p3, v7, v9
if-ltz p3, :cond_4
iget-object p3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 400
iget-object v4, p3, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
iget v7, p3, Lokhttp3/internal/http2/Http2Stream;->id:I
iget-wide v8, p3, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
invoke-virtual {v4, v7, v8, v9}, Lokhttp3/internal/http2/Http2Connection;->writeWindowUpdateLater(IJ)V
iget-object p3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 401
iput-wide v0, p3, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
goto :goto_2
:cond_2
iget-boolean v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
if-nez v4, :cond_3
if-nez v3, :cond_3
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 405
invoke-virtual {v3}, Lokhttp3/internal/http2/Http2Stream;->waitForIo()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 409
iget-object v3, v3, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {v3}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
monitor-exit v2
goto :goto_0
:catchall_1
move-exception p1
goto :goto_4
:cond_3
move-wide p1, v5
:cond_4
:goto_2
iget-object p3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
iget-object p3, p3, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {p3}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
.line 411
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
cmp-long p3, p1, v5
if-eqz p3, :cond_5
.line 417
invoke-virtual {p0, p1, p2}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->updateConnectionFlowControl(J)V
return-wide p1
:cond_5
if-nez v3, :cond_6
return-wide v5
.line 426
:cond_6
throw v3
.line 388
:cond_7
:try_start_3
new-instance p1, Ljava/io/IOException;
const-string p2, "stream closed"
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:goto_3
:try_start_4
iget-object p2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 409
iget-object p2, p2, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
invoke-virtual {p2}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
throw p1
.line 411
:goto_4
monitor-exit v2
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
throw p1
.line 369
:cond_8
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "byteCount < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public receive(Lokio/BufferedSource;J)V
.locals 9
:cond_0
:goto_0
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-lez v2, :cond_8
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 448
monitor-enter v2
:try_start_0
iget-boolean v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 450
invoke-virtual {v4}, Lokio/Buffer;->size()J
move-result-wide v4
add-long/2addr v4, p2
iget-wide v6, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->maxByteCount:J
cmp-long v4, v4, v6
const/4 v5, 0x0
const/4 v6, 0x1
if-lez v4, :cond_1
move v4, v6
goto :goto_1
:cond_1
move v4, v5
.line 451
:goto_1
monitor-exit v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-eqz v4, :cond_2
.line 455
invoke-interface {p1, p2, p3}, Lokio/BufferedSource;->skip(J)V
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 456
sget-object p2, Lokhttp3/internal/http2/ErrorCode;->FLOW_CONTROL_ERROR:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p1, p2}, Lokhttp3/internal/http2/Http2Stream;->closeLater(Lokhttp3/internal/http2/ErrorCode;)V
return-void
:cond_2
if-eqz v3, :cond_3
.line 462
invoke-interface {p1, p2, p3}, Lokio/BufferedSource;->skip(J)V
return-void
:cond_3
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 467
invoke-interface {p1, v2, p2, p3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v2
const-wide/16 v7, -0x1
cmp-long v4, v2, v7
if-eqz v4, :cond_7
sub-long/2addr p2, v2
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 475
monitor-enter v2
:try_start_1
iget-boolean v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
if-eqz v3, :cond_4
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 477
invoke-virtual {v3}, Lokio/Buffer;->size()J
move-result-wide v3
iget-object v5, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 478
invoke-virtual {v5}, Lokio/Buffer;->clear()V
goto :goto_2
:catchall_0
move-exception p1
goto :goto_3
:cond_4
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
.line 480
invoke-virtual {v3}, Lokio/Buffer;->size()J
move-result-wide v3
cmp-long v3, v3, v0
if-nez v3, :cond_5
move v5, v6
:cond_5
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->readBuffer:Lokio/Buffer;
iget-object v4, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receiveBuffer:Lokio/Buffer;
.line 481
invoke-virtual {v3, v4}, Lokio/Buffer;->writeAll(Lokio/Source;)J
if-eqz v5, :cond_6
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 483
invoke-virtual {v3}, Ljava/lang/Object;->notifyAll()V
:cond_6
move-wide v3, v0
.line 486
:goto_2
monitor-exit v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
cmp-long v0, v3, v0
if-lez v0, :cond_0
.line 488
invoke-virtual {p0, v3, v4}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->updateConnectionFlowControl(J)V
goto :goto_0
.line 486
:goto_3
:try_start_2
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw p1
.line 468
:cond_7
new-instance p1, Ljava/io/EOFException;
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
throw p1
:catchall_1
move-exception p1
.line 451
:try_start_3
monitor-exit v2
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
throw p1
:cond_8
return-void
.end method
.method public timeout()Lokio/Timeout;
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 494
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
return-object v0
.end method
.method public final updateConnectionFlowControl(J)V
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->this$0:Lokhttp3/internal/http2/Http2Stream;
.line 435
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p1, p2}, Lokhttp3/internal/http2/Http2Connection;->updateConnectionFlowControl(J)V
return-void
.end method