55 lines
1.8 KiB
Java
55 lines
1.8 KiB
Java
|
package com.google.android.libraries.places.internal;
|
||
|
|
||
|
import android.os.Build;
|
||
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||
|
import java.util.concurrent.atomic.AtomicLong;
|
||
|
import java.util.concurrent.atomic.AtomicReference;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
final class zzlf extends zzkz {
|
||
|
private static final AtomicReference zza = new AtomicReference();
|
||
|
private static final AtomicLong zzb = new AtomicLong();
|
||
|
private static final ConcurrentLinkedQueue zzc = new ConcurrentLinkedQueue();
|
||
|
private volatile zzkg zzd;
|
||
|
|
||
|
private zzlf(String str) {
|
||
|
super(str);
|
||
|
boolean z = true;
|
||
|
boolean z2 = Build.FINGERPRINT == null || "robolectric".equals(Build.FINGERPRINT);
|
||
|
boolean z3 = "goldfish".equals(Build.HARDWARE) || "ranchu".equals(Build.HARDWARE);
|
||
|
if (!"eng".equals(Build.TYPE) && !"userdebug".equals(Build.TYPE)) {
|
||
|
z = false;
|
||
|
}
|
||
|
if (z2 || z3) {
|
||
|
this.zzd = new zzla().zza(zza());
|
||
|
} else if (z) {
|
||
|
this.zzd = new zzlh().zzb(false).zza(zza());
|
||
|
} else {
|
||
|
this.zzd = null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static zzkg zzb(String str) {
|
||
|
AtomicReference atomicReference = zza;
|
||
|
if (atomicReference.get() != null) {
|
||
|
return ((zzlb) atomicReference.get()).zza(str);
|
||
|
}
|
||
|
zzlf zzlfVar = new zzlf(str.replace('$', '.'));
|
||
|
zzld.zza.offer(zzlfVar);
|
||
|
if (atomicReference.get() != null) {
|
||
|
while (true) {
|
||
|
zzlf zzlfVar2 = (zzlf) zzld.zza.poll();
|
||
|
if (zzlfVar2 == null) {
|
||
|
break;
|
||
|
}
|
||
|
zzlfVar2.zzd = ((zzlb) zza.get()).zza(zzlfVar2.zza());
|
||
|
}
|
||
|
if (((zzle) zzc.poll()) != null) {
|
||
|
zzb.getAndDecrement();
|
||
|
throw null;
|
||
|
}
|
||
|
}
|
||
|
return zzlfVar;
|
||
|
}
|
||
|
}
|