* 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>
347 lines
8.1 KiB
Smali
347 lines
8.1 KiB
Smali
.class public Lcom/google/android/material/internal/TextDrawableHelper;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/android/material/internal/TextDrawableHelper$TextDrawableDelegate;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Landroid/text/TextPaint;
|
|
|
|
.field public final b:Lcom/google/android/material/resources/TextAppearanceFontCallback;
|
|
|
|
.field public c:F
|
|
|
|
.field public d:F
|
|
|
|
.field public e:Z
|
|
|
|
.field public final f:Ljava/lang/ref/WeakReference;
|
|
|
|
.field public g:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/google/android/material/internal/TextDrawableHelper$TextDrawableDelegate;)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
new-instance v0, Landroid/text/TextPaint;
|
|
|
|
.line 5
|
|
.line 6
|
|
const/4 v1, 0x1
|
|
|
|
.line 7
|
|
invoke-direct {v0, v1}, Landroid/text/TextPaint;-><init>(I)V
|
|
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
iput-object v0, p0, Lcom/google/android/material/internal/TextDrawableHelper;->a:Landroid/text/TextPaint;
|
|
|
|
.line 11
|
|
.line 12
|
|
new-instance v0, Lcom/google/android/material/internal/TextDrawableHelper$1;
|
|
|
|
.line 13
|
|
.line 14
|
|
invoke-direct {v0, p0}, Lcom/google/android/material/internal/TextDrawableHelper$1;-><init>(Lcom/google/android/material/internal/TextDrawableHelper;)V
|
|
|
|
.line 15
|
|
.line 16
|
|
.line 17
|
|
iput-object v0, p0, Lcom/google/android/material/internal/TextDrawableHelper;->b:Lcom/google/android/material/resources/TextAppearanceFontCallback;
|
|
|
|
.line 18
|
|
.line 19
|
|
iput-boolean v1, p0, Lcom/google/android/material/internal/TextDrawableHelper;->e:Z
|
|
|
|
.line 20
|
|
.line 21
|
|
new-instance v0, Ljava/lang/ref/WeakReference;
|
|
|
|
.line 22
|
|
.line 23
|
|
const/4 v1, 0x0
|
|
|
|
.line 24
|
|
invoke-direct {v0, v1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
.line 25
|
|
.line 26
|
|
.line 27
|
|
iput-object v0, p0, Lcom/google/android/material/internal/TextDrawableHelper;->f:Ljava/lang/ref/WeakReference;
|
|
|
|
.line 28
|
|
.line 29
|
|
new-instance v0, Ljava/lang/ref/WeakReference;
|
|
|
|
.line 30
|
|
.line 31
|
|
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
.line 32
|
|
.line 33
|
|
.line 34
|
|
iput-object v0, p0, Lcom/google/android/material/internal/TextDrawableHelper;->f:Ljava/lang/ref/WeakReference;
|
|
|
|
.line 35
|
|
.line 36
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Ljava/lang/String;)F
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lcom/google/android/material/internal/TextDrawableHelper;->e:Z
|
|
|
|
.line 2
|
|
.line 3
|
|
if-nez v0, :cond_0
|
|
|
|
.line 4
|
|
.line 5
|
|
iget p1, p0, Lcom/google/android/material/internal/TextDrawableHelper;->c:F
|
|
|
|
.line 6
|
|
.line 7
|
|
return p1
|
|
|
|
.line 8
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/internal/TextDrawableHelper;->b(Ljava/lang/String;)V
|
|
|
|
.line 9
|
|
.line 10
|
|
.line 11
|
|
iget p1, p0, Lcom/google/android/material/internal/TextDrawableHelper;->c:F
|
|
|
|
.line 12
|
|
.line 13
|
|
return p1
|
|
.end method
|
|
|
|
.method public final b(Ljava/lang/String;)V
|
|
.locals 4
|
|
|
|
.line 1
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lcom/google/android/material/internal/TextDrawableHelper;->a:Landroid/text/TextPaint;
|
|
|
|
.line 3
|
|
.line 4
|
|
const/4 v2, 0x0
|
|
|
|
.line 5
|
|
if-nez p1, :cond_0
|
|
|
|
.line 6
|
|
.line 7
|
|
move v3, v2
|
|
|
|
.line 8
|
|
goto :goto_0
|
|
|
|
.line 9
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
.line 10
|
|
.line 11
|
|
.line 12
|
|
move-result v3
|
|
|
|
.line 13
|
|
invoke-virtual {v1, p1, v0, v3}, Landroid/graphics/Paint;->measureText(Ljava/lang/CharSequence;II)F
|
|
|
|
.line 14
|
|
.line 15
|
|
.line 16
|
|
move-result v3
|
|
|
|
.line 17
|
|
:goto_0
|
|
iput v3, p0, Lcom/google/android/material/internal/TextDrawableHelper;->c:F
|
|
|
|
.line 18
|
|
.line 19
|
|
if-nez p1, :cond_1
|
|
|
|
.line 20
|
|
.line 21
|
|
goto :goto_1
|
|
|
|
.line 22
|
|
:cond_1
|
|
invoke-virtual {v1}, Landroid/graphics/Paint;->getFontMetrics()Landroid/graphics/Paint$FontMetrics;
|
|
|
|
.line 23
|
|
.line 24
|
|
.line 25
|
|
move-result-object p1
|
|
|
|
.line 26
|
|
iget p1, p1, Landroid/graphics/Paint$FontMetrics;->ascent:F
|
|
|
|
.line 27
|
|
.line 28
|
|
invoke-static {p1}, Ljava/lang/Math;->abs(F)F
|
|
|
|
.line 29
|
|
.line 30
|
|
.line 31
|
|
move-result v2
|
|
|
|
.line 32
|
|
:goto_1
|
|
iput v2, p0, Lcom/google/android/material/internal/TextDrawableHelper;->d:F
|
|
|
|
.line 33
|
|
.line 34
|
|
iput-boolean v0, p0, Lcom/google/android/material/internal/TextDrawableHelper;->e:Z
|
|
|
|
.line 35
|
|
.line 36
|
|
return-void
|
|
.end method
|
|
|
|
.method public final c(Lcom/google/android/material/resources/TextAppearance;Landroid/content/Context;)V
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/internal/TextDrawableHelper;->g:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
.line 2
|
|
.line 3
|
|
if-eq v0, p1, :cond_2
|
|
|
|
.line 4
|
|
.line 5
|
|
iput-object p1, p0, Lcom/google/android/material/internal/TextDrawableHelper;->g:Lcom/google/android/material/resources/TextAppearance;
|
|
|
|
.line 6
|
|
.line 7
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 8
|
|
.line 9
|
|
iget-object v0, p0, Lcom/google/android/material/internal/TextDrawableHelper;->a:Landroid/text/TextPaint;
|
|
|
|
.line 10
|
|
.line 11
|
|
iget-object v1, p0, Lcom/google/android/material/internal/TextDrawableHelper;->b:Lcom/google/android/material/resources/TextAppearanceFontCallback;
|
|
|
|
.line 12
|
|
.line 13
|
|
invoke-virtual {p1, p2, v0, v1}, Lcom/google/android/material/resources/TextAppearance;->e(Landroid/content/Context;Landroid/text/TextPaint;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
|
|
|
|
.line 14
|
|
.line 15
|
|
.line 16
|
|
iget-object v2, p0, Lcom/google/android/material/internal/TextDrawableHelper;->f:Ljava/lang/ref/WeakReference;
|
|
|
|
.line 17
|
|
.line 18
|
|
invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
|
|
|
.line 19
|
|
.line 20
|
|
.line 21
|
|
move-result-object v2
|
|
|
|
.line 22
|
|
check-cast v2, Lcom/google/android/material/internal/TextDrawableHelper$TextDrawableDelegate;
|
|
|
|
.line 23
|
|
.line 24
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 25
|
|
.line 26
|
|
invoke-interface {v2}, Lcom/google/android/material/internal/TextDrawableHelper$TextDrawableDelegate;->getState()[I
|
|
|
|
.line 27
|
|
.line 28
|
|
.line 29
|
|
move-result-object v2
|
|
|
|
.line 30
|
|
iput-object v2, v0, Landroid/text/TextPaint;->drawableState:[I
|
|
|
|
.line 31
|
|
.line 32
|
|
:cond_0
|
|
invoke-virtual {p1, p2, v0, v1}, Lcom/google/android/material/resources/TextAppearance;->d(Landroid/content/Context;Landroid/text/TextPaint;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
|
|
|
|
.line 33
|
|
.line 34
|
|
.line 35
|
|
const/4 p1, 0x1
|
|
|
|
.line 36
|
|
iput-boolean p1, p0, Lcom/google/android/material/internal/TextDrawableHelper;->e:Z
|
|
|
|
.line 37
|
|
.line 38
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/google/android/material/internal/TextDrawableHelper;->f:Ljava/lang/ref/WeakReference;
|
|
|
|
.line 39
|
|
.line 40
|
|
invoke-virtual {p1}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
|
|
|
.line 41
|
|
.line 42
|
|
.line 43
|
|
move-result-object p1
|
|
|
|
.line 44
|
|
check-cast p1, Lcom/google/android/material/internal/TextDrawableHelper$TextDrawableDelegate;
|
|
|
|
.line 45
|
|
.line 46
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 47
|
|
.line 48
|
|
invoke-interface {p1}, Lcom/google/android/material/internal/TextDrawableHelper$TextDrawableDelegate;->a()V
|
|
|
|
.line 49
|
|
.line 50
|
|
.line 51
|
|
invoke-interface {p1}, Lcom/google/android/material/internal/TextDrawableHelper$TextDrawableDelegate;->getState()[I
|
|
|
|
.line 52
|
|
.line 53
|
|
.line 54
|
|
move-result-object p2
|
|
|
|
.line 55
|
|
invoke-interface {p1, p2}, Lcom/google/android/material/internal/TextDrawableHelper$TextDrawableDelegate;->onStateChange([I)Z
|
|
|
|
.line 56
|
|
.line 57
|
|
.line 58
|
|
:cond_2
|
|
return-void
|
|
.end method
|