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

203 lines
5.9 KiB
Java

package com.google.common.collect;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import com.google.common.base.Supplier;
import com.google.common.collect.Maps;
import com.google.common.collect.StandardTable;
import java.io.Serializable;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
@GwtCompatible
/* loaded from: classes3.dex */
public class TreeBasedTable<R, C, V> extends StandardRowSortedTable<R, C, V> {
/* renamed from: com.google.common.collect.TreeBasedTable$1, reason: invalid class name */
/* loaded from: classes3.dex */
class AnonymousClass1 extends AbstractIterator<Object> {
public Object g;
@Override // com.google.common.collect.AbstractIterator
public final Object a() {
throw null;
}
}
/* loaded from: classes3.dex */
public static final class Factory<C, V> implements Supplier<Map<C, V>>, Serializable {
@Override // com.google.common.base.Supplier
public final Object get() {
return new TreeMap((Comparator) null);
}
}
/* loaded from: classes3.dex */
public final class TreeRow extends StandardTable<R, C, V>.Row implements SortedMap<C, V> {
public final Object h;
public final Object i;
public TreeRow(Object obj, Object obj2, Object obj3) {
super(obj);
this.h = obj2;
this.i = obj3;
if (obj2 != null && obj3 != null) {
comparator();
throw null;
}
}
@Override // com.google.common.collect.StandardTable.Row
public final Map b() {
f();
return null;
}
@Override // com.google.common.collect.StandardTable.Row
public final void c() {
f();
}
@Override // java.util.SortedMap
public final Comparator comparator() {
TreeBasedTable.this.getClass();
return null;
}
@Override // com.google.common.collect.StandardTable.Row, java.util.AbstractMap, java.util.Map
public final boolean containsKey(Object obj) {
if (e(obj) && super.containsKey(obj)) {
return true;
}
return false;
}
public final boolean e(Object obj) {
if (obj != null) {
if (this.h == null) {
if (this.i == null) {
return true;
}
comparator();
throw null;
}
comparator();
throw null;
}
return false;
}
public final void f() {
throw null;
}
@Override // java.util.SortedMap
public final Object firstKey() {
d();
Map map = this.f;
if (map != null) {
return ((SortedMap) map).firstKey();
}
throw new NoSuchElementException();
}
@Override // java.util.SortedMap
public final SortedMap headMap(Object obj) {
obj.getClass();
Preconditions.d(e(obj));
return new TreeRow(this.f12401c, this.h, obj);
}
@Override // java.util.AbstractMap, java.util.Map, java.util.SortedMap
public final Set keySet() {
return new Maps.KeySet(this);
}
@Override // java.util.SortedMap
public final Object lastKey() {
d();
Map map = this.f;
if (map != null) {
return ((SortedMap) map).lastKey();
}
throw new NoSuchElementException();
}
@Override // com.google.common.collect.StandardTable.Row, java.util.AbstractMap, java.util.Map
public final Object put(Object obj, Object obj2) {
obj.getClass();
Preconditions.d(e(obj));
return super.put(obj, obj2);
}
@Override // java.util.SortedMap
public final SortedMap subMap(Object obj, Object obj2) {
boolean z;
obj.getClass();
if (e(obj)) {
obj2.getClass();
if (e(obj2)) {
z = true;
Preconditions.d(z);
return new TreeRow(this.f12401c, obj, obj2);
}
}
z = false;
Preconditions.d(z);
return new TreeRow(this.f12401c, obj, obj2);
}
@Override // java.util.SortedMap
public final SortedMap tailMap(Object obj) {
obj.getClass();
Preconditions.d(e(obj));
return new TreeRow(this.f12401c, obj, this.i);
}
}
@Override // com.google.common.collect.StandardTable, com.google.common.collect.AbstractTable
public final void b() {
throw null;
}
@Override // com.google.common.collect.StandardTable
public final Map g(Object obj) {
return new StandardTable.Column(obj);
}
@Override // com.google.common.collect.StandardTable
public final boolean j(Object obj) {
if (obj == null) {
return false;
}
throw null;
}
@Override // com.google.common.collect.StandardTable
public final boolean k(Object obj) {
if (obj == null) {
return false;
}
throw null;
}
@Override // com.google.common.collect.StandardTable
public final Iterator l() {
throw null;
}
@Override // com.google.common.collect.StandardTable
public final Map q(Object obj) {
return new TreeRow(obj, null, null);
}
@Override // com.google.common.collect.StandardTable, com.google.common.collect.Table
public final int size() {
throw null;
}
}