TopTV v3.0.1版本的 MD5 值为:0fc1b9ce94885bc92edd11a6ee3e5932
以下内容为反编译后的 f.java 源代码,内容仅作参考
package c.f.c.s;
import android.text.TextUtils;
import c.f.c.s.h;
import c.f.c.s.r.d;
import c.f.c.s.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 f implements g {
public static final Object f15762a = new Object();
public static final ThreadFactory f15763b = new a();
public final c.f.c.c f15764c;
public final c.f.c.s.r.c f15765d;
public final c.f.c.s.q.c f15766e;
public final o f15767f;
public final c.f.c.s.q.b f15768g;
public final m f15769h;
public final Object f15770i;
public final ExecutorService f15771j;
public final ExecutorService f15772k;
public String f15773l;
public Set<c.f.c.s.p.a> f15774m;
public final List<n> f15775n;
public class a implements ThreadFactory {
public final AtomicInteger f15776a = new AtomicInteger(1);
@Override
public Thread newThread(Runnable runnable) {
return new Thread(runnable, String.format("firebase-installations-executor-%d", Integer.valueOf(this.f15776a.getAndIncrement())));
}
}
public static class b {
public static final int[] f15777a;
public static final int[] f15778b;
static {
int[] iArr = new int[f.b.values().length];
f15778b = iArr;
try {
iArr[f.b.OK.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
f15778b[f.b.BAD_CONFIG.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
f15778b[f.b.AUTH_ERROR.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
int[] iArr2 = new int[d.b.values().length];
f15777a = iArr2;
try {
iArr2[d.b.OK.ordinal()] = 1;
} catch (NoSuchFieldError unused4) {
}
try {
f15777a[d.b.BAD_CONFIG.ordinal()] = 2;
} catch (NoSuchFieldError unused5) {
}
}
}
public f(c.f.c.c cVar, c.f.c.r.b<c.f.c.v.i> bVar, c.f.c.r.b<c.f.c.p.f> bVar2) {
this(new ThreadPoolExecutor(0, 1, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), f15763b), cVar, new c.f.c.s.r.c(cVar.g(), bVar, bVar2), new c.f.c.s.q.c(cVar), o.c(), new c.f.c.s.q.b(cVar), new m());
}
public f(ExecutorService executorService, c.f.c.c cVar, c.f.c.s.r.c cVar2, c.f.c.s.q.c cVar3, o oVar, c.f.c.s.q.b bVar, m mVar) {
this.f15770i = new Object();
this.f15774m = new HashSet();
this.f15775n = new ArrayList();
this.f15764c = cVar;
this.f15765d = cVar2;
this.f15766e = cVar3;
this.f15767f = oVar;
this.f15768g = bVar;
this.f15769h = mVar;
this.f15771j = executorService;
this.f15772k = new ThreadPoolExecutor(0, 1, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), f15763b);
}
public static f k() {
return l(c.f.c.c.h());
}
public static f l(c.f.c.c cVar) {
c.f.a.c.f.q.o.b(cVar != null, "Null is not a valid value of FirebaseApp.");
return (f) cVar.f(g.class);
}
@Override
public c.f.a.c.o.i<l> a(boolean z) {
t();
c.f.a.c.o.i<l> b2 = b();
this.f15771j.execute(d.a(this, z));
return b2;
}
public final c.f.a.c.o.i<l> b() {
c.f.a.c.o.j jVar = new c.f.a.c.o.j();
d(new j(this.f15767f, jVar));
return jVar.a();
}
public final c.f.a.c.o.i<String> c() {
c.f.a.c.o.j jVar = new c.f.a.c.o.j();
d(new k(jVar));
return jVar.a();
}
public final void d(n nVar) {
synchronized (this.f15770i) {
this.f15775n.add(nVar);
}
}
public final void e(boolean z) {
c.f.c.s.q.d v;
Exception iOException;
c.f.c.s.q.d m2 = m();
try {
if (!m2.i() && !m2.l()) {
if (!z && !this.f15767f.f(m2)) {
return;
}
v = g(m2);
p(v);
z(m2, v);
if (v.k()) {
y(v.d());
}
if (!v.i()) {
iOException = new h(h.a.BAD_CONFIG);
} else if (!v.j()) {
x(v);
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.");
}
w(iOException);
}
v = v(m2);
p(v);
z(m2, v);
if (v.k()) {
}
if (!v.i()) {
}
w(iOException);
} catch (h e2) {
w(e2);
}
}
public final void f(boolean z) {
c.f.c.s.q.d n2 = n();
if (z) {
n2 = n2.p();
}
x(n2);
this.f15772k.execute(e.a(this, z));
}
public final c.f.c.s.q.d g(c.f.c.s.q.d dVar) {
c.f.c.s.r.f e2 = this.f15765d.e(h(), dVar.d(), o(), dVar.f());
int i2 = b.f15778b[e2.b().ordinal()];
if (i2 != 1) {
if (i2 != 2) {
if (i2 == 3) {
y(null);
return dVar.r();
}
throw new h("Firebase Installations Service is unavailable. Please try again later.", h.a.UNAVAILABLE);
}
return dVar.q("BAD CONFIG");
}
return dVar.o(e2.c(), e2.d(), this.f15767f.b());
}
@Override
public c.f.a.c.o.i<String> getId() {
t();
String j2 = j();
if (j2 != null) {
return c.f.a.c.o.l.e(j2);
}
c.f.a.c.o.i<String> c2 = c();
this.f15771j.execute(c.a(this));
return c2;
}
public String h() {
return this.f15764c.j().b();
}
public String i() {
return this.f15764c.j().c();
}
public final synchronized String j() {
return this.f15773l;
}
public final c.f.c.s.q.d m() {
c.f.c.s.q.d c2;
synchronized (f15762a) {
c.f.c.s.b a2 = c.f.c.s.b.a(this.f15764c.g(), "generatefid.lock");
c2 = this.f15766e.c();
if (a2 != null) {
a2.b();
}
}
return c2;
}
public final c.f.c.s.q.d n() {
c.f.c.s.q.d c2;
synchronized (f15762a) {
c.f.c.s.b a2 = c.f.c.s.b.a(this.f15764c.g(), "generatefid.lock");
c2 = this.f15766e.c();
if (c2.j()) {
c2 = this.f15766e.a(c2.t(u(c2)));
}
if (a2 != null) {
a2.b();
}
}
return c2;
}
public String o() {
return this.f15764c.j().e();
}
public final void p(c.f.c.s.q.d dVar) {
synchronized (f15762a) {
c.f.c.s.b a2 = c.f.c.s.b.a(this.f15764c.g(), "generatefid.lock");
this.f15766e.a(dVar);
if (a2 != null) {
a2.b();
}
}
}
public final void t() {
c.f.a.c.f.q.o.f(i(), "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.");
c.f.a.c.f.q.o.f(o(), "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.");
c.f.a.c.f.q.o.f(h(), "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.");
c.f.a.c.f.q.o.b(o.h(i()), "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.");
c.f.a.c.f.q.o.b(o.g(h()), "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 u(c.f.c.s.q.d dVar) {
if ((this.f15764c.i().equals("CHIME_ANDROID_SDK") || this.f15764c.q()) && dVar.m()) {
String f2 = this.f15768g.f();
return TextUtils.isEmpty(f2) ? this.f15769h.a() : f2;
}
return this.f15769h.a();
}
public final c.f.c.s.q.d v(c.f.c.s.q.d dVar) {
c.f.c.s.r.d d2 = this.f15765d.d(h(), dVar.d(), o(), i(), (dVar.d() == null || dVar.d().length() != 11) ? null : this.f15768g.i());
int i2 = b.f15777a[d2.e().ordinal()];
if (i2 != 1) {
if (i2 == 2) {
return dVar.q("BAD CONFIG");
}
throw new h("Firebase Installations Service is unavailable. Please try again later.", h.a.UNAVAILABLE);
}
return dVar.s(d2.c(), d2.d(), this.f15767f.b(), d2.b().c(), d2.b().d());
}
public final void w(Exception exc) {
synchronized (this.f15770i) {
Iterator<n> it = this.f15775n.iterator();
while (it.hasNext()) {
if (it.next().a(exc)) {
it.remove();
}
}
}
}
public final void x(c.f.c.s.q.d dVar) {
synchronized (this.f15770i) {
Iterator<n> it = this.f15775n.iterator();
while (it.hasNext()) {
if (it.next().b(dVar)) {
it.remove();
}
}
}
}
public final synchronized void y(String str) {
this.f15773l = str;
}
public final synchronized void z(c.f.c.s.q.d dVar, c.f.c.s.q.d dVar2) {
if (this.f15774m.size() != 0 && !dVar.d().equals(dVar2.d())) {
for (c.f.c.s.p.a aVar : this.f15774m) {
aVar.a(dVar2.d());
}
}
}
}