* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
750 lines
17 KiB
Smali
750 lines
17 KiB
Smali
.class final Lkotlin/io/encoding/EncodeOutputStream;
|
|
.super Ljava/io/OutputStream;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation runtime Lkotlin/Metadata;
|
|
d1 = {
|
|
"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0008\n\u0000\n\u0002\u0010\u0012\n\u0002\u0008\u0003\n\u0002\u0010\u0002\n\u0002\u0008\r\u0008\u0003\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u00a2\u0006\u0004\u0008\u0005\u0010\u0006J\u0010\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00020\nH\u0016J \u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0012\u001a\u00020\u000c2\u0006\u0010\u0013\u001a\u00020\n2\u0006\u0010\u0014\u001a\u00020\nH\u0016J\u0008\u0010\u0015\u001a\u00020\u0010H\u0016J\u0008\u0010\u0016\u001a\u00020\u0010H\u0016J \u0010\u0017\u001a\u00020\n2\u0006\u0010\u0012\u001a\u00020\u000c2\u0006\u0010\u0018\u001a\u00020\n2\u0006\u0010\u0019\u001a\u00020\nH\u0002J\u0008\u0010\u001a\u001a\u00020\u0010H\u0002J \u0010\u001b\u001a\u00020\n2\u0006\u0010\u0012\u001a\u00020\u000c2\u0006\u0010\u0018\u001a\u00020\n2\u0006\u0010\u0019\u001a\u00020\nH\u0002J\u0008\u0010\u001c\u001a\u00020\u0010H\u0002R\u000e\u0010\u0002\u001a\u00020\u0001X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0008X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\u000cX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u000cX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\nX\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u001d"
|
|
}
|
|
d2 = {
|
|
"Lkotlin/io/encoding/EncodeOutputStream;",
|
|
"Ljava/io/OutputStream;",
|
|
"output",
|
|
"base64",
|
|
"Lkotlin/io/encoding/Base64;",
|
|
"<init>",
|
|
"(Ljava/io/OutputStream;Lkotlin/io/encoding/Base64;)V",
|
|
"isClosed",
|
|
"",
|
|
"lineLength",
|
|
"",
|
|
"symbolBuffer",
|
|
"",
|
|
"byteBuffer",
|
|
"byteBufferLength",
|
|
"write",
|
|
"",
|
|
"b",
|
|
"source",
|
|
"offset",
|
|
"length",
|
|
"flush",
|
|
"close",
|
|
"copyIntoByteBuffer",
|
|
"startIndex",
|
|
"endIndex",
|
|
"encodeByteBufferIntoOutput",
|
|
"encodeIntoOutput",
|
|
"checkOpen",
|
|
"kotlin-stdlib"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x2,
|
|
0x2,
|
|
0x0
|
|
}
|
|
xi = 0x30
|
|
.end annotation
|
|
|
|
.annotation build Lkotlin/io/encoding/ExperimentalEncodingApi;
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final base64:Lkotlin/io/encoding/Base64;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final byteBuffer:[B
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private byteBufferLength:I
|
|
|
|
.field private isClosed:Z
|
|
|
|
.field private lineLength:I
|
|
|
|
.field private final output:Ljava/io/OutputStream;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final symbolBuffer:[B
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/io/OutputStream;Lkotlin/io/encoding/Base64;)V
|
|
.locals 1
|
|
.param p1 # Ljava/io/OutputStream;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Lkotlin/io/encoding/Base64;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
const-string v0, "output"
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
const-string v0, "base64"
|
|
|
|
.line 7
|
|
.line 8
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 9
|
|
.line 10
|
|
.line 11
|
|
invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V
|
|
|
|
.line 12
|
|
.line 13
|
|
.line 14
|
|
iput-object p1, p0, Lkotlin/io/encoding/EncodeOutputStream;->output:Ljava/io/OutputStream;
|
|
|
|
.line 15
|
|
.line 16
|
|
iput-object p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->base64:Lkotlin/io/encoding/Base64;
|
|
|
|
.line 17
|
|
.line 18
|
|
invoke-virtual {p2}, Lkotlin/io/encoding/Base64;->isMimeScheme$kotlin_stdlib()Z
|
|
|
|
.line 19
|
|
.line 20
|
|
.line 21
|
|
move-result p1
|
|
|
|
.line 22
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 23
|
|
.line 24
|
|
invoke-virtual {p2}, Lkotlin/io/encoding/Base64;->getMimeLineLength$kotlin_stdlib()I
|
|
|
|
.line 25
|
|
.line 26
|
|
.line 27
|
|
move-result p1
|
|
|
|
.line 28
|
|
goto :goto_0
|
|
|
|
.line 29
|
|
:cond_0
|
|
const/4 p1, -0x1
|
|
|
|
.line 30
|
|
:goto_0
|
|
iput p1, p0, Lkotlin/io/encoding/EncodeOutputStream;->lineLength:I
|
|
|
|
.line 31
|
|
.line 32
|
|
const/16 p1, 0x400
|
|
|
|
.line 33
|
|
.line 34
|
|
new-array p1, p1, [B
|
|
|
|
.line 35
|
|
.line 36
|
|
iput-object p1, p0, Lkotlin/io/encoding/EncodeOutputStream;->symbolBuffer:[B
|
|
|
|
.line 37
|
|
.line 38
|
|
const/4 p1, 0x3
|
|
|
|
.line 39
|
|
new-array p1, p1, [B
|
|
|
|
.line 40
|
|
.line 41
|
|
iput-object p1, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBuffer:[B
|
|
|
|
.line 42
|
|
.line 43
|
|
return-void
|
|
.end method
|
|
|
|
.method private final checkOpen()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->isClosed:Z
|
|
|
|
.line 2
|
|
.line 3
|
|
if-nez v0, :cond_0
|
|
|
|
.line 4
|
|
.line 5
|
|
return-void
|
|
|
|
.line 6
|
|
:cond_0
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
.line 7
|
|
.line 8
|
|
const-string v1, "The output stream is closed."
|
|
|
|
.line 9
|
|
.line 10
|
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 11
|
|
.line 12
|
|
.line 13
|
|
throw v0
|
|
.end method
|
|
|
|
.method private final copyIntoByteBuffer([BII)I
|
|
.locals 4
|
|
|
|
.line 1
|
|
iget v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
.line 2
|
|
.line 3
|
|
const/4 v1, 0x3
|
|
|
|
.line 4
|
|
rsub-int/lit8 v0, v0, 0x3
|
|
|
|
.line 5
|
|
.line 6
|
|
sub-int/2addr p3, p2
|
|
|
|
.line 7
|
|
invoke-static {v0, p3}, Ljava/lang/Math;->min(II)I
|
|
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
move-result p3
|
|
|
|
.line 11
|
|
iget-object v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBuffer:[B
|
|
|
|
.line 12
|
|
.line 13
|
|
iget v2, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
.line 14
|
|
.line 15
|
|
add-int v3, p2, p3
|
|
|
|
.line 16
|
|
.line 17
|
|
invoke-static {p1, v0, v2, p2, v3}, Lkotlin/collections/ArraysKt;->copyInto([B[BIII)[B
|
|
|
|
.line 18
|
|
.line 19
|
|
.line 20
|
|
iget p1, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
.line 21
|
|
.line 22
|
|
add-int/2addr p1, p3
|
|
|
|
.line 23
|
|
iput p1, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
.line 24
|
|
.line 25
|
|
if-ne p1, v1, :cond_0
|
|
|
|
.line 26
|
|
.line 27
|
|
invoke-direct {p0}, Lkotlin/io/encoding/EncodeOutputStream;->encodeByteBufferIntoOutput()V
|
|
|
|
.line 28
|
|
.line 29
|
|
.line 30
|
|
:cond_0
|
|
return p3
|
|
.end method
|
|
|
|
.method private final encodeByteBufferIntoOutput()V
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBuffer:[B
|
|
|
|
.line 2
|
|
.line 3
|
|
iget v1, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
.line 4
|
|
.line 5
|
|
const/4 v2, 0x0
|
|
|
|
.line 6
|
|
invoke-direct {p0, v0, v2, v1}, Lkotlin/io/encoding/EncodeOutputStream;->encodeIntoOutput([BII)I
|
|
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
move-result v0
|
|
|
|
.line 10
|
|
const/4 v1, 0x4
|
|
|
|
.line 11
|
|
if-ne v0, v1, :cond_0
|
|
|
|
.line 12
|
|
.line 13
|
|
iput v2, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
.line 14
|
|
.line 15
|
|
return-void
|
|
|
|
.line 16
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
.line 17
|
|
.line 18
|
|
const-string v1, "Check failed."
|
|
|
|
.line 19
|
|
.line 20
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 21
|
|
.line 22
|
|
.line 23
|
|
throw v0
|
|
.end method
|
|
|
|
.method private final encodeIntoOutput([BII)I
|
|
.locals 6
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->base64:Lkotlin/io/encoding/Base64;
|
|
|
|
.line 2
|
|
.line 3
|
|
iget-object v2, p0, Lkotlin/io/encoding/EncodeOutputStream;->symbolBuffer:[B
|
|
|
|
.line 4
|
|
.line 5
|
|
const/4 v3, 0x0
|
|
|
|
.line 6
|
|
move-object v1, p1
|
|
|
|
.line 7
|
|
move v4, p2
|
|
|
|
.line 8
|
|
move v5, p3
|
|
|
|
.line 9
|
|
invoke-virtual/range {v0 .. v5}, Lkotlin/io/encoding/Base64;->encodeIntoByteArray([B[BIII)I
|
|
|
|
.line 10
|
|
.line 11
|
|
.line 12
|
|
move-result p1
|
|
|
|
.line 13
|
|
iget p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->lineLength:I
|
|
|
|
.line 14
|
|
.line 15
|
|
if-nez p2, :cond_1
|
|
|
|
.line 16
|
|
.line 17
|
|
iget-object p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->output:Ljava/io/OutputStream;
|
|
|
|
.line 18
|
|
.line 19
|
|
sget-object p3, Lkotlin/io/encoding/Base64;->Default:Lkotlin/io/encoding/Base64$Default;
|
|
|
|
.line 20
|
|
.line 21
|
|
invoke-virtual {p3}, Lkotlin/io/encoding/Base64$Default;->getMimeLineSeparatorSymbols$kotlin_stdlib()[B
|
|
|
|
.line 22
|
|
.line 23
|
|
.line 24
|
|
move-result-object p3
|
|
|
|
.line 25
|
|
invoke-virtual {p2, p3}, Ljava/io/OutputStream;->write([B)V
|
|
|
|
.line 26
|
|
.line 27
|
|
.line 28
|
|
iget-object p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->base64:Lkotlin/io/encoding/Base64;
|
|
|
|
.line 29
|
|
.line 30
|
|
invoke-virtual {p2}, Lkotlin/io/encoding/Base64;->getMimeLineLength$kotlin_stdlib()I
|
|
|
|
.line 31
|
|
.line 32
|
|
.line 33
|
|
move-result p2
|
|
|
|
.line 34
|
|
iput p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->lineLength:I
|
|
|
|
.line 35
|
|
.line 36
|
|
iget-object p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->base64:Lkotlin/io/encoding/Base64;
|
|
|
|
.line 37
|
|
.line 38
|
|
invoke-virtual {p2}, Lkotlin/io/encoding/Base64;->getMimeLineLength$kotlin_stdlib()I
|
|
|
|
.line 39
|
|
.line 40
|
|
.line 41
|
|
move-result p2
|
|
|
|
.line 42
|
|
if-gt p1, p2, :cond_0
|
|
|
|
.line 43
|
|
.line 44
|
|
goto :goto_0
|
|
|
|
.line 45
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
.line 46
|
|
.line 47
|
|
const-string p2, "Check failed."
|
|
|
|
.line 48
|
|
.line 49
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 50
|
|
.line 51
|
|
.line 52
|
|
throw p1
|
|
|
|
.line 53
|
|
:cond_1
|
|
:goto_0
|
|
iget-object p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->output:Ljava/io/OutputStream;
|
|
|
|
.line 54
|
|
.line 55
|
|
iget-object p3, p0, Lkotlin/io/encoding/EncodeOutputStream;->symbolBuffer:[B
|
|
|
|
.line 56
|
|
.line 57
|
|
const/4 v0, 0x0
|
|
|
|
.line 58
|
|
invoke-virtual {p2, p3, v0, p1}, Ljava/io/OutputStream;->write([BII)V
|
|
|
|
.line 59
|
|
.line 60
|
|
.line 61
|
|
iget p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->lineLength:I
|
|
|
|
.line 62
|
|
.line 63
|
|
sub-int/2addr p2, p1
|
|
|
|
.line 64
|
|
iput p2, p0, Lkotlin/io/encoding/EncodeOutputStream;->lineLength:I
|
|
|
|
.line 65
|
|
.line 66
|
|
return p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public close()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->isClosed:Z
|
|
|
|
.line 2
|
|
.line 3
|
|
if-nez v0, :cond_1
|
|
|
|
.line 4
|
|
.line 5
|
|
const/4 v0, 0x1
|
|
|
|
.line 6
|
|
iput-boolean v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->isClosed:Z
|
|
|
|
.line 7
|
|
.line 8
|
|
iget v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
.line 9
|
|
.line 10
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 11
|
|
.line 12
|
|
invoke-direct {p0}, Lkotlin/io/encoding/EncodeOutputStream;->encodeByteBufferIntoOutput()V
|
|
|
|
.line 13
|
|
.line 14
|
|
.line 15
|
|
:cond_0
|
|
iget-object v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->output:Ljava/io/OutputStream;
|
|
|
|
.line 16
|
|
.line 17
|
|
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
|
|
|
|
.line 18
|
|
.line 19
|
|
.line 20
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public flush()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lkotlin/io/encoding/EncodeOutputStream;->checkOpen()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
iget-object v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->output:Ljava/io/OutputStream;
|
|
|
|
.line 5
|
|
.line 6
|
|
invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V
|
|
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
return-void
|
|
.end method
|
|
|
|
.method public write(I)V
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lkotlin/io/encoding/EncodeOutputStream;->checkOpen()V
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBuffer:[B
|
|
|
|
iget v1, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
iput v2, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
int-to-byte p1, p1
|
|
|
|
aput-byte p1, v0, v1
|
|
|
|
const/4 p1, 0x3
|
|
|
|
if-ne v2, p1, :cond_0
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Lkotlin/io/encoding/EncodeOutputStream;->encodeByteBufferIntoOutput()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public write([BII)V
|
|
.locals 4
|
|
.param p1 # [B
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "source"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 4
|
|
invoke-direct {p0}, Lkotlin/io/encoding/EncodeOutputStream;->checkOpen()V
|
|
|
|
if-ltz p2, :cond_6
|
|
|
|
if-ltz p3, :cond_6
|
|
|
|
add-int v0, p2, p3
|
|
|
|
.line 5
|
|
array-length v1, p1
|
|
|
|
if-gt v0, v1, :cond_6
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 6
|
|
:cond_0
|
|
iget p3, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
const-string v1, "Check failed."
|
|
|
|
const/4 v2, 0x3
|
|
|
|
if-ge p3, v2, :cond_5
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
.line 7
|
|
invoke-direct {p0, p1, p2, v0}, Lkotlin/io/encoding/EncodeOutputStream;->copyIntoByteBuffer([BII)I
|
|
|
|
move-result p3
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
.line 8
|
|
iget p3, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_1
|
|
:goto_1
|
|
add-int/lit8 p3, p2, 0x3
|
|
|
|
if-gt p3, v0, :cond_4
|
|
|
|
.line 9
|
|
iget-object p3, p0, Lkotlin/io/encoding/EncodeOutputStream;->base64:Lkotlin/io/encoding/Base64;
|
|
|
|
invoke-virtual {p3}, Lkotlin/io/encoding/Base64;->isMimeScheme$kotlin_stdlib()Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
iget p3, p0, Lkotlin/io/encoding/EncodeOutputStream;->lineLength:I
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
iget-object p3, p0, Lkotlin/io/encoding/EncodeOutputStream;->symbolBuffer:[B
|
|
|
|
array-length p3, p3
|
|
|
|
:goto_2
|
|
div-int/lit8 p3, p3, 0x4
|
|
|
|
sub-int v3, v0, p2
|
|
|
|
.line 10
|
|
div-int/2addr v3, v2
|
|
|
|
invoke-static {p3, v3}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result p3
|
|
|
|
mul-int/lit8 v3, p3, 0x3
|
|
|
|
add-int/2addr v3, p2
|
|
|
|
.line 11
|
|
invoke-direct {p0, p1, p2, v3}, Lkotlin/io/encoding/EncodeOutputStream;->encodeIntoOutput([BII)I
|
|
|
|
move-result p2
|
|
|
|
mul-int/lit8 p3, p3, 0x4
|
|
|
|
if-ne p2, p3, :cond_3
|
|
|
|
move p2, v3
|
|
|
|
goto :goto_1
|
|
|
|
.line 12
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 13
|
|
:cond_4
|
|
iget-object p3, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBuffer:[B
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p1, p3, v1, p2, v0}, Lkotlin/collections/ArraysKt;->copyInto([B[BIII)[B
|
|
|
|
sub-int/2addr v0, p2
|
|
|
|
.line 14
|
|
iput v0, p0, Lkotlin/io/encoding/EncodeOutputStream;->byteBufferLength:I
|
|
|
|
return-void
|
|
|
|
.line 15
|
|
:cond_5
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 16
|
|
:cond_6
|
|
new-instance v0, Ljava/lang/IndexOutOfBoundsException;
|
|
|
|
const-string v1, ", length: "
|
|
|
|
const-string v2, ", source size: "
|
|
|
|
.line 17
|
|
const-string v3, "offset: "
|
|
|
|
invoke-static {v3, p2, p3, v1, v2}, Landroid/support/v4/media/a;->u(Ljava/lang/String;IILjava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p2
|
|
|
|
.line 18
|
|
array-length p1, p1
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|