* 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>
148 lines
5.1 KiB
Java
148 lines
5.1 KiB
Java
package androidx.fragment.app;
|
|
|
|
import android.util.Log;
|
|
import androidx.lifecycle.ViewModel;
|
|
import androidx.lifecycle.ViewModelProvider;
|
|
import androidx.lifecycle.ViewModelStore;
|
|
import androidx.lifecycle.viewmodel.MutableCreationExtras;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes.dex */
|
|
public final class FragmentManagerViewModel extends ViewModel {
|
|
public static final ViewModelProvider.Factory j = new Object();
|
|
public final boolean g;
|
|
public final HashMap d = new HashMap();
|
|
public final HashMap e = new HashMap();
|
|
public final HashMap f = new HashMap();
|
|
public boolean h = false;
|
|
public boolean i = false;
|
|
|
|
/* renamed from: androidx.fragment.app.FragmentManagerViewModel$1, reason: invalid class name */
|
|
/* loaded from: classes.dex */
|
|
public class AnonymousClass1 implements ViewModelProvider.Factory {
|
|
@Override // androidx.lifecycle.ViewModelProvider.Factory
|
|
public final ViewModel a(Class cls) {
|
|
return new FragmentManagerViewModel(true);
|
|
}
|
|
|
|
@Override // androidx.lifecycle.ViewModelProvider.Factory
|
|
public final ViewModel b(Class modelClass, MutableCreationExtras extras) {
|
|
Intrinsics.checkNotNullParameter(modelClass, "modelClass");
|
|
Intrinsics.checkNotNullParameter(extras, "extras");
|
|
return a(modelClass);
|
|
}
|
|
}
|
|
|
|
public FragmentManagerViewModel(boolean z) {
|
|
this.g = z;
|
|
}
|
|
|
|
@Override // androidx.lifecycle.ViewModel
|
|
public final void b() {
|
|
if (FragmentManager.J(3)) {
|
|
Log.d("FragmentManager", "onCleared called for " + this);
|
|
}
|
|
this.h = true;
|
|
}
|
|
|
|
public final void c(Fragment fragment) {
|
|
if (this.i) {
|
|
if (FragmentManager.J(2)) {
|
|
Log.v("FragmentManager", "Ignoring addRetainedFragment as the state is already saved");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
String str = fragment.mWho;
|
|
HashMap hashMap = this.d;
|
|
if (!hashMap.containsKey(str)) {
|
|
hashMap.put(fragment.mWho, fragment);
|
|
if (FragmentManager.J(2)) {
|
|
Log.v("FragmentManager", "Updating retained Fragments: Added " + fragment);
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void d(Fragment fragment) {
|
|
if (FragmentManager.J(3)) {
|
|
Log.d("FragmentManager", "Clearing non-config state for " + fragment);
|
|
}
|
|
e(fragment.mWho);
|
|
}
|
|
|
|
public final void e(String str) {
|
|
HashMap hashMap = this.e;
|
|
FragmentManagerViewModel fragmentManagerViewModel = (FragmentManagerViewModel) hashMap.get(str);
|
|
if (fragmentManagerViewModel != null) {
|
|
fragmentManagerViewModel.b();
|
|
hashMap.remove(str);
|
|
}
|
|
HashMap hashMap2 = this.f;
|
|
ViewModelStore viewModelStore = (ViewModelStore) hashMap2.get(str);
|
|
if (viewModelStore != null) {
|
|
viewModelStore.a();
|
|
hashMap2.remove(str);
|
|
}
|
|
}
|
|
|
|
public final boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj != null && FragmentManagerViewModel.class == obj.getClass()) {
|
|
FragmentManagerViewModel fragmentManagerViewModel = (FragmentManagerViewModel) obj;
|
|
if (this.d.equals(fragmentManagerViewModel.d) && this.e.equals(fragmentManagerViewModel.e) && this.f.equals(fragmentManagerViewModel.f)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final void f(Fragment fragment) {
|
|
if (this.i) {
|
|
if (FragmentManager.J(2)) {
|
|
Log.v("FragmentManager", "Ignoring removeRetainedFragment as the state is already saved");
|
|
}
|
|
} else if (this.d.remove(fragment.mWho) != null && FragmentManager.J(2)) {
|
|
Log.v("FragmentManager", "Updating retained Fragments: Removed " + fragment);
|
|
}
|
|
}
|
|
|
|
public final int hashCode() {
|
|
return this.f.hashCode() + ((this.e.hashCode() + (this.d.hashCode() * 31)) * 31);
|
|
}
|
|
|
|
public final String toString() {
|
|
StringBuilder sb = new StringBuilder("FragmentManagerViewModel{");
|
|
sb.append(Integer.toHexString(System.identityHashCode(this)));
|
|
sb.append("} Fragments (");
|
|
Iterator it = this.d.values().iterator();
|
|
while (it.hasNext()) {
|
|
sb.append(it.next());
|
|
if (it.hasNext()) {
|
|
sb.append(", ");
|
|
}
|
|
}
|
|
sb.append(") Child Non Config (");
|
|
Iterator it2 = this.e.keySet().iterator();
|
|
while (it2.hasNext()) {
|
|
sb.append((String) it2.next());
|
|
if (it2.hasNext()) {
|
|
sb.append(", ");
|
|
}
|
|
}
|
|
sb.append(") ViewModelStores (");
|
|
Iterator it3 = this.f.keySet().iterator();
|
|
while (it3.hasNext()) {
|
|
sb.append((String) it3.next());
|
|
if (it3.hasNext()) {
|
|
sb.append(", ");
|
|
}
|
|
}
|
|
sb.append(')');
|
|
return sb.toString();
|
|
}
|
|
}
|