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

133 lines
8.4 KiB
Java

package kotlin.collections;
import com.google.android.gms.ads.RequestConfiguration;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;
import kotlin.Metadata;
import kotlin.internal.InlineOnly;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.Sequence;
import org.jetbrains.annotations.NotNull;
@Metadata(d1 = {"\u0000\u001c\n\u0000\n\u0002\u0010\"\n\u0002\b\u0004\n\u0002\u0010\u0011\n\u0000\n\u0002\u0010\u001c\n\u0002\u0018\u0002\n\u0002\b\u0004\u001a,\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\u0006\u0010\u0003\u001a\u0002H\u0002H\u0086\u0002¢\u0006\u0002\u0010\u0004\u001a4\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\u000e\u0010\u0005\u001a\n\u0012\u0006\b\u0001\u0012\u0002H\u00020\u0006H\u0086\u0002¢\u0006\u0002\u0010\u0007\u001a-\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00020\bH\u0086\u0002\u001a-\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00020\tH\u0086\u0002\u001a,\u0010\n\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\u0006\u0010\u0003\u001a\u0002H\u0002H\u0087\\u0006\u0002\u0010\u0004\u001a,\u0010\u000b\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\u0006\u0010\u0003\u001a\u0002H\u0002H\u0086\u0002¢\u0006\u0002\u0010\u0004\u001a4\u0010\u000b\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\u000e\u0010\u0005\u001a\n\u0012\u0006\b\u0001\u0012\u0002H\u00020\u0006H\u0086\u0002¢\u0006\u0002\u0010\u0007\u001a-\u0010\u000b\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00020\bH\u0086\u0002\u001a-\u0010\u000b\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00020\tH\u0086\u0002\u001a,\u0010\f\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00012\u0006\u0010\u0003\u001a\u0002H\u0002H\u0087\\u0006\u0002\u0010\u0004¨\u0006\r"}, d2 = {"minus", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, RequestConfiguration.MAX_AD_CONTENT_RATING_T, "element", "(Ljava/util/Set;Ljava/lang/Object;)Ljava/util/Set;", "elements", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "(Ljava/util/Set;[Ljava/lang/Object;)Ljava/util/Set;", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "Lkotlin/sequences/Sequence;", "minusElement", "plus", "plusElement", "kotlin-stdlib"}, k = 5, mv = {2, 2, 0}, xi = 49, xs = "kotlin/collections/SetsKt")
@SourceDebugExtension({"SMAP\n_Sets.kt\nKotlin\n*S Kotlin\n*F\n+ 1 _Sets.kt\nkotlin/collections/SetsKt___SetsKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,140:1\n865#2,2:141\n855#2,2:143\n1#3:145\n*S KotlinDebug\n*F\n+ 1 _Sets.kt\nkotlin/collections/SetsKt___SetsKt\n*L\n29#1:141,2\n53#1:143,2\n*E\n"})
/* loaded from: classes3.dex */
class SetsKt___SetsKt extends SetsKt__SetsKt {
@NotNull
public static final <T> Set<T> minus(@NotNull Set<? extends T> set, T t) {
Intrinsics.checkNotNullParameter(set, "<this>");
LinkedHashSet linkedHashSet = new LinkedHashSet(MapsKt__MapsJVMKt.mapCapacity(set.size()));
boolean z = false;
for (T t2 : set) {
boolean z2 = true;
if (!z && Intrinsics.areEqual(t2, t)) {
z = true;
z2 = false;
}
if (z2) {
linkedHashSet.add(t2);
}
}
return linkedHashSet;
}
@InlineOnly
private static final <T> Set<T> minusElement(Set<? extends T> set, T t) {
Intrinsics.checkNotNullParameter(set, "<this>");
return minus(set, t);
}
@NotNull
public static final <T> Set<T> plus(@NotNull Set<? extends T> set, T t) {
Intrinsics.checkNotNullParameter(set, "<this>");
LinkedHashSet linkedHashSet = new LinkedHashSet(MapsKt__MapsJVMKt.mapCapacity(set.size() + 1));
linkedHashSet.addAll(set);
linkedHashSet.add(t);
return linkedHashSet;
}
@InlineOnly
private static final <T> Set<T> plusElement(Set<? extends T> set, T t) {
Intrinsics.checkNotNullParameter(set, "<this>");
return plus(set, t);
}
@NotNull
public static final <T> Set<T> plus(@NotNull Set<? extends T> set, @NotNull T[] elements) {
Intrinsics.checkNotNullParameter(set, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
LinkedHashSet linkedHashSet = new LinkedHashSet(MapsKt__MapsJVMKt.mapCapacity(set.size() + elements.length));
linkedHashSet.addAll(set);
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, elements);
return linkedHashSet;
}
@NotNull
public static final <T> Set<T> minus(@NotNull Set<? extends T> set, @NotNull T[] elements) {
Intrinsics.checkNotNullParameter(set, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
LinkedHashSet linkedHashSet = new LinkedHashSet(set);
CollectionsKt__MutableCollectionsKt.removeAll(linkedHashSet, elements);
return linkedHashSet;
}
@NotNull
public static final <T> Set<T> minus(@NotNull Set<? extends T> set, @NotNull Iterable<? extends T> elements) {
Intrinsics.checkNotNullParameter(set, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
Collection<?> convertToListIfNotCollection = CollectionsKt__MutableCollectionsKt.convertToListIfNotCollection(elements);
if (convertToListIfNotCollection.isEmpty()) {
return CollectionsKt___CollectionsKt.toSet(set);
}
if (convertToListIfNotCollection instanceof Set) {
LinkedHashSet linkedHashSet = new LinkedHashSet();
for (T t : set) {
if (!((Set) convertToListIfNotCollection).contains(t)) {
linkedHashSet.add(t);
}
}
return linkedHashSet;
}
LinkedHashSet linkedHashSet2 = new LinkedHashSet(set);
linkedHashSet2.removeAll(convertToListIfNotCollection);
return linkedHashSet2;
}
@NotNull
public static final <T> Set<T> plus(@NotNull Set<? extends T> set, @NotNull Iterable<? extends T> elements) {
int size;
Intrinsics.checkNotNullParameter(set, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
Integer collectionSizeOrNull = CollectionsKt__IterablesKt.collectionSizeOrNull(elements);
if (collectionSizeOrNull != null) {
size = set.size() + collectionSizeOrNull.intValue();
} else {
size = set.size() * 2;
}
LinkedHashSet linkedHashSet = new LinkedHashSet(MapsKt__MapsJVMKt.mapCapacity(size));
linkedHashSet.addAll(set);
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, elements);
return linkedHashSet;
}
@NotNull
public static final <T> Set<T> plus(@NotNull Set<? extends T> set, @NotNull Sequence<? extends T> elements) {
Intrinsics.checkNotNullParameter(set, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
LinkedHashSet linkedHashSet = new LinkedHashSet(MapsKt__MapsJVMKt.mapCapacity(set.size() * 2));
linkedHashSet.addAll(set);
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, elements);
return linkedHashSet;
}
@NotNull
public static final <T> Set<T> minus(@NotNull Set<? extends T> set, @NotNull Sequence<? extends T> elements) {
Intrinsics.checkNotNullParameter(set, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
LinkedHashSet linkedHashSet = new LinkedHashSet(set);
CollectionsKt__MutableCollectionsKt.removeAll(linkedHashSet, elements);
return linkedHashSet;
}
}