FlixOlé v4.4.0版本的 MD5 值为:50e7f767ca3e8715936523e9ef089581
以下内容为反编译后的 g.java 源代码,内容仅作参考
package i.d.d.w;
import android.text.TextUtils;
import i.d.a.d.f.q.q;
import i.d.d.w.i;
import i.d.d.w.r.d;
import i.d.d.w.r.f;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
public class g implements h {
public static final Object f8016m = new Object();
public static final ThreadFactory f8017n = new a();
public final i.d.d.g a;
public final i.d.d.w.r.c b;
public final i.d.d.w.q.c c;
public final o d;
public final i.d.d.w.q.b e;
public final m f8018f;
public final Object f8019g;
public final ExecutorService f8020h;
public final ExecutorService f8021i;
public String f8022j;
public Set<i.d.d.w.p.a> f8023k;
public final List<n> f8024l;
public class a implements ThreadFactory {
public final AtomicInteger f8025n = new AtomicInteger(1);
@Override
public Thread newThread(Runnable runnable) {
return new Thread(runnable, String.format("firebase-installations-executor-%d", Integer.valueOf(this.f8025n.getAndIncrement())));
}
}
public static class b {
public static final int[] a;
public static final int[] b;
static {
int[] iArr = new int[f.b.values().length];
b = iArr;
try {
iArr[f.b.OK.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
b[f.b.BAD_CONFIG.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
b[f.b.AUTH_ERROR.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
int[] iArr2 = new int[d.b.values().length];
a = iArr2;
try {
iArr2[d.b.OK.ordinal()] = 1;
} catch (NoSuchFieldError unused4) {
}
try {
a[d.b.BAD_CONFIG.ordinal()] = 2;
} catch (NoSuchFieldError unused5) {
}
}
}
public g(i.d.d.g gVar, i.d.d.v.b<i.d.d.z.i> bVar, i.d.d.v.b<i.d.d.s.f> bVar2) {
this(new ThreadPoolExecutor(0, 1, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), f8017n), gVar, new i.d.d.w.r.c(gVar.g(), bVar, bVar2), new i.d.d.w.q.c(gVar), o.c(), new i.d.d.w.q.b(gVar), new m());
}
public g(ExecutorService executorService, i.d.d.g gVar, i.d.d.w.r.c cVar, i.d.d.w.q.c cVar2, o oVar, i.d.d.w.q.b bVar, m mVar) {
this.f8019g = new Object();
this.f8023k = new HashSet();
this.f8024l = new ArrayList();
this.a = gVar;
this.b = cVar;
this.c = cVar2;
this.d = oVar;
this.e = bVar;
this.f8018f = mVar;
this.f8020h = executorService;
this.f8021i = new ThreadPoolExecutor(0, 1, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), f8017n);
}
public static g l() {
return m(i.d.d.g.i());
}
public static g m(i.d.d.g gVar) {
q.b(gVar != null, "Null is not a valid value of FirebaseApp.");
return (g) gVar.f(h.class);
}
public void u() {
v(false);
}
public final void A(Exception exc) {
synchronized (this.f8019g) {
Iterator<n> it = this.f8024l.iterator();
while (it.hasNext()) {
if (it.next().a(exc)) {
it.remove();
}
}
}
}
public final void B(i.d.d.w.q.d dVar) {
synchronized (this.f8019g) {
Iterator<n> it = this.f8024l.iterator();
while (it.hasNext()) {
if (it.next().b(dVar)) {
it.remove();
}
}
}
}
public final synchronized void C(String str) {
this.f8022j = str;
}
public final synchronized void D(i.d.d.w.q.d dVar, i.d.d.w.q.d dVar2) {
if (this.f8023k.size() != 0 && !dVar.d().equals(dVar2.d())) {
for (i.d.d.w.p.a aVar : this.f8023k) {
aVar.a(dVar2.d());
}
}
}
@Override
public i.d.a.d.p.i<String> a() {
x();
String k2 = k();
if (k2 != null) {
return i.d.a.d.p.l.e(k2);
}
i.d.a.d.p.i<String> d = d();
this.f8020h.execute(new Runnable() {
@Override
public final void run() {
g.this.u();
}
});
return d;
}
@Override
public i.d.a.d.p.i<l> b(final boolean z) {
x();
i.d.a.d.p.i<l> c = c();
this.f8020h.execute(new Runnable() {
@Override
public final void run() {
g.this.w(z);
}
});
return c;
}
public final i.d.a.d.p.i<l> c() {
i.d.a.d.p.j jVar = new i.d.a.d.p.j();
e(new j(this.d, jVar));
return jVar.a();
}
public final i.d.a.d.p.i<String> d() {
i.d.a.d.p.j jVar = new i.d.a.d.p.j();
e(new k(jVar));
return jVar.a();
}
public final void e(n nVar) {
synchronized (this.f8019g) {
this.f8024l.add(nVar);
}
}
public final void s(boolean z) {
i.d.d.w.q.d z2;
Exception iOException;
i.d.d.w.q.d n2 = n();
try {
if (!n2.i() && !n2.l()) {
if (!z && !this.d.f(n2)) {
return;
}
z2 = h(n2);
q(z2);
D(n2, z2);
if (z2.k()) {
C(z2.d());
}
if (!z2.i()) {
iOException = new i(i.a.BAD_CONFIG);
} else if (!z2.j()) {
B(z2);
return;
} else {
iOException = new IOException("Installation ID could not be validated with the Firebase servers (maybe it was deleted). Firebase Installations will need to create a new Installation ID and auth token. Please retry your last request.");
}
A(iOException);
}
z2 = z(n2);
q(z2);
D(n2, z2);
if (z2.k()) {
}
if (!z2.i()) {
}
A(iOException);
} catch (i e) {
A(e);
}
}
public final void w(final boolean z) {
i.d.d.w.q.d o2 = o();
if (z) {
o2 = o2.p();
}
B(o2);
this.f8021i.execute(new Runnable() {
@Override
public final void run() {
g.this.s(z);
}
});
}
public final i.d.d.w.q.d h(i.d.d.w.q.d dVar) throws i {
i.d.d.w.r.f e = this.b.e(i(), dVar.d(), p(), dVar.f());
int i2 = b.b[e.b().ordinal()];
if (i2 != 1) {
if (i2 != 2) {
if (i2 == 3) {
C(null);
return dVar.r();
}
throw new i("Firebase Installations Service is unavailable. Please try again later.", i.a.UNAVAILABLE);
}
return dVar.q("BAD CONFIG");
}
return dVar.o(e.c(), e.d(), this.d.b());
}
public String i() {
return this.a.k().b();
}
public String j() {
return this.a.k().c();
}
public final synchronized String k() {
return this.f8022j;
}
public final i.d.d.w.q.d n() {
i.d.d.w.q.d c;
synchronized (f8016m) {
f a2 = f.a(this.a.g(), "generatefid.lock");
c = this.c.c();
if (a2 != null) {
a2.b();
}
}
return c;
}
public final i.d.d.w.q.d o() {
i.d.d.w.q.d c;
synchronized (f8016m) {
f a2 = f.a(this.a.g(), "generatefid.lock");
c = this.c.c();
if (c.j()) {
String y = y(c);
i.d.d.w.q.c cVar = this.c;
c = c.t(y);
cVar.a(c);
}
if (a2 != null) {
a2.b();
}
}
return c;
}
public String p() {
return this.a.k().e();
}
public final void q(i.d.d.w.q.d dVar) {
synchronized (f8016m) {
f a2 = f.a(this.a.g(), "generatefid.lock");
this.c.a(dVar);
if (a2 != null) {
a2.b();
}
}
}
public final void x() {
q.h(j(), "Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.");
q.h(p(), "Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.");
q.h(i(), "Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.");
q.b(o.h(j()), "Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.");
q.b(o.g(i()), "Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.");
}
public final String y(i.d.d.w.q.d dVar) {
if ((this.a.j().equals("CHIME_ANDROID_SDK") || this.a.r()) && dVar.m()) {
String f2 = this.e.f();
return TextUtils.isEmpty(f2) ? this.f8018f.a() : f2;
}
return this.f8018f.a();
}
public final i.d.d.w.q.d z(i.d.d.w.q.d dVar) throws i {
i.d.d.w.r.d d = this.b.d(i(), dVar.d(), p(), j(), (dVar.d() == null || dVar.d().length() != 11) ? null : this.e.i());
int i2 = b.a[d.e().ordinal()];
if (i2 != 1) {
if (i2 == 2) {
return dVar.q("BAD CONFIG");
}
throw new i("Firebase Installations Service is unavailable. Please try again later.", i.a.UNAVAILABLE);
}
return dVar.s(d.c(), d.d(), this.d.b(), d.b().c(), d.b().d());
}
}