alexandroid/decompiled/jadx/sources/com/google/android/gms/common/zzo.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

143 lines
6.6 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 androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.room.util.TableInfo$$ExternalSyntheticOutline0;
import com.google.android.gms.common.internal.Preconditions;
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;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes7.dex */
final class zzo {
@VisibleForTesting(otherwise = 2)
static volatile com.google.android.gms.common.internal.zzad zzg;
public static final /* synthetic */ int zzh = 0;
@Nullable
private static Context zzj;
static final zzm zza = new zzd(zzj.zzf("0\u0082\u0005È0\u0082\u0003° \u0003\u0002\u0001\u0002\u0002\u0014\u007f¢fú§p\u0085xb±"));
static final zzm zzb = new zze(zzj.zzf("0\u0082\u0006\u00040\u0082\u0003ì \u0003\u0002\u0001\u0002\u0002\u0014QÕÛ\u0004÷XçB\u0086<"));
static final zzm zzc = new zzf(zzj.zzf("0\u0082\u0005È0\u0082\u0003° \u0003\u0002\u0001\u0002\u0002\u0014\u0010\u008ae\bsù/\u008eQí"));
static final zzm zzd = new zzg(zzj.zzf("0\u0082\u0006\u00040\u0082\u0003ì \u0003\u0002\u0001\u0002\u0002\u0014\u0003£²\u00ad×árÊkì"));
static final zzm zze = new zzh(zzj.zzf("0\u0082\u0004C0\u0082\u0003+ \u0003\u0002\u0001\u0002\u0002\t\u0000Âà\u0087FdJ0\u008d0"));
static final zzm zzf = new zzi(zzj.zzf("0\u0082\u0004¨0\u0082\u0003\u0090 \u0003\u0002\u0001\u0002\u0002\t\u0000Õ\u0085¸l}ÓNõ0"));
private static final Object zzi = new Object();
public static synchronized void zza(Context context) {
synchronized (zzo.class) {
if (zzj != null) {
Log.w("GoogleCertificates", "GoogleCertificates has been initialized already");
} else if (context != null) {
zzj = context.getApplicationContext();
}
}
}
@VisibleForTesting(otherwise = 2)
public static void zzb() throws DynamiteModule.LoadingException {
if (zzg != null) {
return;
}
Preconditions.checkNotNull(zzj);
synchronized (zzi) {
try {
if (zzg == null) {
zzg = com.google.android.gms.common.internal.zzac.zzb(DynamiteModule.load(zzj, 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;
}
}
}
public static zzy zzc(zzw zzwVar) {
zzy zzd2;
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
try {
Preconditions.checkNotNull(zzj);
try {
zzb();
Preconditions.checkNotNull(zzj);
zzp zzb2 = zzwVar.zzb(zzj);
try {
zzr zzf2 = zzwVar.zza() ? zzg.zzf(zzb2) : zzg.zzh(zzb2);
if (zzf2.zza()) {
zzd2 = zzy.zzf(zzf2.zze(), zzf2.zzc());
} else {
String zzb3 = zzf2.zzb();
PackageManager.NameNotFoundException nameNotFoundException = zzf2.zzd() == 4 ? new PackageManager.NameNotFoundException() : null;
if (zzb3 == null) {
zzb3 = "error checking package certificate";
}
zzd2 = zzy.zzg(zzf2.zze(), zzf2.zzd(), zzb3, nameNotFoundException);
}
} catch (RemoteException e) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e);
zzd2 = zzy.zzd("module call", e);
}
} catch (DynamiteModule.LoadingException e2) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e2);
zzd2 = zzy.zzd("module init: ".concat(String.valueOf(e2.getMessage())), e2);
}
StrictMode.setThreadPolicy(allowThreadDiskReads);
return zzd2;
} catch (Throwable th) {
StrictMode.setThreadPolicy(allowThreadDiskReads);
throw th;
}
}
@Deprecated
public static zzy zzd(String str, zzj zzjVar, boolean z, boolean z2) {
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
try {
return zzf(str, zzjVar, z, z2);
} finally {
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
}
public static /* synthetic */ String zze(boolean z, String str, zzj zzjVar) {
String str2 = (z || !zzf(str, zzjVar, true, false).zza) ? "not allowed" : "debug cert rejected";
MessageDigest zza2 = AndroidUtilsLight.zza("SHA-256");
Preconditions.checkNotNull(zza2);
StringBuilder m = TableInfo$$ExternalSyntheticOutline0.m(str2, ": pkg=", str, ", sha256=", Hex.bytesToStringLowercase(zza2.digest(zzjVar.zzc())));
m.append(", atk=");
m.append(z);
m.append(", ver=12451000.false");
return m.toString();
}
@Deprecated
private static zzy zzf(final String str, final zzj zzjVar, final boolean z, boolean z2) {
try {
zzb();
Preconditions.checkNotNull(zzj);
try {
return zzg.zze(new zzt(str, zzjVar, z, z2), ObjectWrapper.wrap(zzj.getPackageManager())) ? zzy.zzb() : new zzx(new Callable() { // from class: com.google.android.gms.common.zzl
@Override // java.util.concurrent.Callable
public final /* synthetic */ Object call() {
return zzo.zze(z, str, zzjVar);
}
}, null);
} catch (RemoteException e) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e);
return zzy.zzd("module call", e);
}
} catch (DynamiteModule.LoadingException e2) {
Log.e("GoogleCertificates", "Failed to get Google certificates from remote", e2);
return zzy.zzd("module init: ".concat(String.valueOf(e2.getMessage())), e2);
}
}
}