* 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>
152 lines
5.8 KiB
Java
152 lines
5.8 KiB
Java
package com.google.android.gms.common.internal;
|
|
|
|
import android.content.Context;
|
|
import android.content.ServiceConnection;
|
|
import android.os.Handler;
|
|
import android.os.Looper;
|
|
import androidx.annotation.Nullable;
|
|
import com.google.android.gms.common.ConnectionResult;
|
|
import com.google.android.gms.common.stats.ConnectionTracker;
|
|
import java.util.HashMap;
|
|
import java.util.concurrent.Executor;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes.dex */
|
|
public final class zzq extends GmsClientSupervisor {
|
|
private final HashMap zzb = new HashMap();
|
|
private final Context zzc;
|
|
private volatile Handler zzd;
|
|
private final zzp zze;
|
|
private final ConnectionTracker zzf;
|
|
private final long zzg;
|
|
private final long zzh;
|
|
|
|
@Nullable
|
|
private volatile Executor zzi;
|
|
|
|
public zzq(Context context, Looper looper, @Nullable Executor executor) {
|
|
zzp zzpVar = new zzp(this, null);
|
|
this.zze = zzpVar;
|
|
this.zzc = context.getApplicationContext();
|
|
this.zzd = new com.google.android.gms.internal.common.zzg(looper, zzpVar);
|
|
this.zzf = ConnectionTracker.getInstance();
|
|
this.zzg = 5000L;
|
|
this.zzh = 300000L;
|
|
this.zzi = executor;
|
|
}
|
|
|
|
@Override // com.google.android.gms.common.internal.GmsClientSupervisor
|
|
public final ConnectionResult zza(zzn zznVar, ServiceConnection serviceConnection, String str, @Nullable Executor executor) {
|
|
ConnectionResult connectionResult;
|
|
Preconditions.checkNotNull(serviceConnection, "ServiceConnection must not be null");
|
|
HashMap hashMap = this.zzb;
|
|
synchronized (hashMap) {
|
|
try {
|
|
zzo zzoVar = (zzo) hashMap.get(zznVar);
|
|
if (executor == null) {
|
|
executor = this.zzi;
|
|
}
|
|
if (zzoVar == null) {
|
|
zzoVar = new zzo(this, zznVar);
|
|
zzoVar.zzb(serviceConnection, serviceConnection, str);
|
|
connectionResult = zzoVar.zzj(str, executor);
|
|
hashMap.put(zznVar, zzoVar);
|
|
} else {
|
|
this.zzd.removeMessages(0, zznVar);
|
|
if (!zzoVar.zzf(serviceConnection)) {
|
|
zzoVar.zzb(serviceConnection, serviceConnection, str);
|
|
int zze = zzoVar.zze();
|
|
if (zze != 1) {
|
|
if (zze == 2) {
|
|
connectionResult = zzoVar.zzj(str, executor);
|
|
}
|
|
} else {
|
|
serviceConnection.onServiceConnected(zzoVar.zzi(), zzoVar.zzh());
|
|
}
|
|
connectionResult = null;
|
|
} else {
|
|
String zznVar2 = zznVar.toString();
|
|
StringBuilder sb = new StringBuilder(zznVar2.length() + 81);
|
|
sb.append("Trying to bind a GmsServiceConnection that was already connected before. config=");
|
|
sb.append(zznVar2);
|
|
throw new IllegalStateException(sb.toString());
|
|
}
|
|
}
|
|
if (zzoVar.zzd()) {
|
|
return ConnectionResult.RESULT_SUCCESS;
|
|
}
|
|
if (connectionResult == null) {
|
|
connectionResult = new ConnectionResult(-1);
|
|
}
|
|
return connectionResult;
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.google.android.gms.common.internal.GmsClientSupervisor
|
|
public final void zzc(zzn zznVar, ServiceConnection serviceConnection, String str) {
|
|
Preconditions.checkNotNull(serviceConnection, "ServiceConnection must not be null");
|
|
HashMap hashMap = this.zzb;
|
|
synchronized (hashMap) {
|
|
try {
|
|
zzo zzoVar = (zzo) hashMap.get(zznVar);
|
|
if (zzoVar != null) {
|
|
if (zzoVar.zzf(serviceConnection)) {
|
|
zzoVar.zzc(serviceConnection, str);
|
|
if (zzoVar.zzg()) {
|
|
this.zzd.sendMessageDelayed(this.zzd.obtainMessage(0, zznVar), this.zzg);
|
|
}
|
|
} else {
|
|
String zznVar2 = zznVar.toString();
|
|
StringBuilder sb = new StringBuilder(zznVar2.length() + 76);
|
|
sb.append("Trying to unbind a GmsServiceConnection that was not bound before. config=");
|
|
sb.append(zznVar2);
|
|
throw new IllegalStateException(sb.toString());
|
|
}
|
|
} else {
|
|
String zznVar3 = zznVar.toString();
|
|
StringBuilder sb2 = new StringBuilder(zznVar3.length() + 50);
|
|
sb2.append("Nonexistent connection status for service config: ");
|
|
sb2.append(zznVar3);
|
|
throw new IllegalStateException(sb2.toString());
|
|
}
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void zzd(Looper looper) {
|
|
synchronized (this.zzb) {
|
|
this.zzd = new com.google.android.gms.internal.common.zzg(looper, this.zze);
|
|
}
|
|
}
|
|
|
|
public final void zze(@Nullable Executor executor) {
|
|
synchronized (this.zzb) {
|
|
this.zzi = executor;
|
|
}
|
|
}
|
|
|
|
public final /* synthetic */ HashMap zzf() {
|
|
return this.zzb;
|
|
}
|
|
|
|
public final /* synthetic */ Context zzg() {
|
|
return this.zzc;
|
|
}
|
|
|
|
public final /* synthetic */ Handler zzh() {
|
|
return this.zzd;
|
|
}
|
|
|
|
public final /* synthetic */ ConnectionTracker zzi() {
|
|
return this.zzf;
|
|
}
|
|
|
|
public final /* synthetic */ long zzj() {
|
|
return this.zzh;
|
|
}
|
|
}
|