soul-browser/sources/java/com/google/common/collect/DescendingMultiset.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

151 lines
5.3 KiB
Java

package com.google.common.collect;
import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.Multiset;
import com.google.common.collect.Multisets;
import com.google.common.collect.SortedMultisets;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.NavigableSet;
import java.util.Set;
@GwtCompatible
/* loaded from: classes3.dex */
abstract class DescendingMultiset<E> extends ForwardingMultiset<E> implements SortedMultiset<E> {
/* renamed from: c, reason: collision with root package name */
public transient Ordering f12273c;
public transient NavigableSet f;
public transient Set g;
public abstract Iterator B0();
public abstract SortedMultiset C0();
@Override // com.google.common.collect.SortedMultiset
public final SortedMultiset F0(Object obj, BoundType boundType, Object obj2, BoundType boundType2) {
return C0().F0(obj2, boundType2, obj, boundType).z();
}
@Override // com.google.common.collect.SortedMultiset
public final SortedMultiset L(Object obj, BoundType boundType) {
return ((TreeMultiset) C0()).a0(obj, boundType).z();
}
@Override // com.google.common.collect.SortedMultiset
public final SortedMultiset a0(Object obj, BoundType boundType) {
return ((TreeMultiset) C0()).L(obj, boundType).z();
}
@Override // com.google.common.collect.SortedMultiset, com.google.common.collect.SortedIterable
public final Comparator comparator() {
Ordering ordering = this.f12273c;
if (ordering == null) {
Ordering g = Ordering.b(C0().comparator()).g();
this.f12273c = g;
return g;
}
return ordering;
}
@Override // com.google.common.collect.ForwardingMultiset, com.google.common.collect.ForwardingCollection, com.google.common.collect.ForwardingObject
public final Object e0() {
return C0();
}
@Override // com.google.common.collect.ForwardingMultiset, com.google.common.collect.Multiset
public final Set entrySet() {
Set set = this.g;
if (set == null) {
Multisets.EntrySet<Object> entrySet = new Multisets.EntrySet<Object>() { // from class: com.google.common.collect.DescendingMultiset.1EntrySetImpl
@Override // com.google.common.collect.Multisets.EntrySet
public final Multiset a() {
return DescendingMultiset.this;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
public final Iterator iterator() {
return DescendingMultiset.this.B0();
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
public final int size() {
return DescendingMultiset.this.C0().entrySet().size();
}
};
this.g = entrySet;
return entrySet;
}
return set;
}
@Override // com.google.common.collect.SortedMultiset
public final Multiset.Entry firstEntry() {
return C0().lastEntry();
}
@Override // com.google.common.collect.ForwardingMultiset, com.google.common.collect.ForwardingCollection
/* renamed from: h0 */
public final Collection e0() {
return C0();
}
@Override // com.google.common.collect.ForwardingCollection, java.util.Collection, java.lang.Iterable, java.util.Set
public Iterator iterator() {
return Multisets.b(this);
}
@Override // com.google.common.collect.SortedMultiset
public final Multiset.Entry lastEntry() {
return C0().firstEntry();
}
@Override // com.google.common.collect.SortedMultiset
public final Multiset.Entry pollFirstEntry() {
return C0().pollLastEntry();
}
@Override // com.google.common.collect.SortedMultiset
public final Multiset.Entry pollLastEntry() {
return C0().pollFirstEntry();
}
@Override // com.google.common.collect.ForwardingCollection, java.util.Collection, java.util.Set
public final Object[] toArray() {
return n0();
}
@Override // com.google.common.collect.ForwardingObject
public final String toString() {
return entrySet().toString();
}
@Override // com.google.common.collect.ForwardingMultiset
/* renamed from: y0 */
public final Multiset e0() {
return C0();
}
@Override // com.google.common.collect.SortedMultiset
public final SortedMultiset z() {
return C0();
}
/* JADX WARN: Type inference failed for: r0v1, types: [java.util.NavigableSet, com.google.common.collect.SortedMultisets$ElementSet] */
@Override // com.google.common.collect.ForwardingMultiset, com.google.common.collect.Multiset
public final NavigableSet j() {
NavigableSet navigableSet = this.f;
if (navigableSet != null) {
return navigableSet;
}
?? elementSet = new SortedMultisets.ElementSet(this);
this.f = elementSet;
return elementSet;
}
@Override // com.google.common.collect.ForwardingCollection, java.util.Collection, java.util.Set
public final Object[] toArray(Object[] objArr) {
return ObjectArrays.c(this, objArr);
}
}