soul-browser/app/smali_classes3/com/google/common/io/CharSequenceReader.smali
KaKi87 550ddb0413
Decompile and recreate Soul Browser v1.4.85 with APK CI builds (#1)
* 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>
2026-08-10 16:07:14 +02:00

705 lines
12 KiB
Smali

.class final Lcom/google/common/io/CharSequenceReader;
.super Ljava/io/Reader;
.source "SourceFile"
# annotations
.annotation build Lcom/google/common/annotations/GwtIncompatible;
.end annotation
.annotation build Lcom/google/common/annotations/J2ktIncompatible;
.end annotation
# instance fields
.field public c:Ljava/lang/String;
.field public f:I
.field public g:I
# virtual methods
.method public final a()V
.locals 2
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
.line 2
.line 3
if-eqz 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, "reader 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 public final b()I
.locals 2
.line 1
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
.line 2
.line 3
invoke-static {v0}, Lj$/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 4
.line 5
.line 6
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
.line 7
.line 8
invoke-virtual {v0}, Ljava/lang/String;->length()I
.line 9
.line 10
.line 11
move-result v0
.line 12
iget v1, p0, Lcom/google/common/io/CharSequenceReader;->f:I
.line 13
.line 14
sub-int/2addr v0, v1
.line 15
return v0
.end method
.method public final declared-synchronized close()V
.locals 1
.line 1
monitor-enter p0
.line 2
const/4 v0, 0x0
.line 3
:try_start_0
iput-object v0, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 4
.line 5
monitor-exit p0
.line 6
return-void
.line 7
:catchall_0
move-exception v0
.line 8
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 9
throw v0
.end method
.method public final declared-synchronized mark(I)V
.locals 2
.line 1
monitor-enter p0
.line 2
if-ltz p1, :cond_0
.line 3
.line 4
const/4 v0, 0x1
.line 5
goto :goto_0
.line 6
:cond_0
const/4 v0, 0x0
.line 7
:goto_0
:try_start_0
const-string v1, "readAheadLimit (%s) may not be negative"
.line 8
.line 9
invoke-static {v1, p1, v0}, Lcom/google/common/base/Preconditions;->b(Ljava/lang/String;IZ)V
.line 10
.line 11
.line 12
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->a()V
.line 13
.line 14
.line 15
iget p1, p0, Lcom/google/common/io/CharSequenceReader;->f:I
.line 16
.line 17
iput p1, p0, Lcom/google/common/io/CharSequenceReader;->g:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 18
.line 19
monitor-exit p0
.line 20
return-void
.line 21
:catchall_0
move-exception p1
.line 22
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 23
throw p1
.end method
.method public final markSupported()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public final declared-synchronized read()I
.locals 3
monitor-enter p0
.line 1
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->a()V
.line 2
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
invoke-static {v0}, Lj$/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 3
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->b()I
move-result v0
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
.line 4
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
iget v1, p0, Lcom/google/common/io/CharSequenceReader;->f:I
add-int/lit8 v2, v1, 0x1
iput v2, p0, Lcom/google/common/io/CharSequenceReader;->f:I
invoke-virtual {v0, v1}, Ljava/lang/String;->charAt(I)C
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_1
:catchall_0
move-exception v0
goto :goto_2
:cond_1
const/4 v0, -0x1
:goto_1
monitor-exit p0
return v0
:goto_2
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public final declared-synchronized read(Ljava/nio/CharBuffer;)I
.locals 5
monitor-enter p0
.line 13
:try_start_0
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
.line 14
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->a()V
.line 15
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
invoke-static {v0}, Lj$/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 16
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->b()I
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v1, 0x0
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
move v0, v1
:goto_0
if-nez v0, :cond_1
.line 17
monitor-exit p0
const/4 p1, -0x1
return p1
.line 18
:cond_1
:try_start_1
invoke-virtual {p1}, Ljava/nio/Buffer;->remaining()I
move-result v0
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->b()I
move-result v2
invoke-static {v0, v2}, Ljava/lang/Math;->min(II)I
move-result v0
:goto_1
if-ge v1, v0, :cond_2
.line 19
iget-object v2, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
iget v3, p0, Lcom/google/common/io/CharSequenceReader;->f:I
add-int/lit8 v4, v3, 0x1
iput v4, p0, Lcom/google/common/io/CharSequenceReader;->f:I
invoke-virtual {v2, v3}, Ljava/lang/String;->charAt(I)C
move-result v2
invoke-virtual {p1, v2}, Ljava/nio/CharBuffer;->put(C)Ljava/nio/CharBuffer;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
add-int/lit8 v1, v1, 0x1
goto :goto_1
:catchall_0
move-exception p1
goto :goto_2
.line 20
:cond_2
monitor-exit p0
return v0
:goto_2
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw p1
.end method
.method public final declared-synchronized read([CII)I
.locals 5
monitor-enter p0
add-int v0, p2, p3
.line 5
:try_start_0
array-length v1, p1
invoke-static {p2, v0, v1}, Lcom/google/common/base/Preconditions;->j(III)V
.line 6
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->a()V
.line 7
iget-object v0, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
invoke-static {v0}, Lj$/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 8
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->b()I
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v1, 0x0
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
move v0, v1
:goto_0
if-nez v0, :cond_1
.line 9
monitor-exit p0
const/4 p1, -0x1
return p1
.line 10
:cond_1
:try_start_1
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->b()I
move-result v0
invoke-static {p3, v0}, Ljava/lang/Math;->min(II)I
move-result p3
:goto_1
if-ge v1, p3, :cond_2
add-int v0, p2, v1
.line 11
iget-object v2, p0, Lcom/google/common/io/CharSequenceReader;->c:Ljava/lang/String;
iget v3, p0, Lcom/google/common/io/CharSequenceReader;->f:I
add-int/lit8 v4, v3, 0x1
iput v4, p0, Lcom/google/common/io/CharSequenceReader;->f:I
invoke-virtual {v2, v3}, Ljava/lang/String;->charAt(I)C
move-result v2
aput-char v2, p1, v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
add-int/lit8 v1, v1, 0x1
goto :goto_1
:catchall_0
move-exception p1
goto :goto_2
.line 12
:cond_2
monitor-exit p0
return p3
:goto_2
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw p1
.end method
.method public final declared-synchronized ready()Z
.locals 1
.line 1
monitor-enter p0
.line 2
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->a()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
.line 4
.line 5
monitor-exit p0
.line 6
const/4 v0, 0x1
.line 7
return v0
.line 8
:catchall_0
move-exception v0
.line 9
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 10
throw v0
.end method
.method public final declared-synchronized reset()V
.locals 1
.line 1
monitor-enter p0
.line 2
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->a()V
.line 3
.line 4
.line 5
iget v0, p0, Lcom/google/common/io/CharSequenceReader;->g:I
.line 6
.line 7
iput v0, p0, Lcom/google/common/io/CharSequenceReader;->f:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 8
.line 9
monitor-exit p0
.line 10
return-void
.line 11
:catchall_0
move-exception v0
.line 12
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 13
throw v0
.end method
.method public final declared-synchronized skip(J)J
.locals 4
.line 1
monitor-enter p0
.line 2
const-wide/16 v0, 0x0
.line 3
.line 4
cmp-long v0, p1, v0
.line 5
.line 6
const/4 v1, 0x0
.line 7
const/4 v2, 0x1
.line 8
if-ltz v0, :cond_0
.line 9
.line 10
move v0, v2
.line 11
goto :goto_0
.line 12
:cond_0
move v0, v1
.line 13
:goto_0
:try_start_0
const-string v3, "n (%s) may not be negative"
.line 14
.line 15
if-eqz v0, :cond_1
.line 16
.line 17
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->a()V
.line 18
.line 19
.line 20
invoke-virtual {p0}, Lcom/google/common/io/CharSequenceReader;->b()I
.line 21
.line 22
.line 23
move-result v0
.line 24
int-to-long v0, v0
.line 25
invoke-static {v0, v1, p1, p2}, Ljava/lang/Math;->min(JJ)J
.line 26
.line 27
.line 28
move-result-wide p1
.line 29
long-to-int p1, p1
.line 30
iget p2, p0, Lcom/google/common/io/CharSequenceReader;->f:I
.line 31
.line 32
add-int/2addr p2, p1
.line 33
iput p2, p0, Lcom/google/common/io/CharSequenceReader;->f:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 34
.line 35
int-to-long p1, p1
.line 36
monitor-exit p0
.line 37
return-wide p1
.line 38
:catchall_0
move-exception p1
.line 39
goto :goto_1
.line 40
:cond_1
:try_start_1
new-instance v0, Ljava/lang/IllegalArgumentException;
.line 41
.line 42
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
.line 43
.line 44
.line 45
move-result-object p1
.line 46
new-array p2, v2, [Ljava/lang/Object;
.line 47
.line 48
aput-object p1, p2, v1
.line 49
.line 50
invoke-static {v3, p2}, Lcom/google/common/base/Strings;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
.line 51
.line 52
.line 53
move-result-object p1
.line 54
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
.line 55
.line 56
.line 57
throw v0
.line 58
:goto_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 59
throw p1
.end method