soul-browser/sources/java/com/google/android/gms/internal/location/zzbe.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

127 lines
5.2 KiB
Java

package com.google.android.gms.internal.location;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.common.util.VisibleForTesting;
import com.google.android.gms.location.Geofence;
import java.util.Locale;
@VisibleForTesting
@SafeParcelable.Class(creator = "ParcelableGeofenceCreator")
@SafeParcelable.Reserved({1000})
/* loaded from: classes3.dex */
public final class zzbe extends AbstractSafeParcelable implements Geofence {
public static final Parcelable.Creator<zzbe> CREATOR = new Object();
/* renamed from: c, reason: collision with root package name */
public final String f10357c;
public final long f;
public final short g;
public final double h;
public final double i;
public final float j;
public final int k;
public final int l;
public final int m;
public zzbe(String str, int i, short s, double d, double d2, float f, long j, int i2, int i3) {
String str2;
if (str != null && str.length() <= 100) {
if (f > 0.0f) {
if (d <= 90.0d && d >= -90.0d) {
if (d2 <= 180.0d && d2 >= -180.0d) {
int i4 = i & 7;
if (i4 != 0) {
this.g = s;
this.f10357c = str;
this.h = d;
this.i = d2;
this.j = f;
this.f = j;
this.k = i4;
this.l = i2;
this.m = i3;
return;
}
StringBuilder sb = new StringBuilder(46);
sb.append("No supported transition specified: ");
sb.append(i);
throw new IllegalArgumentException(sb.toString());
}
StringBuilder sb2 = new StringBuilder(43);
sb2.append("invalid longitude: ");
sb2.append(d2);
throw new IllegalArgumentException(sb2.toString());
}
StringBuilder sb3 = new StringBuilder(42);
sb3.append("invalid latitude: ");
sb3.append(d);
throw new IllegalArgumentException(sb3.toString());
}
StringBuilder sb4 = new StringBuilder(31);
sb4.append("invalid radius: ");
sb4.append(f);
throw new IllegalArgumentException(sb4.toString());
}
String valueOf = String.valueOf(str);
if (valueOf.length() != 0) {
str2 = "requestId is null or too long: ".concat(valueOf);
} else {
str2 = new String("requestId is null or too long: ");
}
throw new IllegalArgumentException(str2);
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof zzbe) {
zzbe zzbeVar = (zzbe) obj;
if (this.j == zzbeVar.j && this.h == zzbeVar.h && this.i == zzbeVar.i && this.g == zzbeVar.g) {
return true;
}
}
return false;
}
public final int hashCode() {
long doubleToLongBits = Double.doubleToLongBits(this.h);
long doubleToLongBits2 = Double.doubleToLongBits(this.i);
return ((((Float.floatToIntBits(this.j) + ((((((int) (doubleToLongBits ^ (doubleToLongBits >>> 32))) + 31) * 31) + ((int) (doubleToLongBits2 ^ (doubleToLongBits2 >>> 32)))) * 31)) * 31) + this.g) * 31) + this.k;
}
public final String toString() {
String str;
Locale locale = Locale.US;
short s = this.g;
if (s != -1) {
if (s != 1) {
str = "UNKNOWN";
} else {
str = "CIRCLE";
}
} else {
str = "INVALID";
}
return String.format(locale, "Geofence[%s id:%s transitions:%d %.6f, %.6f %.0fm, resp=%ds, dwell=%dms, @%d]", str, this.f10357c.replaceAll("\\p{C}", "?"), Integer.valueOf(this.k), Double.valueOf(this.h), Double.valueOf(this.i), Float.valueOf(this.j), Integer.valueOf(this.l / 1000), Integer.valueOf(this.m), Long.valueOf(this.f));
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeString(parcel, 1, this.f10357c, false);
SafeParcelWriter.writeLong(parcel, 2, this.f);
SafeParcelWriter.writeShort(parcel, 3, this.g);
SafeParcelWriter.writeDouble(parcel, 4, this.h);
SafeParcelWriter.writeDouble(parcel, 5, this.i);
SafeParcelWriter.writeFloat(parcel, 6, this.j);
SafeParcelWriter.writeInt(parcel, 7, this.k);
SafeParcelWriter.writeInt(parcel, 8, this.l);
SafeParcelWriter.writeInt(parcel, 9, this.m);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
}