APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Cairo Prices Helper
版本号:1.12.0
包名称:com.sa3dy.cairometrohelper

MD5 校验值:fcd6d9842512eca2b9815c1e5f441ae3

反编译源代码说明

c.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package u3;

import a6.j1;
import a6.y0;
import java.net.ConnectException;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import u3.c;
import u3.r0;
import v3.g;

public abstract class c<ReqT, RespT, CallbackT extends r0> {

    private static final long f19148n;

    private static final long f19149o;

    private static final long f19150p;

    private static final long f19151q;

    private static final long f19152r;

    private g.b f19153a;

    private g.b f19154b;

    private final w f19155c;

    private final a6.z0<ReqT, RespT> f19156d;

    private final v3.g f19158f;

    private final g.d f19159g;

    private final g.d f19160h;

    private a6.g<ReqT, RespT> f19163k;

    final v3.r f19164l;

    final CallbackT f19165m;

    private q0 f19161i = q0.Initial;

    private long f19162j = 0;

    private final c<ReqT, RespT, CallbackT>.b f19157e = new b();

    public class a {

        private final long f19166a;

        a(long j7) {
            this.f19166a = j7;
        }

        void a(Runnable runnable) {
            c.this.f19158f.w();
            if (c.this.f19162j == this.f19166a) {
                runnable.run();
            } else {
                v3.v.a(c.this.getClass().getSimpleName(), "stream callback skipped by CloseGuardedRunner.", new Object[0]);
            }
        }
    }

    public class b implements Runnable {
        b() {
        }

        @Override
        public void run() {
            c.this.j();
        }
    }

    public class C0164c implements h0<RespT> {

        private final c<ReqT, RespT, CallbackT>.a f19169a;

        C0164c(c<ReqT, RespT, CallbackT>.a aVar) {
            this.f19169a = aVar;
        }

        public void i(j1 j1Var) {
            if (j1Var.o()) {
                v3.v.a(c.this.getClass().getSimpleName(), "(%x) Stream closed.", Integer.valueOf(System.identityHashCode(c.this)));
            } else {
                v3.v.e(c.this.getClass().getSimpleName(), "(%x) Stream closed with status: %s.", Integer.valueOf(System.identityHashCode(c.this)), j1Var);
            }
            c.this.k(j1Var);
        }

        public void j(a6.y0 y0Var) {
            if (v3.v.c()) {
                HashMap hashMap = new HashMap();
                for (String str : y0Var.j()) {
                    if (o.f19243e.contains(str.toLowerCase(Locale.ENGLISH))) {
                        hashMap.put(str, (String) y0Var.g(y0.g.e(str, a6.y0.f427e)));
                    }
                }
                if (hashMap.isEmpty()) {
                    return;
                }
                v3.v.a(c.this.getClass().getSimpleName(), "(%x) Stream received headers: %s", Integer.valueOf(System.identityHashCode(c.this)), hashMap);
            }
        }

        public void k(Object obj) {
            if (v3.v.c()) {
                v3.v.a(c.this.getClass().getSimpleName(), "(%x) Stream received: %s", Integer.valueOf(System.identityHashCode(c.this)), obj);
            }
            c.this.r(obj);
        }

        public void l() {
            v3.v.a(c.this.getClass().getSimpleName(), "(%x) Stream is open", Integer.valueOf(System.identityHashCode(c.this)));
            c.this.s();
        }

        @Override
        public void a() {
            this.f19169a.a(new Runnable() {
                @Override
                public final void run() {
                    c.C0164c.this.l();
                }
            });
        }

        @Override
        public void b(final j1 j1Var) {
            this.f19169a.a(new Runnable() {
                @Override
                public final void run() {
                    c.C0164c.this.i(j1Var);
                }
            });
        }

        @Override
        public void c(final a6.y0 y0Var) {
            this.f19169a.a(new Runnable() {
                @Override
                public final void run() {
                    c.C0164c.this.j(y0Var);
                }
            });
        }

        @Override
        public void d(final RespT respt) {
            this.f19169a.a(new Runnable() {
                @Override
                public final void run() {
                    c.C0164c.this.k(respt);
                }
            });
        }
    }

    static {
        TimeUnit timeUnit = TimeUnit.SECONDS;
        f19148n = timeUnit.toMillis(1L);
        TimeUnit timeUnit2 = TimeUnit.MINUTES;
        f19149o = timeUnit2.toMillis(1L);
        f19150p = timeUnit2.toMillis(1L);
        f19151q = timeUnit.toMillis(10L);
        f19152r = timeUnit.toMillis(10L);
    }

    public c(w wVar, a6.z0<ReqT, RespT> z0Var, v3.g gVar, g.d dVar, g.d dVar2, g.d dVar3, CallbackT callbackt) {
        this.f19155c = wVar;
        this.f19156d = z0Var;
        this.f19158f = gVar;
        this.f19159g = dVar2;
        this.f19160h = dVar3;
        this.f19165m = callbackt;
        this.f19164l = new v3.r(gVar, dVar, f19148n, 1.5d, f19149o);
    }

    private void g() {
        g.b bVar = this.f19153a;
        if (bVar != null) {
            bVar.c();
            this.f19153a = null;
        }
    }

    private void h() {
        g.b bVar = this.f19154b;
        if (bVar != null) {
            bVar.c();
            this.f19154b = null;
        }
    }

    private void i(q0 q0Var, j1 j1Var) {
        v3.b.d(n(), "Only started streams should be closed.", new Object[0]);
        q0 q0Var2 = q0.Error;
        v3.b.d(q0Var == q0Var2 || j1Var.o(), "Can't provide an error when not in an error state.", new Object[0]);
        this.f19158f.w();
        if (o.i(j1Var)) {
            v3.g0.p(new IllegalStateException("The Cloud Firestore client failed to establish a secure connection. This is likely a problem with your app, rather than with Cloud Firestore itself. See https://bit.ly/2XFpdma for instructions on how to enable TLS on Android 4.x devices.", j1Var.l()));
        }
        h();
        g();
        this.f19164l.c();
        this.f19162j++;
        j1.b m7 = j1Var.m();
        if (m7 == j1.b.OK) {
            this.f19164l.f();
        } else if (m7 == j1.b.RESOURCE_EXHAUSTED) {
            v3.v.a(getClass().getSimpleName(), "(%x) Using maximum backoff delay to prevent overloading the backend.", Integer.valueOf(System.identityHashCode(this)));
            this.f19164l.g();
        } else if (m7 == j1.b.UNAUTHENTICATED && this.f19161i != q0.Healthy) {
            this.f19155c.h();
        } else if (m7 == j1.b.UNAVAILABLE && ((j1Var.l() instanceof UnknownHostException) || (j1Var.l() instanceof ConnectException))) {
            this.f19164l.h(f19152r);
        }
        if (q0Var != q0Var2) {
            v3.v.a(getClass().getSimpleName(), "(%x) Performing stream teardown", Integer.valueOf(System.identityHashCode(this)));
            w();
        }
        if (this.f19163k != null) {
            if (j1Var.o()) {
                v3.v.a(getClass().getSimpleName(), "(%x) Closing stream client-side", Integer.valueOf(System.identityHashCode(this)));
                this.f19163k.b();
            }
            this.f19163k = null;
        }
        this.f19161i = q0Var;
        this.f19165m.b(j1Var);
    }

    public void j() {
        if (m()) {
            i(q0.Initial, j1.f277f);
        }
    }

    public void o() {
        if (m()) {
            this.f19161i = q0.Healthy;
        }
    }

    public void p() {
        q0 q0Var = this.f19161i;
        v3.b.d(q0Var == q0.Backoff, "State should still be backoff but was %s", q0Var);
        this.f19161i = q0.Initial;
        u();
        v3.b.d(n(), "Stream should have started", new Object[0]);
    }

    public void s() {
        this.f19161i = q0.Open;
        this.f19165m.a();
        if (this.f19153a == null) {
            this.f19153a = this.f19158f.k(this.f19160h, f19151q, new Runnable() {
                @Override
                public final void run() {
                    c.this.o();
                }
            });
        }
    }

    private void t() {
        v3.b.d(this.f19161i == q0.Error, "Should only perform backoff in an error state", new Object[0]);
        this.f19161i = q0.Backoff;
        this.f19164l.b(new Runnable() {
            @Override
            public final void run() {
                c.this.p();
            }
        });
    }

    void k(j1 j1Var) {
        v3.b.d(n(), "Can't handle server close on non-started stream!", new Object[0]);
        i(q0.Error, j1Var);
    }

    public void l() {
        v3.b.d(!n(), "Can only inhibit backoff after in a stopped state", new Object[0]);
        this.f19158f.w();
        this.f19161i = q0.Initial;
        this.f19164l.f();
    }

    public boolean m() {
        this.f19158f.w();
        q0 q0Var = this.f19161i;
        return q0Var == q0.Open || q0Var == q0.Healthy;
    }

    public boolean n() {
        this.f19158f.w();
        q0 q0Var = this.f19161i;
        return q0Var == q0.Starting || q0Var == q0.Backoff || m();
    }

    public void q() {
        if (m() && this.f19154b == null) {
            this.f19154b = this.f19158f.k(this.f19159g, f19150p, this.f19157e);
        }
    }

    public abstract void r(RespT respt);

    public void u() {
        this.f19158f.w();
        v3.b.d(this.f19163k == null, "Last call still set", new Object[0]);
        v3.b.d(this.f19154b == null, "Idle timer still set", new Object[0]);
        q0 q0Var = this.f19161i;
        if (q0Var == q0.Error) {
            t();
            return;
        }
        v3.b.d(q0Var == q0.Initial, "Already started", new Object[0]);
        this.f19163k = this.f19155c.m(this.f19156d, new C0164c(new a(this.f19162j)));
        this.f19161i = q0.Starting;
    }

    public void v() {
        if (n()) {
            i(q0.Initial, j1.f277f);
        }
    }

    protected void w() {
    }

    public void x(ReqT reqt) {
        this.f19158f.w();
        v3.v.a(getClass().getSimpleName(), "(%x) Stream sending: %s", Integer.valueOf(System.identityHashCode(this)), reqt);
        h();
        this.f19163k.d(reqt);
    }
}