what-the-bank/sources/com/google/android/gms/common/internal/zzag.java

48 lines
1.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.common.internal;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import com.google.android.gms.common.GooglePlayServicesUtilLight;
import com.google.android.gms.common.wrappers.Wrappers;
/* loaded from: classes.dex */
public final class zzag {
private static final Object zza = new Object();
private static boolean zzb;
private static String zzc;
private static int zzd;
public static int zza(Context context) {
zzc(context);
return zzd;
}
public static String zzb(Context context) {
zzc(context);
return zzc;
}
private static void zzc(Context context) {
Bundle bundle;
synchronized (zza) {
if (zzb) {
return;
}
zzb = true;
try {
bundle = (Bundle) ApplicationInfo.class.getField("metaData").get(Wrappers.packageManager(context).getApplicationInfo(context.getPackageName(), 128));
} catch (PackageManager.NameNotFoundException e) {
Log.wtf("MetadataValueReader", "This should never happen.", e);
}
if (bundle == null) {
return;
}
zzc = bundle.getString("com.google.app.id");
zzd = GooglePlayServicesUtilLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
}
}
}