Two Factor App v1.0版本的 MD5 值为:b338d679ba2ad31515fac6098c4fd9a3

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


package c;

import android.text.TextUtils;
import c.h21;
import c.j21;
import c.o11;
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.Callable;
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 m11 implements n11 {
    public static final int a = 0;
    public static final long f3381a = 30;
    public static final int b = 1;
    public static final String f3384b = "generatefid.lock";
    public static final String f6917c = "CHIME_ANDROID_SDK";
    public static final String d = "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 static final String e = "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.";
    public static final String f = "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.";
    public static final String g = "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.";
    public final b21 f3385a;
    public final c21 f3386a;
    public final g21 f3387a;
    public final nx0 f3388a;
    public final t11 f3389a;
    public final v11 f3390a;
    public final Object f3391a;
    @g1("this")
    public String f3392a;
    @g1("lock")
    public final List<u11> f3393a;
    @g1("FirebaseInstallations.this")
    public Set<w11> f3394a;
    public final ExecutorService f3395a;
    public final ExecutorService f3396b;
    public static final Object f3383b = new Object();
    public static final ThreadFactory f3382a = new a();

    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 class b implements x11 {
        public final w11 f3397a;

        public b(w11 w11Var) {
            this.f3397a = w11Var;
        }

        @Override
        public void a() {
            synchronized (m11.this) {
                m11.this.f3394a.remove(this.f3397a);
            }
        }
    }

    public static class c {
        public static final int[] a;
        public static final int[] b;

        static {
            int[] iArr = new int[j21.b.values().length];
            b = iArr;
            try {
                j21.b bVar = j21.b.OK;
                iArr[0] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                int[] iArr2 = b;
                j21.b bVar2 = j21.b.BAD_CONFIG;
                iArr2[1] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                int[] iArr3 = b;
                j21.b bVar3 = j21.b.AUTH_ERROR;
                iArr3[2] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            int[] iArr4 = new int[h21.b.values().length];
            a = iArr4;
            try {
                h21.b bVar4 = h21.b.OK;
                iArr4[0] = 1;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                int[] iArr5 = a;
                h21.b bVar5 = h21.b.BAD_CONFIG;
                iArr5[1] = 2;
            } catch (NoSuchFieldError unused5) {
            }
        }
    }

    public m11(nx0 nx0Var, @t1 c11<i51> c11Var, @t1 c11<v01> c11Var2) {
        this(new ThreadPoolExecutor(0, 1, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), f3382a), nx0Var, new g21(nx0Var.m3384a(), c11Var, c11Var2), new c21(nx0Var), v11.a(), new b21(nx0Var), new t11());
    }

    public m11(ExecutorService executorService, nx0 nx0Var, g21 g21Var, c21 c21Var, v11 v11Var, b21 b21Var, t11 t11Var) {
        this.f3391a = new Object();
        this.f3394a = new HashSet();
        this.f3393a = new ArrayList();
        this.f3388a = nx0Var;
        this.f3387a = g21Var;
        this.f3386a = c21Var;
        this.f3390a = v11Var;
        this.f3385a = b21Var;
        this.f3389a = t11Var;
        this.f3395a = executorService;
        this.f3396b = new ThreadPoolExecutor(0, 1, 30L, TimeUnit.SECONDS, new LinkedBlockingQueue(), f3382a);
    }

    private d21 a() {
        d21 m681a;
        synchronized (f3383b) {
            l11 a2 = l11.a(this.f3388a.m3384a(), f3384b);
            m681a = this.f3386a.m681a();
            if (a2 != null) {
                a2.a();
            }
        }
        return m681a;
    }

    private d21 a(@t1 d21 d21Var) {
        j21 a2 = this.f3387a.a(m3156a(), d21Var.mo358b(), m3162d(), d21Var.d());
        int ordinal = a2.mo1048a().ordinal();
        if (ordinal != 0) {
            if (ordinal != 1) {
                if (ordinal == 2) {
                    a((String) null);
                    return d21Var.m810b();
                }
                throw new o11("Firebase Installations Service is unavailable. Please try again later.", o11.a.UNAVAILABLE);
            }
            return d21Var.a("BAD CONFIG");
        }
        return d21Var.a(a2.mo1049a(), a2.a(), this.f3390a.b());
    }

    @t1
    public static m11 m3148a() {
        return a(nx0.a());
    }

    @t1
    public static m11 a(@t1 nx0 nx0Var) {
        cp0.a(nx0Var != null, "Null is not a valid value of FirebaseApp.");
        return (m11) nx0Var.a(n11.class);
    }

    private String m3149a(d21 d21Var) {
        if ((this.f3388a.m3387a().equals(f6917c) || this.f3388a.m3391b()) && d21Var.e()) {
            String a2 = this.f3385a.a();
            return TextUtils.isEmpty(a2) ? this.f3389a.a() : a2;
        }
        return this.f3389a.a();
    }

    public Void m3150a() {
        a((String) null);
        d21 a2 = a();
        if (a2.m812c()) {
            this.f3387a.m1294a(m3156a(), a2.mo358b(), m3162d(), a2.d());
        }
        m3152a(a2.m810b());
        return null;
    }

    private void m3152a(d21 d21Var) {
        synchronized (f3383b) {
            l11 a2 = l11.a(this.f3388a.m3384a(), f3384b);
            this.f3386a.a(d21Var);
            if (a2 != null) {
                a2.a();
            }
        }
    }

    private synchronized void a(d21 d21Var, d21 d21Var2) {
        if (this.f3394a.size() != 0 && !d21Var.mo358b().equals(d21Var2.mo358b())) {
            for (w11 w11Var : this.f3394a) {
                w11Var.a(d21Var2.mo358b());
            }
        }
    }

    private void a(u11 u11Var) {
        synchronized (this.f3391a) {
            this.f3393a.add(u11Var);
        }
    }

    private void a(Exception exc) {
        synchronized (this.f3391a) {
            Iterator<u11> it = this.f3393a.iterator();
            while (it.hasNext()) {
                if (it.next().a(exc)) {
                    it.remove();
                }
            }
        }
    }

    private synchronized void a(String str) {
        this.f3392a = str;
    }

    private d21 b() {
        d21 m681a;
        synchronized (f3383b) {
            l11 a2 = l11.a(this.f3388a.m3384a(), f3384b);
            m681a = this.f3386a.m681a();
            if (m681a.m811b()) {
                m681a = this.f3386a.a(m681a.b(m3149a(m681a)));
            }
            if (a2 != null) {
                a2.a();
            }
        }
        return m681a;
    }

    private d21 b(d21 d21Var) {
        h21 a2 = this.f3387a.a(m3156a(), d21Var.mo358b(), m3162d(), m3160b(), (d21Var.mo358b() == null || d21Var.mo358b().length() != 11) ? null : this.f3385a.b());
        int ordinal = a2.mo943a().ordinal();
        if (ordinal != 0) {
            if (ordinal == 1) {
                return d21Var.a("BAD CONFIG");
            }
            throw new o11("Firebase Installations Service is unavailable. Please try again later.", o11.a.UNAVAILABLE);
        }
        return d21Var.a(a2.mo945a(), a2.mo2334b(), this.f3390a.b(), a2.mo944a().mo1049a(), a2.mo944a().a());
    }

    private void m3153b() {
        cp0.a(m3160b(), (Object) e);
        cp0.a(m3162d(), (Object) f);
        cp0.a(m3156a(), (Object) d);
        cp0.a(v11.b(m3160b()), e);
        cp0.a(v11.a(m3156a()), d);
    }

    private void m3154b(d21 d21Var) {
        synchronized (this.f3391a) {
            Iterator<u11> it = this.f3393a.iterator();
            while (it.hasNext()) {
                if (it.next().a(d21Var)) {
                    it.remove();
                }
            }
        }
    }

    private cw0<r11> c() {
        dw0 dw0Var = new dw0();
        a(new p11(this.f3390a, dw0Var));
        return dw0Var.a();
    }

    public void m3158a(boolean z) {
        d21 b2;
        Exception iOException;
        d21 a2 = a();
        try {
            if (!a2.m808a() && !a2.m813d()) {
                if (!z && !this.f3390a.a(a2)) {
                    return;
                }
                b2 = a(a2);
                m3152a(b2);
                a(a2, b2);
                if (b2.m812c()) {
                    a(b2.mo358b());
                }
                if (!b2.m808a()) {
                    iOException = new o11(o11.a.BAD_CONFIG);
                } else if (!b2.m811b()) {
                    m3154b(b2);
                    return;
                } else {
                    iOException = new IOException(g);
                }
                a(iOException);
            }
            b2 = b(a2);
            m3152a(b2);
            a(a2, b2);
            if (b2.m812c()) {
            }
            if (!b2.m808a()) {
            }
            a(iOException);
        } catch (o11 e2) {
            a(e2);
        }
    }

    private cw0<String> d() {
        dw0 dw0Var = new dw0();
        a(new q11(dw0Var));
        return dw0Var.a();
    }

    public final void b(final boolean z) {
        d21 b2 = b();
        if (z) {
            b2 = b2.m807a();
        }
        m3154b(b2);
        this.f3396b.execute(new Runnable() {
            @Override
            public final void run() {
                m11.this.m3158a(z);
            }
        });
    }

    private synchronized String e() {
        return this.f3392a;
    }

    @Override
    @t1
    public cw0<String> mo3155a() {
        m3153b();
        String e2 = e();
        if (e2 != null) {
            return fw0.a(e2);
        }
        cw0<String> d2 = d();
        this.f3395a.execute(new Runnable() {
            @Override
            public final void run() {
                m11.this.m3157a();
            }
        });
        return d2;
    }

    @Override
    @t1
    public cw0<r11> a(final boolean z) {
        m3153b();
        cw0<r11> c2 = c();
        this.f3395a.execute(new Runnable() {
            @Override
            public final void run() {
                m11.this.b(z);
            }
        });
        return c2;
    }

    @Override
    @t1
    public synchronized x11 a(@t1 w11 w11Var) {
        this.f3394a.add(w11Var);
        return new b(w11Var);
    }

    @u1
    public String m3156a() {
        return this.f3388a.m3386a().a();
    }

    public void m3157a() {
        b(false);
    }

    @Override
    @t1
    public cw0<Void> mo3159b() {
        return fw0.a(this.f3395a, new Callable() {
            @Override
            public final Object call() {
                Void m3150a;
                m3150a = m11.this.m3150a();
                return m3150a;
            }
        });
    }

    @j2
    public String m3160b() {
        return this.f3388a.m3386a().b();
    }

    @j2
    public String m3161c() {
        return this.f3388a.m3387a();
    }

    @u1
    public String m3162d() {
        return this.f3388a.m3386a().f();
    }
}