Files
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

170 lines
7.3 KiB
Java
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.google.android.gms.common;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.RemoteException;
import android.os.StrictMode;
import android.util.Log;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.zzaf;
import com.google.android.gms.common.internal.zzag;
import com.google.android.gms.common.util.AndroidUtilsLight;
import com.google.android.gms.common.util.Hex;
import com.google.android.gms.dynamic.ObjectWrapper;
import com.google.android.gms.dynamite.DynamiteModule;
import java.security.MessageDigest;
import java.util.concurrent.Callable;
/* loaded from: classes2.dex */
final class zzn {
private static volatile zzag zze;
private static Context zzg;
static final zzl zza = new zzf(zzj.zze("0\u0082\u0005È0\u0082\u0003° \u0003\u0002\u0001\u0002\u0002\u0014\u0010\u008ae\bsù/\u008eQí"));
static final zzl zzb = new zzg(zzj.zze("0\u0082\u0006\u00040\u0082\u0003ì \u0003\u0002\u0001\u0002\u0002\u0014\u0003£²\u00ad×árÊkì"));
static final zzl zzc = new zzh(zzj.zze("0\u0082\u0004C0\u0082\u0003+ \u0003\u0002\u0001\u0002\u0002\t\u0000Âà\u0087FdJ0\u008d0"));
static final zzl zzd = new zzi(zzj.zze("0\u0082\u0004¨0\u0082\u0003\u0090 \u0003\u0002\u0001\u0002\u0002\t\u0000Õ\u0085¸l}ÓNõ0"));
private static final Object zzf = new Object();
public static zzx zza(String str, zzj zzjVar, boolean z, boolean z2) {
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
try {
return zzh(str, zzjVar, z, z2);
} finally {
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
}
public static zzx zzb(String str, boolean z, boolean z2, boolean z3) {
return zzi(str, z, false, false, true);
}
public static zzx zzc(String str, boolean z, boolean z2, boolean z3) {
return zzi(str, z, false, false, false);
}
public static /* synthetic */ String zzd(boolean z, String str, zzj zzjVar) throws Exception {
String str2 = (z || !zzh(str, zzjVar, true, false).zza) ? "not allowed" : "debug cert rejected";
MessageDigest zza2 = AndroidUtilsLight.zza("SHA-256");
Preconditions.checkNotNull(zza2);
return String.format("%s: pkg=%s, sha256=%s, atk=%s, ver=%s", str2, str, Hex.bytesToStringLowercase(zza2.digest(zzjVar.zzf())), Boolean.valueOf(z), "12451000.false");
}
public static synchronized void zze(Context context) {
synchronized (zzn.class) {
if (zzg != null) {
Log.w("GoogleCertificates", "GoogleCertificates has been initialized already");
} else if (context != null) {
zzg = context.getApplicationContext();
}
}
}
public static boolean zzf() {
boolean z;
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
try {
try {
zzj();
z = zze.zzg();
} finally {
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
} catch (RemoteException | DynamiteModule.LoadingException e) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e);
z = false;
}
return z;
}
public static boolean zzg() {
boolean z;
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
try {
try {
zzj();
z = zze.zzi();
} finally {
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
} catch (RemoteException | DynamiteModule.LoadingException e) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e);
z = false;
}
return z;
}
private static zzx zzh(final String str, final zzj zzjVar, final boolean z, boolean z2) {
try {
zzj();
Preconditions.checkNotNull(zzg);
try {
return zze.zzh(new zzs(str, zzjVar, z, z2), ObjectWrapper.wrap(zzg.getPackageManager())) ? zzx.zzb() : new zzv(new Callable() { // from class: com.google.android.gms.common.zze
@Override // java.util.concurrent.Callable
public final Object call() {
return zzn.zzd(z, str, zzjVar);
}
}, null);
} catch (RemoteException e) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e);
return zzx.zzd("module call", e);
}
} catch (DynamiteModule.LoadingException e2) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e2);
return zzx.zzd("module init: ".concat(String.valueOf(e2.getMessage())), e2);
}
}
/* JADX WARN: Type inference failed for: r6v0, types: [android.os.IBinder, com.google.android.gms.dynamic.IObjectWrapper] */
private static zzx zzi(String str, boolean z, boolean z2, boolean z3, boolean z4) {
zzx zzd2;
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
try {
Preconditions.checkNotNull(zzg);
try {
zzj();
zzo zzoVar = new zzo(str, z, false, ObjectWrapper.wrap(zzg), false, true);
try {
zzq zze2 = z4 ? zze.zze(zzoVar) : zze.zzf(zzoVar);
if (zze2.zzb()) {
zzd2 = zzx.zzf(zze2.zzc());
} else {
String zza2 = zze2.zza();
PackageManager.NameNotFoundException nameNotFoundException = zze2.zzd() == 4 ? new PackageManager.NameNotFoundException() : null;
if (zza2 == null) {
zza2 = "error checking package certificate";
}
zzd2 = zzx.zzg(zze2.zzc(), zze2.zzd(), zza2, nameNotFoundException);
}
} catch (RemoteException e) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e);
zzd2 = zzx.zzd("module call", e);
}
} catch (DynamiteModule.LoadingException e2) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e2);
zzd2 = zzx.zzd("module init: ".concat(String.valueOf(e2.getMessage())), e2);
}
StrictMode.setThreadPolicy(allowThreadDiskReads);
return zzd2;
} catch (Throwable th) {
StrictMode.setThreadPolicy(allowThreadDiskReads);
throw th;
}
}
private static void zzj() throws DynamiteModule.LoadingException {
if (zze != null) {
return;
}
Preconditions.checkNotNull(zzg);
synchronized (zzf) {
try {
if (zze == null) {
zze = zzaf.zzb(DynamiteModule.load(zzg, DynamiteModule.PREFER_HIGHEST_OR_LOCAL_VERSION_NO_FORCE_STAGING, "com.google.android.gms.googlecertificates").instantiate("com.google.android.gms.common.GoogleCertificatesImpl"));
}
} catch (Throwable th) {
throw th;
}
}
}
}