soul-browser/app/smali/androidx/savedstate/SavedStateRegistry.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

554 lines
12 KiB
Smali

.class public final Landroidx/savedstate/SavedStateRegistry;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation build Landroid/annotation/SuppressLint;
value = {
"RestrictedApi"
}
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/savedstate/SavedStateRegistry$AutoRecreated;,
Landroidx/savedstate/SavedStateRegistry$Companion;,
Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\u000c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0004\u0008\u0007\u0018\u00002\u00020\u0001:\u0003\u0002\u0003\u0004\u00a8\u0006\u0005"
}
d2 = {
"Landroidx/savedstate/SavedStateRegistry;",
"",
"AutoRecreated",
"Companion",
"SavedStateProvider",
"savedstate_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
value = {
"SMAP\nSavedStateRegistry.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SavedStateRegistry.kt\nandroidx/savedstate/SavedStateRegistry\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,272:1\n1#2:273\n*E\n"
}
.end annotation
# instance fields
.field public final a:Landroidx/arch/core/internal/SafeIterableMap;
.field public b:Z
.field public c:Landroid/os/Bundle;
.field public d:Z
.field public e:Landroidx/savedstate/Recreator$SavedStateProvider;
.field public f:Z
# direct methods
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
.line 3
.line 4
new-instance v0, Landroidx/arch/core/internal/SafeIterableMap;
.line 5
.line 6
invoke-direct {v0}, Landroidx/arch/core/internal/SafeIterableMap;-><init>()V
.line 7
.line 8
.line 9
iput-object v0, p0, Landroidx/savedstate/SavedStateRegistry;->a:Landroidx/arch/core/internal/SafeIterableMap;
.line 10
.line 11
const/4 v0, 0x1
.line 12
iput-boolean v0, p0, Landroidx/savedstate/SavedStateRegistry;->f:Z
.line 13
.line 14
return-void
.end method
# virtual methods
.method public final a(Ljava/lang/String;)Landroid/os/Bundle;
.locals 3
.line 1
const-string v0, "key"
.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
iget-boolean v0, p0, Landroidx/savedstate/SavedStateRegistry;->d:Z
.line 7
.line 8
if-eqz v0, :cond_3
.line 9
.line 10
iget-object v0, p0, Landroidx/savedstate/SavedStateRegistry;->c:Landroid/os/Bundle;
.line 11
.line 12
const/4 v1, 0x0
.line 13
if-eqz v0, :cond_2
.line 14
.line 15
invoke-virtual {v0, p1}, Landroid/os/Bundle;->getBundle(Ljava/lang/String;)Landroid/os/Bundle;
.line 16
.line 17
.line 18
move-result-object v0
.line 19
iget-object v2, p0, Landroidx/savedstate/SavedStateRegistry;->c:Landroid/os/Bundle;
.line 20
.line 21
if-eqz v2, :cond_0
.line 22
.line 23
invoke-virtual {v2, p1}, Landroid/os/Bundle;->remove(Ljava/lang/String;)V
.line 24
.line 25
.line 26
:cond_0
iget-object p1, p0, Landroidx/savedstate/SavedStateRegistry;->c:Landroid/os/Bundle;
.line 27
.line 28
if-eqz p1, :cond_1
.line 29
.line 30
invoke-virtual {p1}, Landroid/os/BaseBundle;->isEmpty()Z
.line 31
.line 32
.line 33
move-result p1
.line 34
if-nez p1, :cond_1
.line 35
.line 36
return-object v0
.line 37
:cond_1
iput-object v1, p0, Landroidx/savedstate/SavedStateRegistry;->c:Landroid/os/Bundle;
.line 38
.line 39
return-object v0
.line 40
:cond_2
return-object v1
.line 41
:cond_3
new-instance p1, Ljava/lang/IllegalStateException;
.line 42
.line 43
const-string v0, "You can consumeRestoredStateForKey only after super.onCreate of corresponding component"
.line 44
.line 45
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 46
.line 47
.line 48
throw p1
.end method
.method public final b()Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;
.locals 4
.line 1
const-string v0, "key"
.line 2
.line 3
const-string v1, "androidx.lifecycle.internal.SavedStateHandlesProvider"
.line 4
.line 5
invoke-static {v1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 6
.line 7
.line 8
iget-object v0, p0, Landroidx/savedstate/SavedStateRegistry;->a:Landroidx/arch/core/internal/SafeIterableMap;
.line 9
.line 10
invoke-virtual {v0}, Landroidx/arch/core/internal/SafeIterableMap;->iterator()Ljava/util/Iterator;
.line 11
.line 12
.line 13
move-result-object v0
.line 14
:cond_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
.line 15
.line 16
.line 17
move-result v2
.line 18
if-eqz v2, :cond_1
.line 19
.line 20
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
.line 21
.line 22
.line 23
move-result-object v2
.line 24
check-cast v2, Ljava/util/Map$Entry;
.line 25
.line 26
const-string v3, "components"
.line 27
.line 28
invoke-static {v2, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 29
.line 30
.line 31
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
.line 32
.line 33
.line 34
move-result-object v3
.line 35
check-cast v3, Ljava/lang/String;
.line 36
.line 37
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
.line 38
.line 39
.line 40
move-result-object v2
.line 41
check-cast v2, Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;
.line 42
.line 43
invoke-static {v3, v1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
.line 44
.line 45
.line 46
move-result v3
.line 47
if-eqz v3, :cond_0
.line 48
.line 49
return-object v2
.line 50
:cond_1
const/4 v0, 0x0
.line 51
return-object v0
.end method
.method public final c(Ljava/lang/String;Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;)V
.locals 1
.line 1
const-string v0, "key"
.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, "provider"
.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
iget-object v0, p0, Landroidx/savedstate/SavedStateRegistry;->a:Landroidx/arch/core/internal/SafeIterableMap;
.line 12
.line 13
invoke-virtual {v0, p1, p2}, Landroidx/arch/core/internal/SafeIterableMap;->c(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 14
.line 15
.line 16
move-result-object p1
.line 17
check-cast p1, Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;
.line 18
.line 19
if-nez p1, :cond_0
.line 20
.line 21
return-void
.line 22
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
.line 23
.line 24
const-string p2, "SavedStateProvider with the given key is already registered"
.line 25
.line 26
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
.line 27
.line 28
.line 29
throw p1
.end method
.method public final d()V
.locals 5
.line 1
const-string v0, "clazz"
.line 2
.line 3
const-class v1, Landroidx/lifecycle/LegacySavedStateHandleController$OnRecreation;
.line 4
.line 5
invoke-static {v1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 6
.line 7
.line 8
iget-boolean v0, p0, Landroidx/savedstate/SavedStateRegistry;->f:Z
.line 9
.line 10
if-eqz v0, :cond_2
.line 11
.line 12
iget-object v0, p0, Landroidx/savedstate/SavedStateRegistry;->e:Landroidx/savedstate/Recreator$SavedStateProvider;
.line 13
.line 14
if-nez v0, :cond_0
.line 15
.line 16
new-instance v0, Landroidx/savedstate/Recreator$SavedStateProvider;
.line 17
.line 18
invoke-direct {v0, p0}, Landroidx/savedstate/Recreator$SavedStateProvider;-><init>(Landroidx/savedstate/SavedStateRegistry;)V
.line 19
.line 20
.line 21
:cond_0
iput-object v0, p0, Landroidx/savedstate/SavedStateRegistry;->e:Landroidx/savedstate/Recreator$SavedStateProvider;
.line 22
.line 23
const/4 v0, 0x0
.line 24
:try_start_0
invoke-virtual {v1, v0}, Ljava/lang/Class;->getDeclaredConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
.line 25
.line 26
.line 27
iget-object v0, p0, Landroidx/savedstate/SavedStateRegistry;->e:Landroidx/savedstate/Recreator$SavedStateProvider;
.line 28
.line 29
if-eqz v0, :cond_1
.line 30
.line 31
invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
.line 32
.line 33
.line 34
move-result-object v1
.line 35
const-string v2, "clazz.name"
.line 36
.line 37
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 38
.line 39
.line 40
const-string v2, "className"
.line 41
.line 42
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 43
.line 44
.line 45
iget-object v0, v0, Landroidx/savedstate/Recreator$SavedStateProvider;->a:Ljava/util/LinkedHashSet;
.line 46
.line 47
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 48
.line 49
.line 50
:cond_1
return-void
.line 51
:catch_0
move-exception v0
.line 52
new-instance v2, Ljava/lang/IllegalArgumentException;
.line 53
.line 54
new-instance v3, Ljava/lang/StringBuilder;
.line 55
.line 56
const-string v4, "Class "
.line 57
.line 58
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 59
.line 60
.line 61
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
.line 62
.line 63
.line 64
move-result-object v1
.line 65
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 66
.line 67
.line 68
const-string v1, " must have default constructor in order to be automatically recreated"
.line 69
.line 70
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 71
.line 72
.line 73
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 74
.line 75
.line 76
move-result-object v1
.line 77
invoke-direct {v2, v1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 78
.line 79
.line 80
throw v2
.line 81
:cond_2
new-instance v0, Ljava/lang/IllegalStateException;
.line 82
.line 83
const-string v1, "Can not perform this action after onSaveInstanceState"
.line 84
.line 85
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 86
.line 87
.line 88
throw v0
.end method