soul-browser/app/smali/androidx/viewpager/widget/PagerTabStrip.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

410 lines
6.8 KiB
Smali

.class public Landroidx/viewpager/widget/PagerTabStrip;
.super Landroidx/viewpager/widget/PagerTitleStrip;
.source "SourceFile"
# instance fields
.field public h:I
.field public i:Z
.field public j:Z
.field public k:F
.field public l:F
# virtual methods
.method public final b(F)V
.locals 0
.line 1
invoke-virtual {p0}, Landroid/view/View;->getHeight()I
.line 2
.line 3
.line 4
const/4 p1, 0x0
.line 5
throw p1
.end method
.method public getDrawFullUnderline()Z
.locals 1
.line 1
iget-boolean v0, p0, Landroidx/viewpager/widget/PagerTabStrip;->i:Z
.line 2
.line 3
return v0
.end method
.method public getMinHeight()I
.locals 2
.line 1
invoke-super {p0}, Landroidx/viewpager/widget/PagerTitleStrip;->getMinHeight()I
.line 2
.line 3
.line 4
move-result v0
.line 5
const/4 v1, 0x0
.line 6
invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I
.line 7
.line 8
.line 9
move-result v0
.line 10
return v0
.end method
.method public getTabIndicatorColor()I
.locals 1
.annotation build Landroidx/annotation/ColorInt;
.end annotation
.line 1
iget v0, p0, Landroidx/viewpager/widget/PagerTabStrip;->h:I
.line 2
.line 3
return v0
.end method
.method public final onDraw(Landroid/graphics/Canvas;)V
.locals 0
.line 1
invoke-super {p0, p1}, Landroid/view/ViewGroup;->onDraw(Landroid/graphics/Canvas;)V
.line 2
.line 3
.line 4
invoke-virtual {p0}, Landroid/view/View;->getHeight()I
.line 5
.line 6
.line 7
const/4 p1, 0x0
.line 8
throw p1
.end method
.method public final onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 5
.line 1
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
.line 2
.line 3
.line 4
move-result v0
.line 5
const/4 v1, 0x0
.line 6
if-eqz v0, :cond_0
.line 7
.line 8
iget-boolean v2, p0, Landroidx/viewpager/widget/PagerTabStrip;->j:Z
.line 9
.line 10
if-eqz v2, :cond_0
.line 11
.line 12
return v1
.line 13
:cond_0
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
.line 14
.line 15
.line 16
move-result v2
.line 17
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
.line 18
.line 19
.line 20
move-result p1
.line 21
const/4 v3, 0x1
.line 22
if-eqz v0, :cond_5
.line 23
.line 24
if-eq v0, v3, :cond_4
.line 25
.line 26
const/4 v4, 0x2
.line 27
if-eq v0, v4, :cond_1
.line 28
.line 29
goto :goto_0
.line 30
:cond_1
iget v0, p0, Landroidx/viewpager/widget/PagerTabStrip;->k:F
.line 31
.line 32
sub-float/2addr v2, v0
.line 33
invoke-static {v2}, Ljava/lang/Math;->abs(F)F
.line 34
.line 35
.line 36
move-result v0
.line 37
int-to-float v1, v1
.line 38
cmpl-float v0, v0, v1
.line 39
.line 40
if-gtz v0, :cond_3
.line 41
.line 42
iget v0, p0, Landroidx/viewpager/widget/PagerTabStrip;->l:F
.line 43
.line 44
sub-float/2addr p1, v0
.line 45
invoke-static {p1}, Ljava/lang/Math;->abs(F)F
.line 46
.line 47
.line 48
move-result p1
.line 49
cmpl-float p1, p1, v1
.line 50
.line 51
if-lez p1, :cond_2
.line 52
.line 53
goto :goto_1
.line 54
:cond_2
:goto_0
return v3
.line 55
:cond_3
:goto_1
iput-boolean v3, p0, Landroidx/viewpager/widget/PagerTabStrip;->j:Z
.line 56
.line 57
return v3
.line 58
:cond_4
const/4 p1, 0x0
.line 59
throw p1
.line 60
:cond_5
iput v2, p0, Landroidx/viewpager/widget/PagerTabStrip;->k:F
.line 61
.line 62
iput p1, p0, Landroidx/viewpager/widget/PagerTabStrip;->l:F
.line 63
.line 64
iput-boolean v1, p0, Landroidx/viewpager/widget/PagerTabStrip;->j:Z
.line 65
.line 66
return v3
.end method
.method public setBackgroundColor(I)V
.locals 0
.param p1 # I
.annotation build Landroidx/annotation/ColorInt;
.end annotation
.end param
.line 1
invoke-super {p0, p1}, Landroid/view/ViewGroup;->setBackgroundColor(I)V
.line 2
.line 3
.line 4
return-void
.end method
.method public setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
.locals 0
.line 1
invoke-super {p0, p1}, Landroid/view/ViewGroup;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
.line 2
.line 3
.line 4
return-void
.end method
.method public setBackgroundResource(I)V
.locals 0
.param p1 # I
.annotation build Landroidx/annotation/DrawableRes;
.end annotation
.end param
.line 1
invoke-super {p0, p1}, Landroid/view/ViewGroup;->setBackgroundResource(I)V
.line 2
.line 3
.line 4
return-void
.end method
.method public setDrawFullUnderline(Z)V
.locals 0
.line 1
iput-boolean p1, p0, Landroidx/viewpager/widget/PagerTabStrip;->i:Z
.line 2
.line 3
invoke-virtual {p0}, Landroid/view/View;->invalidate()V
.line 4
.line 5
.line 6
return-void
.end method
.method public final setPadding(IIII)V
.locals 0
.line 1
if-gez p4, :cond_0
.line 2
.line 3
const/4 p4, 0x0
.line 4
:cond_0
invoke-super {p0, p1, p2, p3, p4}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 5
.line 6
.line 7
return-void
.end method
.method public setTabIndicatorColor(I)V
.locals 0
.param p1 # I
.annotation build Landroidx/annotation/ColorInt;
.end annotation
.end param
.line 1
iput p1, p0, Landroidx/viewpager/widget/PagerTabStrip;->h:I
.line 2
.line 3
const/4 p1, 0x0
.line 4
throw p1
.end method
.method public setTabIndicatorColorResource(I)V
.locals 1
.param p1 # I
.annotation build Landroidx/annotation/ColorRes;
.end annotation
.end param
.line 1
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
.line 2
.line 3
.line 4
move-result-object v0
.line 5
invoke-virtual {v0, p1}, Landroid/content/Context;->getColor(I)I
.line 6
.line 7
.line 8
move-result p1
.line 9
invoke-virtual {p0, p1}, Landroidx/viewpager/widget/PagerTabStrip;->setTabIndicatorColor(I)V
.line 10
.line 11
.line 12
return-void
.end method
.method public setTextSpacing(I)V
.locals 0
.line 1
if-gez p1, :cond_0
.line 2
.line 3
const/4 p1, 0x0
.line 4
:cond_0
invoke-super {p0, p1}, Landroidx/viewpager/widget/PagerTitleStrip;->setTextSpacing(I)V
.line 5
.line 6
.line 7
return-void
.end method