- 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
541 lines
14 KiB
Smali
541 lines
14 KiB
Smali
.class public final Lokhttp3/internal/http2/Http2Stream$FramingSink;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Lokio/Sink;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lokhttp3/internal/http2/Http2Stream;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x11
|
|
name = "FramingSink"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public closed:Z
|
|
|
|
.field public finished:Z
|
|
|
|
.field public final sendBuffer: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;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 532
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 539
|
|
new-instance p1, Lokio/Buffer;
|
|
|
|
invoke-direct {p1}, Lokio/Buffer;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public close()V
|
|
.locals 8
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 606
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 607
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
goto/16 :goto_4
|
|
|
|
.line 608
|
|
:cond_0
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 609
|
|
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
|
|
|
|
iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
.line 613
|
|
invoke-virtual {v0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
cmp-long v0, v2, v4
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
move v0, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move v0, v2
|
|
|
|
:goto_0
|
|
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->trailers:Lokhttp3/Headers;
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
:goto_1
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
.line 616
|
|
invoke-virtual {v0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v6
|
|
|
|
cmp-long v0, v6, v4
|
|
|
|
if-lez v0, :cond_2
|
|
|
|
.line 617
|
|
invoke-virtual {p0, v2}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->emitFrame(Z)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 619
|
|
iget-object v2, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
iget v0, v0, Lokhttp3/internal/http2/Http2Stream;->id:I
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->trailers:Lokhttp3/Headers;
|
|
|
|
invoke-static {v3}, Lokhttp3/internal/Util;->toHeaderBlock(Lokhttp3/Headers;)Ljava/util/List;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v0, v1, v3}, Lokhttp3/internal/http2/Http2Connection;->writeHeaders(IZLjava/util/List;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
if-eqz v0, :cond_4
|
|
|
|
:goto_2
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
.line 621
|
|
invoke-virtual {v0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v2
|
|
|
|
cmp-long v0, v2, v4
|
|
|
|
if-lez v0, :cond_5
|
|
|
|
.line 622
|
|
invoke-virtual {p0, v1}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->emitFrame(Z)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 625
|
|
iget-object v2, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
iget v3, v0, Lokhttp3/internal/http2/Http2Stream;->id:I
|
|
|
|
const/4 v4, 0x1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
invoke-virtual/range {v2 .. v7}, Lokhttp3/internal/http2/Http2Connection;->writeData(IZLokio/Buffer;J)V
|
|
|
|
:cond_5
|
|
:goto_3
|
|
iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 628
|
|
monitor-enter v2
|
|
|
|
:try_start_1
|
|
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
|
|
|
|
.line 630
|
|
monitor-exit v2
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 631
|
|
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Connection;->flush()V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 632
|
|
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream;->cancelStreamIfNecessary()V
|
|
|
|
return-void
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
.line 630
|
|
:try_start_2
|
|
monitor-exit v2
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
throw v0
|
|
|
|
.line 608
|
|
:goto_4
|
|
:try_start_3
|
|
monitor-exit v0
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public final emitFrame(Z)V
|
|
.locals 11
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 565
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 566
|
|
iget-object v1, v1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
|
|
|
|
invoke-virtual {v1}, Lokio/AsyncTimeout;->enter()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_2
|
|
|
|
:goto_0
|
|
:try_start_1
|
|
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 568
|
|
iget-wide v2, v1, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
cmp-long v2, v2, v4
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
iget-boolean v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
iget-boolean v2, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
iget-object v2, v1, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
.line 569
|
|
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream;->waitForIo()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_4
|
|
|
|
.line 572
|
|
:cond_0
|
|
:try_start_2
|
|
iget-object v1, v1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 575
|
|
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream;->checkOutNotClosed()V
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 576
|
|
iget-wide v1, v1, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v3}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v9
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 577
|
|
iget-wide v2, v1, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
|
|
|
|
sub-long/2addr v2, v9
|
|
|
|
iput-wide v2, v1, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
|
|
|
|
.line 578
|
|
monitor-exit v0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
.line 580
|
|
iget-object v0, v1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
|
|
|
|
invoke-virtual {v0}, Lokio/AsyncTimeout;->enter()V
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
:try_start_3
|
|
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
.line 582
|
|
invoke-virtual {p1}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
cmp-long p1, v9, v0
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
:goto_1
|
|
move v7, p1
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:goto_2
|
|
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 583
|
|
iget-object v5, p1, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
iget v6, p1, Lokhttp3/internal/http2/Http2Stream;->id:I
|
|
|
|
iget-object v8, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
invoke-virtual/range {v5 .. v10}, Lokhttp3/internal/http2/Http2Connection;->writeData(IZLokio/Buffer;J)V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 585
|
|
iget-object p1, p1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
|
|
|
|
return-void
|
|
|
|
:goto_3
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
|
|
|
|
throw p1
|
|
|
|
:catchall_2
|
|
move-exception p1
|
|
|
|
goto :goto_5
|
|
|
|
:goto_4
|
|
:try_start_4
|
|
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 572
|
|
iget-object v1, v1, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
|
|
|
|
throw p1
|
|
|
|
.line 578
|
|
:goto_5
|
|
monitor-exit v0
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_2
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public flush()V
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 591
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 592
|
|
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream;->checkOutNotClosed()V
|
|
|
|
.line 593
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
.line 594
|
|
invoke-virtual {v0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v0, v0, v2
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 595
|
|
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->emitFrame(Z)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 596
|
|
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Connection;->flush()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 593
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public timeout()Lokio/Timeout;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->this$0:Lokhttp3/internal/http2/Http2Stream;
|
|
|
|
.line 601
|
|
iget-object v0, v0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public write(Lokio/Buffer;J)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
.line 553
|
|
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->write(Lokio/Buffer;J)V
|
|
|
|
:goto_0
|
|
iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->sendBuffer:Lokio/Buffer;
|
|
|
|
.line 554
|
|
invoke-virtual {p1}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide p1
|
|
|
|
const-wide/16 v0, 0x4000
|
|
|
|
cmp-long p1, p1, v0
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 555
|
|
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Http2Stream$FramingSink;->emitFrame(Z)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|