what-the-bank/sources/com/google/android/gms/common/config/GservicesValue.java

99 lines
2.6 KiB
Java

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