CCIPTV PRO v3.0.9.1版本的 MD5 值为:e78d4d980447be4a9f823314f45bbf03

以下内容为反编译后的 f.java 源代码,内容仅作参考


package f.f.c.s;

import android.text.TextUtils;
import f.f.a.d.f.o.s;
import f.f.c.s.h;
import f.f.c.s.r.d;
import f.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 f9179m = new Object();
    public static final ThreadFactory f9180n = new a();
    public final f.f.c.c a;
    public final f.f.c.s.r.c b;
    public final f.f.c.s.q.c c;
    public final o f9181d;
    public final f.f.c.s.q.b f9182e;
    public final m f9183f;
    public final Object f9184g;
    public final ExecutorService f9185h;
    public final ExecutorService f9186i;
    public String f9187j;
    public Set<f.f.c.s.p.a> f9188k;
    public final List<n> f9189l;

    public class a implements ThreadFactory {
        public final AtomicInteger a = new AtomicInteger(1);

        @Override
        public Thread newThread(Runnable runnable) {
            return new Thread(runnable, String.format("firebase-installations-executor-%d", Integer.valueOf(this.a.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 f(f.f.c.c cVar, f.f.c.r.b<f.f.c.v.i> bVar, f.f.c.r.b<f.f.c.p.f> bVar2) {
        this(new ThreadPoolExecutor(0, 1, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), f9180n), cVar, new f.f.c.s.r.c(cVar.g(), bVar, bVar2), new f.f.c.s.q.c(cVar), o.c(), new f.f.c.s.q.b(cVar), new m());
    }

    public f(ExecutorService executorService, f.f.c.c cVar, f.f.c.s.r.c cVar2, f.f.c.s.q.c cVar3, o oVar, f.f.c.s.q.b bVar, m mVar) {
        this.f9184g = new Object();
        this.f9188k = new HashSet();
        this.f9189l = new ArrayList();
        this.a = cVar;
        this.b = cVar2;
        this.c = cVar3;
        this.f9181d = oVar;
        this.f9182e = bVar;
        this.f9183f = mVar;
        this.f9185h = executorService;
        this.f9186i = new ThreadPoolExecutor(0, 1, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), f9180n);
    }

    public static f k() {
        return l(f.f.c.c.h());
    }

    public static f l(f.f.c.c cVar) {
        s.b(cVar != null, "Null is not a valid value of FirebaseApp.");
        return (f) cVar.f(g.class);
    }

    @Override
    public f.f.a.d.n.h<l> a(boolean z) {
        t();
        f.f.a.d.n.h<l> b2 = b();
        this.f9185h.execute(d.a(this, z));
        return b2;
    }

    public final f.f.a.d.n.h<l> b() {
        f.f.a.d.n.i iVar = new f.f.a.d.n.i();
        d(new j(this.f9181d, iVar));
        return iVar.a();
    }

    public final f.f.a.d.n.h<String> c() {
        f.f.a.d.n.i iVar = new f.f.a.d.n.i();
        d(new k(iVar));
        return iVar.a();
    }

    public final void d(n nVar) {
        synchronized (this.f9184g) {
            this.f9189l.add(nVar);
        }
    }

    public final void e(boolean z) {
        f.f.c.s.q.d v;
        Exception iOException;
        f.f.c.s.q.d m2 = m();
        try {
            if (!m2.i() && !m2.l()) {
                if (!z && !this.f9181d.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) {
        f.f.c.s.q.d n2 = n();
        if (z) {
            n2 = n2.p();
        }
        x(n2);
        this.f9186i.execute(e.a(this, z));
    }

    public final f.f.c.s.q.d g(f.f.c.s.q.d dVar) {
        f.f.c.s.r.f e2 = this.b.e(h(), dVar.d(), o(), dVar.f());
        int i2 = b.b[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.f9181d.b());
    }

    @Override
    public f.f.a.d.n.h<String> getId() {
        t();
        String j2 = j();
        if (j2 != null) {
            return f.f.a.d.n.k.e(j2);
        }
        f.f.a.d.n.h<String> c = c();
        this.f9185h.execute(c.a(this));
        return c;
    }

    public String h() {
        return this.a.j().b();
    }

    public String i() {
        return this.a.j().c();
    }

    public final synchronized String j() {
        return this.f9187j;
    }

    public final f.f.c.s.q.d m() {
        f.f.c.s.q.d c;
        synchronized (f9179m) {
            f.f.c.s.b a2 = f.f.c.s.b.a(this.a.g(), "generatefid.lock");
            c = this.c.c();
            if (a2 != null) {
                a2.b();
            }
        }
        return c;
    }

    public final f.f.c.s.q.d n() {
        f.f.c.s.q.d c;
        synchronized (f9179m) {
            f.f.c.s.b a2 = f.f.c.s.b.a(this.a.g(), "generatefid.lock");
            c = this.c.c();
            if (c.j()) {
                String u = u(c);
                f.f.c.s.q.c cVar = this.c;
                c = c.t(u);
                cVar.a(c);
            }
            if (a2 != null) {
                a2.b();
            }
        }
        return c;
    }

    public String o() {
        return this.a.j().e();
    }

    public final void p(f.f.c.s.q.d dVar) {
        synchronized (f9179m) {
            f.f.c.s.b a2 = f.f.c.s.b.a(this.a.g(), "generatefid.lock");
            this.c.a(dVar);
            if (a2 != null) {
                a2.b();
            }
        }
    }

    public final void t() {
        s.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.");
        s.h(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.");
        s.h(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.");
        s.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.");
        s.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(f.f.c.s.q.d dVar) {
        if ((this.a.i().equals("CHIME_ANDROID_SDK") || this.a.q()) && dVar.m()) {
            String f2 = this.f9182e.f();
            return TextUtils.isEmpty(f2) ? this.f9183f.a() : f2;
        }
        return this.f9183f.a();
    }

    public final f.f.c.s.q.d v(f.f.c.s.q.d dVar) {
        f.f.c.s.r.d d2 = this.b.d(h(), dVar.d(), o(), i(), (dVar.d() == null || dVar.d().length() != 11) ? null : this.f9182e.i());
        int i2 = b.a[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.f9181d.b(), d2.b().c(), d2.b().d());
    }

    public final void w(Exception exc) {
        synchronized (this.f9184g) {
            Iterator<n> it = this.f9189l.iterator();
            while (it.hasNext()) {
                if (it.next().a(exc)) {
                    it.remove();
                }
            }
        }
    }

    public final void x(f.f.c.s.q.d dVar) {
        synchronized (this.f9184g) {
            Iterator<n> it = this.f9189l.iterator();
            while (it.hasNext()) {
                if (it.next().b(dVar)) {
                    it.remove();
                }
            }
        }
    }

    public final synchronized void y(String str) {
        this.f9187j = str;
    }

    public final synchronized void z(f.f.c.s.q.d dVar, f.f.c.s.q.d dVar2) {
        if (this.f9188k.size() != 0 && !dVar.d().equals(dVar2.d())) {
            for (f.f.c.s.p.a aVar : this.f9188k) {
                aVar.a(dVar2.d());
            }
        }
    }
}