package com.google.android.gms.common.config; import android.os.Binder; import android.os.StrictMode; import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import com.google.android.gms.common.annotation.KeepForSdk; import com.google.errorprone.annotations.ResultIgnorabilityUnspecified; @KeepForSdk /* loaded from: classes2.dex */ public abstract class GservicesValue { private static final Object zzc = new Object(); @NonNull protected final String zza; @NonNull protected final Object zzb; @Nullable private Object zzd = null; public GservicesValue(@NonNull String str, @NonNull Object obj) { this.zza = str; this.zzb = obj; } @ResultIgnorabilityUnspecified @KeepForSdk public static boolean isInitialized() { synchronized (zzc) { } return false; } @NonNull @KeepForSdk public static GservicesValue value(@NonNull String str, @NonNull Float f) { return new zzd(str, f); } @NonNull @KeepForSdk public static GservicesValue value(@NonNull String str, @NonNull Integer num) { return new zzc(str, num); } @NonNull @KeepForSdk public static GservicesValue value(@NonNull String str, @NonNull Long l) { return new zzb(str, l); } @NonNull @KeepForSdk public static GservicesValue value(@NonNull String str, @NonNull String str2) { return new zze(str, str2); } @NonNull @KeepForSdk public static GservicesValue value(@NonNull String str, boolean z) { return new zza(str, Boolean.valueOf(z)); } @NonNull @ResultIgnorabilityUnspecified @KeepForSdk public final T get() { T t; T t2 = (T) this.zzd; if (t2 != null) { return t2; } StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads(); Object obj = zzc; synchronized (obj) { } synchronized (obj) { try { } finally { StrictMode.setThreadPolicy(allowThreadDiskReads); } } try { t = (T) zza(this.zza); } catch (SecurityException unused) { long clearCallingIdentity = Binder.clearCallingIdentity(); try { t = (T) zza(this.zza); } finally { Binder.restoreCallingIdentity(clearCallingIdentity); } } return t; } @NonNull @KeepForSdk @Deprecated public final T getBinderSafe() { return get(); } @KeepForSdk @VisibleForTesting public void override(@NonNull T t) { Log.w("GservicesValue", "GservicesValue.override(): test should probably call initForTests() first"); this.zzd = t; Object obj = zzc; synchronized (obj) { synchronized (obj) { } } } @KeepForSdk @VisibleForTesting public void resetOverride() { this.zzd = null; } @NonNull public abstract Object zza(@NonNull String str); }