discord-jadx/app/src/main/java/c/i/a/f/i/b/j3.java

76 lines
2.3 KiB
Java

package c.i.a.f.i.b;
import androidx.annotation.GuardedBy;
import androidx.annotation.Nullable;
import c.i.a.f.e.o.c;
/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
public final class j3<V> {
public static final Object a = new Object();
public final String b;
/* renamed from: c reason: collision with root package name */
public final h3<V> f1160c;
public final V d;
public final V e;
public final Object f = new Object();
@GuardedBy("cachingLock")
public volatile V g = null;
/* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: java.lang.Object */
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: java.lang.Object */
/* JADX WARN: Multi-variable type inference failed */
public j3(String str, Object obj, Object obj2, h3 h3Var, f3 f3Var) {
this.b = str;
this.d = obj;
this.e = obj2;
this.f1160c = h3Var;
}
public final V a(@Nullable V v) {
synchronized (this.f) {
}
if (v != null) {
return v;
}
if (c.h == null) {
return this.d;
}
synchronized (a) {
if (ga.a()) {
return this.g == null ? this.d : this.g;
}
}
try {
for (j3<?> j3Var : p.a) {
if (!ga.a()) {
V v2 = null;
try {
h3<?> h3Var = j3Var.f1160c;
if (h3Var != null) {
v2 = (V) h3Var.a();
}
} catch (IllegalStateException unused) {
}
synchronized (a) {
j3Var.g = v2;
}
} else {
throw new IllegalStateException("Refreshing flag cache must be done on a worker thread.");
}
}
} catch (SecurityException unused2) {
}
h3<V> h3Var2 = this.f1160c;
if (h3Var2 == null) {
return this.d;
}
try {
return h3Var2.a();
} catch (SecurityException unused3) {
return this.d;
} catch (IllegalStateException unused4) {
return this.d;
}
}
}