soul-browser/sources/java/kotlin/collections/AbstractMap.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

324 lines
15 KiB
Java

package kotlin.collections;
import com.google.android.gms.ads.RequestConfiguration;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import kotlin.Metadata;
import kotlin.SinceKotlin;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMappedMarker;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@SinceKotlin(version = "1.1")
@Metadata(d1 = {"\u0000H\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010$\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0010&\n\u0002\b\u0003\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\"\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u001e\n\u0002\b\u0007\b'\u0018\u0000 **\u0004\b\u0000\u0010\u0001*\u0006\b\u0001\u0010\u0002 \u00012\u000e\u0012\u0004\u0012\u0002H\u0001\u0012\u0004\u0012\u0002H\u00020\u0003:\u0001*B\t\b\u0004¢\u0006\u0004\b\u0004\u0010\u0005J\u0015\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00028\u0000H\u0016¢\u0006\u0002\u0010\tJ\u0015\u0010\n\u001a\u00020\u00072\u0006\u0010\u000b\u001a\u00028\u0001H\u0016¢\u0006\u0002\u0010\tJ\u001f\u0010\f\u001a\u00020\u00072\u0010\u0010\r\u001a\f\u0012\u0002\b\u0003\u0012\u0002\b\u0003\u0018\u00010\u000eH\u0000¢\u0006\u0002\b\u000fJ\u0013\u0010\u0010\u001a\u00020\u00072\b\u0010\u0011\u001a\u0004\u0018\u00010\u0012H\u0096\u0002J\u0018\u0010\u0013\u001a\u0004\u0018\u00018\u00012\u0006\u0010\b\u001a\u00028\u0000H\u0096\u0002¢\u0006\u0002\u0010\u0014J\b\u0010\u0015\u001a\u00020\u0016H\u0016J\b\u0010\u0017\u001a\u00020\u0007H\u0016J\b\u0010 \u001a\u00020!H\u0016J\u001c\u0010 \u001a\u00020!2\u0012\u0010\r\u001a\u000e\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u00010\u000eH\u0002J\u0012\u0010 \u001a\u00020!2\b\u0010\"\u001a\u0004\u0018\u00010\u0012H\u0002J#\u0010(\u001a\u0010\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0018\u00010\u000e2\u0006\u0010\b\u001a\u00028\u0000H\u0002¢\u0006\u0002\u0010)R\u0014\u0010\u0018\u001a\u00020\u00168VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0019\u0010\u001aR\u001a\u0010\u001b\u001a\b\u0012\u0004\u0012\u00028\u00000\u001c8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u001d\u0010\u001eR\u0016\u0010\u001f\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u001cX\u0082\u000e¢\u0006\u0002\n\u0000R\u001a\u0010#\u001a\b\u0012\u0004\u0012\u00028\u00010$8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b%\u0010&R\u0016\u0010'\u001a\n\u0012\u0004\u0012\u00028\u0001\u0018\u00010$X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006+"}, d2 = {"Lkotlin/collections/AbstractMap;", "K", "V", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "<init>", "()V", "containsKey", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "key", "(Ljava/lang/Object;)Z", "containsValue", "value", "containsEntry", "entry", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "containsEntry$kotlin_stdlib", "equals", "other", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "get", "(Ljava/lang/Object;)Ljava/lang/Object;", "hashCode", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "isEmpty", "size", "getSize", "()I", "keys", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "getKeys", "()Ljava/util/Set;", "_keys", "toString", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "o", "values", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "getValues", "()Ljava/util/Collection;", "_values", "implFindEntry", "(Ljava/lang/Object;)Ljava/util/Map$Entry;", "Companion", "kotlin-stdlib"}, k = 1, mv = {2, 2, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nAbstractMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AbstractMap.kt\nkotlin/collections/AbstractMap\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,153:1\n1761#2,3:154\n1740#2,3:157\n295#2,2:160\n*S KotlinDebug\n*F\n+ 1 AbstractMap.kt\nkotlin/collections/AbstractMap\n*L\n28#1:154,3\n60#1:157,3\n141#1:160,2\n*E\n"})
/* loaded from: classes3.dex */
public abstract class AbstractMap<K, V> implements Map<K, V>, KMappedMarker {
/* renamed from: Companion, reason: from kotlin metadata */
@NotNull
public static final Companion INSTANCE = new Companion(null);
@Nullable
private volatile Set<? extends K> _keys;
@Nullable
private volatile Collection<? extends V> _values;
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010&\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0003\b\u0080\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J\u001d\u0010\u0004\u001a\u00020\u00052\u000e\u0010\u0006\u001a\n\u0012\u0002\b\u0003\u0012\u0002\b\u00030\u0007H\u0000¢\u0006\u0002\b\bJ\u001d\u0010\t\u001a\u00020\n2\u000e\u0010\u0006\u001a\n\u0012\u0002\b\u0003\u0012\u0002\b\u00030\u0007H\u0000¢\u0006\u0002\b\u000bJ'\u0010\f\u001a\u00020\r2\u000e\u0010\u0006\u001a\n\u0012\u0002\b\u0003\u0012\u0002\b\u00030\u00072\b\u0010\u000e\u001a\u0004\u0018\u00010\u0001H\u0000¢\u0006\u0002\b\u000f¨\u0006\u0010"}, d2 = {"Lkotlin/collections/AbstractMap$Companion;", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "<init>", "()V", "entryHashCode", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "e", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "entryHashCode$kotlin_stdlib", "entryToString", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "entryToString$kotlin_stdlib", "entryEquals", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "other", "entryEquals$kotlin_stdlib", "kotlin-stdlib"}, k = 1, mv = {2, 2, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nAbstractMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AbstractMap.kt\nkotlin/collections/AbstractMap$Companion\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,153:1\n1#2:154\n*E\n"})
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final boolean entryEquals$kotlin_stdlib(@NotNull Map.Entry<?, ?> e, @Nullable Object other) {
Intrinsics.checkNotNullParameter(e, "e");
if (!(other instanceof Map.Entry)) {
return false;
}
Map.Entry entry = (Map.Entry) other;
if (!Intrinsics.areEqual(e.getKey(), entry.getKey()) || !Intrinsics.areEqual(e.getValue(), entry.getValue())) {
return false;
}
return true;
}
public final int entryHashCode$kotlin_stdlib(@NotNull Map.Entry<?, ?> e) {
int i;
Intrinsics.checkNotNullParameter(e, "e");
Object key = e.getKey();
int i2 = 0;
if (key != null) {
i = key.hashCode();
} else {
i = 0;
}
Object value = e.getValue();
if (value != null) {
i2 = value.hashCode();
}
return i ^ i2;
}
@NotNull
public final String entryToString$kotlin_stdlib(@NotNull Map.Entry<?, ?> e) {
Intrinsics.checkNotNullParameter(e, "e");
StringBuilder sb = new StringBuilder();
sb.append(e.getKey());
sb.append('=');
sb.append(e.getValue());
return sb.toString();
}
private Companion() {
}
}
private final Map.Entry<K, V> implFindEntry(K key) {
Object obj;
Iterator<T> it = entrySet().iterator();
while (true) {
if (it.hasNext()) {
obj = it.next();
if (Intrinsics.areEqual(((Map.Entry) obj).getKey(), key)) {
break;
}
} else {
obj = null;
break;
}
}
return (Map.Entry) obj;
}
public static final CharSequence toString$lambda$0(AbstractMap abstractMap, Map.Entry it) {
Intrinsics.checkNotNullParameter(it, "it");
return abstractMap.toString(it);
}
@Override // java.util.Map
public void clear() {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
public final boolean containsEntry$kotlin_stdlib(@Nullable Map.Entry<?, ?> entry) {
if (entry == null) {
return false;
}
Object key = entry.getKey();
Object value = entry.getValue();
Intrinsics.checkNotNull(this, "null cannot be cast to non-null type kotlin.collections.Map<K of kotlin.collections.MapsKt__MapsKt.get, V of kotlin.collections.MapsKt__MapsKt.get>");
V v = get(key);
if (!Intrinsics.areEqual(value, v)) {
return false;
}
if (v == null) {
Intrinsics.checkNotNull(this, "null cannot be cast to non-null type kotlin.collections.Map<K of kotlin.collections.MapsKt__MapsKt.containsKey, *>");
if (!containsKey(key)) {
return false;
}
return true;
}
return true;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Map
public boolean containsKey(Object key) {
if (implFindEntry(key) != null) {
return true;
}
return false;
}
@Override // java.util.Map
public boolean containsValue(Object value) {
Set<Map.Entry<K, V>> entrySet = entrySet();
if (entrySet == null || !entrySet.isEmpty()) {
Iterator<T> it = entrySet.iterator();
while (it.hasNext()) {
if (Intrinsics.areEqual(((Map.Entry) it.next()).getValue(), value)) {
return true;
}
}
return false;
}
return false;
}
@Override // java.util.Map
public final /* bridge */ Set<Map.Entry<K, V>> entrySet() {
return getEntries();
}
@Override // java.util.Map
public boolean equals(@Nullable Object other) {
if (other != this) {
if (other instanceof Map) {
Map map = (Map) other;
if (size() == map.size()) {
Set<Map.Entry<K, V>> entrySet = map.entrySet();
if (entrySet == null || !entrySet.isEmpty()) {
Iterator<T> it = entrySet.iterator();
while (it.hasNext()) {
if (!containsEntry$kotlin_stdlib((Map.Entry) it.next())) {
return false;
}
}
return true;
}
return true;
}
return false;
}
return false;
}
return true;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Map
@Nullable
public V get(Object key) {
Map.Entry<K, V> implFindEntry = implFindEntry(key);
if (implFindEntry != null) {
return implFindEntry.getValue();
}
return null;
}
public abstract Set<Map.Entry<K, V>> getEntries();
@NotNull
public Set<K> getKeys() {
if (this._keys == null) {
this._keys = new AbstractSet<K>(this) { // from class: kotlin.collections.AbstractMap$keys$1
final /* synthetic */ AbstractMap<K, V> this$0;
/* JADX WARN: Multi-variable type inference failed */
{
this.this$0 = this;
}
@Override // kotlin.collections.AbstractCollection, java.util.Collection, java.util.List
public boolean contains(Object element) {
return this.this$0.containsKey(element);
}
@Override // kotlin.collections.AbstractCollection
/* renamed from: getSize */
public int get_size() {
return this.this$0.size();
}
@Override // kotlin.collections.AbstractSet, kotlin.collections.AbstractCollection, java.util.Collection, java.lang.Iterable
public Iterator<K> iterator() {
return new AbstractMap$keys$1$iterator$1(this.this$0.entrySet().iterator());
}
};
}
Set<? extends K> set = this._keys;
Intrinsics.checkNotNull(set);
return set;
}
public int getSize() {
return entrySet().size();
}
@NotNull
public Collection<V> getValues() {
if (this._values == null) {
this._values = new AbstractCollection<V>(this) { // from class: kotlin.collections.AbstractMap$values$1
final /* synthetic */ AbstractMap<K, V> this$0;
/* JADX WARN: Multi-variable type inference failed */
{
this.this$0 = this;
}
@Override // kotlin.collections.AbstractCollection, java.util.Collection, java.util.List
public boolean contains(Object element) {
return this.this$0.containsValue(element);
}
@Override // kotlin.collections.AbstractCollection
/* renamed from: getSize */
public int get_size() {
return this.this$0.size();
}
@Override // kotlin.collections.AbstractCollection, java.util.Collection, java.lang.Iterable
public Iterator<V> iterator() {
return new AbstractMap$values$1$iterator$1(this.this$0.entrySet().iterator());
}
};
}
Collection<? extends V> collection = this._values;
Intrinsics.checkNotNull(collection);
return collection;
}
@Override // java.util.Map
public int hashCode() {
return entrySet().hashCode();
}
@Override // java.util.Map
public boolean isEmpty() {
if (size() == 0) {
return true;
}
return false;
}
@Override // java.util.Map
public final /* bridge */ Set<K> keySet() {
return getKeys();
}
@Override // java.util.Map
public V put(K k, V v) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Map
public void putAll(Map<? extends K, ? extends V> map) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Map
public V remove(Object obj) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Map
public final /* bridge */ int size() {
return getSize();
}
@NotNull
public String toString() {
return CollectionsKt___CollectionsKt.joinToString$default(entrySet(), ", ", "{", "}", 0, null, new a(this, 1), 24, null);
}
@Override // java.util.Map
public final /* bridge */ Collection<V> values() {
return getValues();
}
private final String toString(Map.Entry<? extends K, ? extends V> entry) {
return toString(entry.getKey()) + '=' + toString(entry.getValue());
}
private final String toString(Object o) {
return o == this ? "(this Map)" : String.valueOf(o);
}
}