soul-browser/app/smali/androidx/emoji2/text/SpannableBuilder$WatcherWrapper.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

323 lines
6.4 KiB
Smali

.class Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroid/text/TextWatcher;
.implements Landroid/text/SpanWatcher;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/emoji2/text/SpannableBuilder;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "WatcherWrapper"
.end annotation
# instance fields
.field public final c:Ljava/lang/Object;
.field public final f:Ljava/util/concurrent/atomic/AtomicInteger;
# direct methods
.method public constructor <init>(Ljava/lang/Object;)V
.locals 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
.line 3
.line 4
new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;
.line 5
.line 6
const/4 v1, 0x0
.line 7
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V
.line 8
.line 9
.line 10
iput-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->f:Ljava/util/concurrent/atomic/AtomicInteger;
.line 11
.line 12
iput-object p1, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->c:Ljava/lang/Object;
.line 13
.line 14
return-void
.end method
# virtual methods
.method public final afterTextChanged(Landroid/text/Editable;)V
.locals 1
.line 1
iget-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->c:Ljava/lang/Object;
.line 2
.line 3
check-cast v0, Landroid/text/TextWatcher;
.line 4
.line 5
invoke-interface {v0, p1}, Landroid/text/TextWatcher;->afterTextChanged(Landroid/text/Editable;)V
.line 6
.line 7
.line 8
return-void
.end method
.method public final beforeTextChanged(Ljava/lang/CharSequence;III)V
.locals 1
.line 1
iget-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->c:Ljava/lang/Object;
.line 2
.line 3
check-cast v0, Landroid/text/TextWatcher;
.line 4
.line 5
invoke-interface {v0, p1, p2, p3, p4}, Landroid/text/TextWatcher;->beforeTextChanged(Ljava/lang/CharSequence;III)V
.line 6
.line 7
.line 8
return-void
.end method
.method public final onSpanAdded(Landroid/text/Spannable;Ljava/lang/Object;II)V
.locals 1
.line 1
iget-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->f:Ljava/util/concurrent/atomic/AtomicInteger;
.line 2
.line 3
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
.line 4
.line 5
.line 6
move-result v0
.line 7
if-lez v0, :cond_0
.line 8
.line 9
instance-of v0, p2, Landroidx/emoji2/text/EmojiSpan;
.line 10
.line 11
if-eqz v0, :cond_0
.line 12
.line 13
return-void
.line 14
:cond_0
iget-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->c:Ljava/lang/Object;
.line 15
.line 16
check-cast v0, Landroid/text/SpanWatcher;
.line 17
.line 18
invoke-interface {v0, p1, p2, p3, p4}, Landroid/text/SpanWatcher;->onSpanAdded(Landroid/text/Spannable;Ljava/lang/Object;II)V
.line 19
.line 20
.line 21
return-void
.end method
.method public final onSpanChanged(Landroid/text/Spannable;Ljava/lang/Object;IIII)V
.locals 8
.line 1
iget-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->f:Ljava/util/concurrent/atomic/AtomicInteger;
.line 2
.line 3
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
.line 4
.line 5
.line 6
move-result v0
.line 7
if-lez v0, :cond_0
.line 8
.line 9
instance-of v0, p2, Landroidx/emoji2/text/EmojiSpan;
.line 10
.line 11
if-eqz v0, :cond_0
.line 12
.line 13
return-void
.line 14
:cond_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
.line 15
.line 16
const/16 v1, 0x1c
.line 17
.line 18
if-ge v0, v1, :cond_2
.line 19
.line 20
const/4 v0, 0x0
.line 21
if-le p3, p4, :cond_1
.line 22
.line 23
move p3, v0
.line 24
:cond_1
if-le p5, p6, :cond_2
.line 25
.line 26
move v4, p3
.line 27
move v6, v0
.line 28
goto :goto_0
.line 29
:cond_2
move v4, p3
.line 30
move v6, p5
.line 31
:goto_0
iget-object p3, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->c:Ljava/lang/Object;
.line 32
.line 33
move-object v1, p3
.line 34
check-cast v1, Landroid/text/SpanWatcher;
.line 35
.line 36
move-object v2, p1
.line 37
move-object v3, p2
.line 38
move v5, p4
.line 39
move v7, p6
.line 40
invoke-interface/range {v1 .. v7}, Landroid/text/SpanWatcher;->onSpanChanged(Landroid/text/Spannable;Ljava/lang/Object;IIII)V
.line 41
.line 42
.line 43
return-void
.end method
.method public final onSpanRemoved(Landroid/text/Spannable;Ljava/lang/Object;II)V
.locals 1
.line 1
iget-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->f:Ljava/util/concurrent/atomic/AtomicInteger;
.line 2
.line 3
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I
.line 4
.line 5
.line 6
move-result v0
.line 7
if-lez v0, :cond_0
.line 8
.line 9
instance-of v0, p2, Landroidx/emoji2/text/EmojiSpan;
.line 10
.line 11
if-eqz v0, :cond_0
.line 12
.line 13
return-void
.line 14
:cond_0
iget-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->c:Ljava/lang/Object;
.line 15
.line 16
check-cast v0, Landroid/text/SpanWatcher;
.line 17
.line 18
invoke-interface {v0, p1, p2, p3, p4}, Landroid/text/SpanWatcher;->onSpanRemoved(Landroid/text/Spannable;Ljava/lang/Object;II)V
.line 19
.line 20
.line 21
return-void
.end method
.method public final onTextChanged(Ljava/lang/CharSequence;III)V
.locals 1
.line 1
iget-object v0, p0, Landroidx/emoji2/text/SpannableBuilder$WatcherWrapper;->c:Ljava/lang/Object;
.line 2
.line 3
check-cast v0, Landroid/text/TextWatcher;
.line 4
.line 5
invoke-interface {v0, p1, p2, p3, p4}, Landroid/text/TextWatcher;->onTextChanged(Ljava/lang/CharSequence;III)V
.line 6
.line 7
.line 8
return-void
.end method