soul-browser/sources/java/j$/util/Map.java
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

198 lines
7.9 KiB
Java

package j$.util;
import j$.util.concurrent.ConcurrentMap;
import java.util.ConcurrentModificationException;
import java.util.Map;
import java.util.concurrent.ConcurrentMap;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.Function;
/* loaded from: classes2.dex */
public interface Map<K, V> {
/* renamed from: j$.util.Map$-EL */
/* loaded from: classes2.dex */
public final /* synthetic */ class EL {
public static /* synthetic */ Object a(java.util.Map map, Object obj, Object obj2) {
return map instanceof Map ? ((Map) map).putIfAbsent(obj, obj2) : CC.$default$putIfAbsent(map, obj, obj2);
}
public static /* synthetic */ Object compute(java.util.Map map, Object obj, BiFunction biFunction) {
return map instanceof Map ? ((Map) map).compute(obj, biFunction) : map instanceof ConcurrentMap ? ConcurrentMap.CC.$default$compute((java.util.concurrent.ConcurrentMap) map, obj, biFunction) : CC.$default$compute(map, obj, biFunction);
}
public static /* synthetic */ Object computeIfAbsent(java.util.Map map, Object obj, Function function) {
return map instanceof Map ? ((Map) map).computeIfAbsent(obj, function) : map instanceof java.util.concurrent.ConcurrentMap ? ConcurrentMap.CC.$default$computeIfAbsent((java.util.concurrent.ConcurrentMap) map, obj, function) : CC.$default$computeIfAbsent(map, obj, function);
}
public static /* synthetic */ void forEach(java.util.Map map, BiConsumer biConsumer) {
if (map instanceof Map) {
((Map) map).forEach(biConsumer);
} else if (map instanceof java.util.concurrent.ConcurrentMap) {
ConcurrentMap.CC.$default$forEach((java.util.concurrent.ConcurrentMap) map, biConsumer);
} else {
CC.$default$forEach(map, biConsumer);
}
}
public static /* synthetic */ Object getOrDefault(java.util.Map map, Object obj, Object obj2) {
return map instanceof Map ? ((Map) map).getOrDefault(obj, obj2) : map instanceof java.util.concurrent.ConcurrentMap ? ConcurrentMap.CC.$default$getOrDefault((java.util.concurrent.ConcurrentMap) map, obj, obj2) : CC.$default$getOrDefault(map, obj, obj2);
}
public static /* synthetic */ boolean remove(java.util.Map map, Object obj, Object obj2) {
return map instanceof Map ? ((Map) map).remove(obj, obj2) : CC.$default$remove(map, obj, obj2);
}
}
V compute(K k, BiFunction<? super K, ? super V, ? extends V> biFunction);
V computeIfAbsent(K k, Function<? super K, ? extends V> function);
V computeIfPresent(K k, BiFunction<? super K, ? super V, ? extends V> biFunction);
void forEach(BiConsumer<? super K, ? super V> biConsumer);
V getOrDefault(Object obj, V v);
V merge(K k, V v, BiFunction<? super V, ? super V, ? extends V> biFunction);
V putIfAbsent(K k, V v);
boolean remove(Object obj, Object obj2);
V replace(K k, V v);
boolean replace(K k, V v, V v2);
void replaceAll(BiFunction<? super K, ? super V, ? extends V> biFunction);
/* renamed from: j$.util.Map$-CC */
/* loaded from: classes2.dex */
public final /* synthetic */ class CC {
public static Object $default$getOrDefault(java.util.Map map, Object obj, Object obj2) {
Object obj3 = map.get(obj);
return (obj3 != null || map.containsKey(obj)) ? obj3 : obj2;
}
public static void $default$forEach(java.util.Map map, BiConsumer biConsumer) {
Objects.requireNonNull(biConsumer);
for (Map.Entry<K, V> entry : map.entrySet()) {
try {
biConsumer.accept(entry.getKey(), entry.getValue());
} catch (IllegalStateException e) {
throw new ConcurrentModificationException(e);
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public static void $default$replaceAll(java.util.Map map, BiFunction biFunction) {
Objects.requireNonNull(biFunction);
for (Map.Entry<K, V> entry : map.entrySet()) {
try {
try {
entry.setValue(biFunction.apply(entry.getKey(), entry.getValue()));
} catch (IllegalStateException e) {
throw new ConcurrentModificationException(e);
}
} catch (IllegalStateException e2) {
throw new ConcurrentModificationException(e2);
}
}
}
public static Object $default$putIfAbsent(java.util.Map map, Object obj, Object obj2) {
Object obj3 = map.get(obj);
return obj3 == null ? map.put(obj, obj2) : obj3;
}
public static boolean $default$remove(java.util.Map map, Object obj, Object obj2) {
Object obj3 = map.get(obj);
if (!Objects.equals(obj3, obj2)) {
return false;
}
if (obj3 == null && !map.containsKey(obj)) {
return false;
}
map.remove(obj);
return true;
}
public static boolean $default$replace(java.util.Map map, Object obj, Object obj2, Object obj3) {
Object obj4 = map.get(obj);
if (!Objects.equals(obj4, obj2)) {
return false;
}
if (obj4 == null && !map.containsKey(obj)) {
return false;
}
map.put(obj, obj3);
return true;
}
public static Object $default$replace(java.util.Map map, Object obj, Object obj2) {
Object obj3 = map.get(obj);
return (obj3 != null || map.containsKey(obj)) ? map.put(obj, obj2) : obj3;
}
/* JADX WARN: Multi-variable type inference failed */
public static Object $default$computeIfAbsent(java.util.Map map, Object obj, Function function) {
Object apply;
Objects.requireNonNull(function);
Object obj2 = map.get(obj);
if (obj2 != null || (apply = function.apply(obj)) == null) {
return obj2;
}
map.put(obj, apply);
return apply;
}
/* JADX WARN: Multi-variable type inference failed */
public static Object $default$computeIfPresent(java.util.Map map, Object obj, BiFunction biFunction) {
Objects.requireNonNull(biFunction);
Object obj2 = map.get(obj);
if (obj2 != null) {
Object apply = biFunction.apply(obj, obj2);
if (apply != null) {
map.put(obj, apply);
return apply;
}
map.remove(obj);
}
return null;
}
/* JADX WARN: Multi-variable type inference failed */
public static Object $default$compute(java.util.Map map, Object obj, BiFunction biFunction) {
Objects.requireNonNull(biFunction);
Object obj2 = map.get(obj);
Object apply = biFunction.apply(obj, obj2);
if (apply == null) {
if (obj2 == null && !map.containsKey(obj)) {
return null;
}
map.remove(obj);
return null;
}
map.put(obj, apply);
return apply;
}
/* JADX WARN: Multi-variable type inference failed */
public static Object $default$merge(java.util.Map map, Object obj, Object obj2, BiFunction biFunction) {
Objects.requireNonNull(biFunction);
Objects.requireNonNull(obj2);
Object obj3 = map.get(obj);
if (obj3 != null) {
obj2 = biFunction.apply(obj3, obj2);
}
if (obj2 == null) {
map.remove(obj);
return obj2;
}
map.put(obj, obj2);
return obj2;
}
}
}