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

265 lines
12 KiB
Java

package kotlin;
import com.google.android.gms.ads.RequestConfiguration;
import java.util.Arrays;
import java.util.Collection;
import java.util.NoSuchElementException;
import kotlin.collections.ArraysKt;
import kotlin.jvm.JvmInline;
import kotlin.jvm.internal.CollectionToArray;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMappedMarker;
import org.jetbrains.annotations.NotNull;
@SinceKotlin(version = "1.3")
@Metadata(d1 = {"\u0000F\n\u0002\u0018\u0002\n\u0002\u0010\u001e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0016\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\b\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0010(\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\f\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0087@\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001-B\u0011\b\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0004\b\u0005\u0010\u0006B\u0011\b\u0016\u0012\u0006\u0010\u0007\u001a\u00020\\u0006\u0004\b\u0005\u0010\tJ\u0018\u0010\f\u001a\u00020\u00022\u0006\u0010\r\u001a\u00020\bH\u0086\u0002¢\u0006\u0004\b\u000e\u0010\u000fJ \u0010\u0010\u001a\u00020\u00112\u0006\u0010\r\u001a\u00020\b2\u0006\u0010\u0012\u001a\u00020\u0002H\u0086\u0002¢\u0006\u0004\b\u0013\u0010\u0014J\u0016\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u00020\u0018H\u0096\u0002¢\u0006\u0004\b\u0019\u0010\u001aJ\u0018\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u001d\u001a\u00020\u0002H\u0096\u0002¢\u0006\u0004\b\u001e\u0010\u001fJ\u001d\u0010 \u001a\u00020\u001c2\f\u0010!\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001H\u0016¢\u0006\u0004\b\"\u0010#J\u000f\u0010$\u001a\u00020\u001cH\u0016¢\u0006\u0004\b%\u0010&J\u0013\u0010'\u001a\u00020\u001c2\b\u0010(\u001a\u0004\u0018\u00010)HÖ\u0003J\t\u0010*\u001a\u00020\bHÖ\u0001J\t\u0010+\u001a\u00020,HÖ\u0001R\u0016\u0010\u0003\u001a\u00020\u00048\u0000X\u0081\u0004¢\u0006\b\n\u0000\u0012\u0004\b\n\u0010\u000bR\u0014\u0010\u0007\u001a\u00020\b8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0015\u0010\u0016\u0088\u0001\u0003\u0092\u0001\u00020\u0004¨\u0006."}, d2 = {"Lkotlin/ULongArray;", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "Lkotlin/ULong;", "storage", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "constructor-impl", "([J)[J", "size", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "(I)[J", "getStorage$annotations", "()V", "get", "index", "get-s-VKNKU", "([JI)J", "set", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "value", "set-k8EXiF4", "([JIJ)V", "getSize-impl", "([J)I", "iterator", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "iterator-impl", "([J)Ljava/util/Iterator;", "contains", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "element", "contains-VKZWuLQ", "([JJ)Z", "containsAll", "elements", "containsAll-impl", "([JLjava/util/Collection;)Z", "isEmpty", "isEmpty-impl", "([J)Z", "equals", "other", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "hashCode", "toString", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "Iterator", "kotlin-stdlib"}, k = 1, mv = {2, 2, 0}, xi = 48)
@ExperimentalUnsignedTypes
@JvmInline
@SourceDebugExtension({"SMAP\nULongArray.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ULongArray.kt\nkotlin/ULongArray\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,82:1\n1740#2,3:83\n*S KotlinDebug\n*F\n+ 1 ULongArray.kt\nkotlin/ULongArray\n*L\n58#1:83,3\n*E\n"})
/* loaded from: classes3.dex */
public final class ULongArray implements Collection<ULong>, KMappedMarker {
@NotNull
private final long[] storage;
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010(\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0016\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004\b\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u000f\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0004\b\u0005\u0010\u0006J\t\u0010\t\u001a\u00020\nH\u0096\u0002J\u0010\u0010\u000b\u001a\u00020\u0002H\u0096\u0002¢\u0006\u0004\b\f\u0010\rR\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lkotlin/ULongArray$Iterator;", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "Lkotlin/ULong;", "array", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "<init>", "([J)V", "index", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "hasNext", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "next", "next-s-VKNKU", "()J", "kotlin-stdlib"}, k = 1, mv = {2, 2, 0}, xi = 48)
/* loaded from: classes3.dex */
public static final class Iterator implements java.util.Iterator<ULong>, KMappedMarker {
@NotNull
private final long[] array;
private int index;
public Iterator(@NotNull long[] array) {
Intrinsics.checkNotNullParameter(array, "array");
this.array = array;
}
@Override // java.util.Iterator
public boolean hasNext() {
if (this.index < this.array.length) {
return true;
}
return false;
}
@Override // java.util.Iterator
public /* bridge */ /* synthetic */ ULong next() {
return ULong.m198boximpl(m274nextsVKNKU());
}
/* renamed from: next-s-VKNKU */
public long m274nextsVKNKU() {
int i = this.index;
long[] jArr = this.array;
if (i < jArr.length) {
this.index = i + 1;
return ULong.m204constructorimpl(jArr[i]);
}
throw new NoSuchElementException(String.valueOf(this.index));
}
@Override // java.util.Iterator
public void remove() {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
}
@PublishedApi
private /* synthetic */ ULongArray(long[] jArr) {
this.storage = jArr;
}
/* renamed from: box-impl */
public static final /* synthetic */ ULongArray m257boximpl(long[] jArr) {
return new ULongArray(jArr);
}
@PublishedApi
@NotNull
/* renamed from: constructor-impl */
public static long[] m259constructorimpl(@NotNull long[] storage) {
Intrinsics.checkNotNullParameter(storage, "storage");
return storage;
}
/* renamed from: containsAll-impl */
public static boolean m261containsAllimpl(long[] jArr, @NotNull Collection<ULong> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
if (elements.isEmpty()) {
return true;
}
for (Object obj : elements) {
if (!(obj instanceof ULong) || !ArraysKt.contains(jArr, ((ULong) obj).getData())) {
return false;
}
}
return true;
}
/* renamed from: equals-impl */
public static boolean m262equalsimpl(long[] jArr, Object obj) {
return (obj instanceof ULongArray) && Intrinsics.areEqual(jArr, ((ULongArray) obj).getStorage());
}
/* renamed from: equals-impl0 */
public static final boolean m263equalsimpl0(long[] jArr, long[] jArr2) {
return Intrinsics.areEqual(jArr, jArr2);
}
/* renamed from: get-s-VKNKU */
public static final long m264getsVKNKU(long[] jArr, int i) {
return ULong.m204constructorimpl(jArr[i]);
}
/* renamed from: getSize-impl */
public static int m265getSizeimpl(long[] jArr) {
return jArr.length;
}
@PublishedApi
public static /* synthetic */ void getStorage$annotations() {
}
/* renamed from: hashCode-impl */
public static int m266hashCodeimpl(long[] jArr) {
return Arrays.hashCode(jArr);
}
/* renamed from: isEmpty-impl */
public static boolean m267isEmptyimpl(long[] jArr) {
if (jArr.length == 0) {
return true;
}
return false;
}
@NotNull
/* renamed from: iterator-impl */
public static java.util.Iterator<ULong> m268iteratorimpl(long[] jArr) {
return new Iterator(jArr);
}
/* renamed from: set-k8EXiF4 */
public static final void m269setk8EXiF4(long[] jArr, int i, long j) {
jArr[i] = j;
}
/* renamed from: toString-impl */
public static String m270toStringimpl(long[] jArr) {
return "ULongArray(storage=" + Arrays.toString(jArr) + ')';
}
@Override // java.util.Collection
public /* bridge */ /* synthetic */ boolean add(ULong uLong) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
/* renamed from: add-VKZWuLQ */
public boolean m271addVKZWuLQ(long j) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean addAll(Collection<? extends ULong> collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public void clear() {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public final /* bridge */ boolean contains(Object obj) {
if (!(obj instanceof ULong)) {
return false;
}
return m272containsVKZWuLQ(((ULong) obj).getData());
}
/* renamed from: contains-VKZWuLQ */
public boolean m272containsVKZWuLQ(long j) {
return m260containsVKZWuLQ(this.storage, j);
}
@Override // java.util.Collection
public boolean containsAll(@NotNull Collection<?> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return m261containsAllimpl(this.storage, elements);
}
@Override // java.util.Collection
public boolean equals(Object other) {
return m262equalsimpl(this.storage, other);
}
@Override // java.util.Collection
/* renamed from: getSize */
public int size() {
return m265getSizeimpl(this.storage);
}
@Override // java.util.Collection
public int hashCode() {
return m266hashCodeimpl(this.storage);
}
@Override // java.util.Collection
public boolean isEmpty() {
return m267isEmptyimpl(this.storage);
}
@Override // java.util.Collection, java.lang.Iterable
@NotNull
public java.util.Iterator<ULong> iterator() {
return m268iteratorimpl(this.storage);
}
@Override // java.util.Collection
public boolean remove(Object obj) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean removeAll(Collection<?> collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean retainAll(Collection<?> collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public Object[] toArray() {
return CollectionToArray.toArray(this);
}
public String toString() {
return m270toStringimpl(this.storage);
}
/* renamed from: unbox-impl, reason: from getter */
public final /* synthetic */ long[] getStorage() {
return this.storage;
}
@NotNull
/* renamed from: constructor-impl */
public static long[] m258constructorimpl(int i) {
return m259constructorimpl(new long[i]);
}
/* renamed from: contains-VKZWuLQ */
public static boolean m260containsVKZWuLQ(long[] jArr, long j) {
return ArraysKt.contains(jArr, j);
}
@Override // java.util.Collection
public <T> T[] toArray(T[] array) {
Intrinsics.checkNotNullParameter(array, "array");
return (T[]) CollectionToArray.toArray(this, array);
}
}