导航菜单

页面标题

页面副标题

Namma Yatri v3.3.7 - AbstractC0236c.java 源代码

正在查看: Namma Yatri v3.3.7 应用的 AbstractC0236c.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package D9;

import D9.AbstractC0236c;
import E9.AbstractC0260b;
import E9.C0265g;
import io.grpc.Z;
import io.grpc.p0;
import java.net.ConnectException;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Locale;
import java.util.concurrent.TimeUnit;

abstract class AbstractC0236c {
    private static final long n;
    private static final long o;
    private static final long p;
    private static final long q;
    private static final long r;
    private C0265g.b a;
    private C0265g.b b;
    private final C0257y c;
    private final io.grpc.a0 d;
    private final C0265g f;
    private final C0265g.d g;
    private final C0265g.d h;
    private io.grpc.g k;
    final E9.r l;
    final V m;
    private U i = U.Initial;
    private long j = 0;
    private final b e = new b();

    class a {
        private final long a;

        a(long j) {
            this.a = j;
        }

        void a(Runnable runnable) {
            AbstractC0236c.this.f.x();
            if (AbstractC0236c.this.j == this.a) {
                runnable.run();
            } else {
                E9.x.a(AbstractC0236c.this.getClass().getSimpleName(), "stream callback skipped by CloseGuardedRunner.", new Object[0]);
            }
        }
    }

    class b implements Runnable {
        b() {
        }

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

    class C0005c implements J {
        private final a a;
        private int b = 0;

        C0005c(a aVar) {
            this.a = aVar;
        }

        public void h(p0 p0Var) {
            if (p0Var.p()) {
                E9.x.a(AbstractC0236c.this.getClass().getSimpleName(), "(%x) Stream closed.", Integer.valueOf(System.identityHashCode(AbstractC0236c.this)));
            } else {
                E9.x.e(AbstractC0236c.this.getClass().getSimpleName(), "(%x) Stream closed with status: %s.", Integer.valueOf(System.identityHashCode(AbstractC0236c.this)), p0Var);
            }
            AbstractC0236c.this.k(p0Var);
        }

        public void i(io.grpc.Z z) {
            if (E9.x.c()) {
                HashMap hashMap = new HashMap();
                for (String str : z.j()) {
                    if (C0250q.d.contains(str.toLowerCase(Locale.ENGLISH))) {
                        hashMap.put(str, (String) z.g(Z.g.e(str, io.grpc.Z.e)));
                    }
                }
                if (hashMap.isEmpty()) {
                    return;
                }
                E9.x.a(AbstractC0236c.this.getClass().getSimpleName(), "(%x) Stream received headers: %s", Integer.valueOf(System.identityHashCode(AbstractC0236c.this)), hashMap);
            }
        }

        public void j(int i, Object obj) {
            if (E9.x.c()) {
                E9.x.a(AbstractC0236c.this.getClass().getSimpleName(), "(%x) Stream received (%s): %s", Integer.valueOf(System.identityHashCode(AbstractC0236c.this)), Integer.valueOf(i), obj);
            }
            if (i == 1) {
                AbstractC0236c.this.r(obj);
            } else {
                AbstractC0236c.this.s(obj);
            }
        }

        public void k() {
            E9.x.a(AbstractC0236c.this.getClass().getSimpleName(), "(%x) Stream is open", Integer.valueOf(System.identityHashCode(AbstractC0236c.this)));
            AbstractC0236c.this.t();
        }

        @Override
        public void a(final p0 p0Var) {
            this.a.a(new Runnable() {
                @Override
                public final void run() {
                    AbstractC0236c.C0005c.this.h(p0Var);
                }
            });
        }

        @Override
        public void b() {
            this.a.a(new Runnable() {
                @Override
                public final void run() {
                    AbstractC0236c.C0005c.this.k();
                }
            });
        }

        @Override
        public void c(final io.grpc.Z z) {
            this.a.a(new Runnable() {
                @Override
                public final void run() {
                    AbstractC0236c.C0005c.this.i(z);
                }
            });
        }

        @Override
        public void onNext(final Object obj) {
            final int i = this.b + 1;
            this.a.a(new Runnable() {
                @Override
                public final void run() {
                    AbstractC0236c.C0005c.this.j(i, obj);
                }
            });
            this.b = i;
        }
    }

    static {
        TimeUnit timeUnit = TimeUnit.SECONDS;
        n = timeUnit.toMillis(1L);
        TimeUnit timeUnit2 = TimeUnit.MINUTES;
        o = timeUnit2.toMillis(1L);
        p = timeUnit2.toMillis(1L);
        q = timeUnit.toMillis(10L);
        r = timeUnit.toMillis(10L);
    }

    AbstractC0236c(C0257y c0257y, io.grpc.a0 a0Var, C0265g c0265g, C0265g.d dVar, C0265g.d dVar2, C0265g.d dVar3, V v) {
        this.c = c0257y;
        this.d = a0Var;
        this.f = c0265g;
        this.g = dVar2;
        this.h = dVar3;
        this.m = v;
        this.l = new E9.r(c0265g, dVar, n, 1.5d, o);
    }

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

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

    private void i(U u, p0 p0Var) {
        AbstractC0260b.d(n(), "Only started streams should be closed.", new Object[0]);
        U u2 = U.Error;
        AbstractC0260b.d(u == u2 || p0Var.p(), "Can't provide an error when not in an error state.", new Object[0]);
        this.f.x();
        if (C0250q.g(p0Var)) {
            E9.I.q(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.", p0Var.m()));
        }
        h();
        g();
        this.l.c();
        this.j++;
        p0.b n2 = p0Var.n();
        if (n2 == p0.b.c) {
            this.l.f();
        } else if (n2 == p0.b.k) {
            E9.x.a(getClass().getSimpleName(), "(%x) Using maximum backoff delay to prevent overloading the backend.", Integer.valueOf(System.identityHashCode(this)));
            this.l.g();
        } else if (n2 == p0.b.s && this.i != U.Healthy) {
            this.c.h();
        } else if (n2 == p0.b.q && ((p0Var.m() instanceof UnknownHostException) || (p0Var.m() instanceof ConnectException))) {
            this.l.h(r);
        }
        if (u != u2) {
            E9.x.a(getClass().getSimpleName(), "(%x) Performing stream teardown", Integer.valueOf(System.identityHashCode(this)));
            x();
        }
        if (this.k != null) {
            if (p0Var.p()) {
                E9.x.a(getClass().getSimpleName(), "(%x) Closing stream client-side", Integer.valueOf(System.identityHashCode(this)));
                this.k.halfClose();
            }
            this.k = null;
        }
        this.i = u;
        this.m.a(p0Var);
    }

    public void j() {
        if (m()) {
            i(U.Initial, p0.e);
        }
    }

    public void o() {
        if (m()) {
            this.i = U.Healthy;
        }
    }

    public void p() {
        U u = this.i;
        AbstractC0260b.d(u == U.Backoff, "State should still be backoff but was %s", u);
        this.i = U.Initial;
        v();
        AbstractC0260b.d(n(), "Stream should have started", new Object[0]);
    }

    public void t() {
        this.i = U.Open;
        this.m.b();
        if (this.a == null) {
            this.a = this.f.k(this.h, q, new Runnable() {
                @Override
                public final void run() {
                    AbstractC0236c.this.o();
                }
            });
        }
    }

    private void u() {
        AbstractC0260b.d(this.i == U.Error, "Should only perform backoff in an error state", new Object[0]);
        this.i = U.Backoff;
        this.l.b(new Runnable() {
            @Override
            public final void run() {
                AbstractC0236c.this.p();
            }
        });
    }

    void k(p0 p0Var) {
        AbstractC0260b.d(n(), "Can't handle server close on non-started stream!", new Object[0]);
        i(U.Error, p0Var);
    }

    public void l() {
        AbstractC0260b.d(!n(), "Can only inhibit backoff after in a stopped state", new Object[0]);
        this.f.x();
        this.i = U.Initial;
        this.l.f();
    }

    public boolean m() {
        this.f.x();
        U u = this.i;
        return u == U.Open || u == U.Healthy;
    }

    public boolean n() {
        this.f.x();
        U u = this.i;
        return u == U.Starting || u == U.Backoff || m();
    }

    void q() {
        if (m() && this.b == null) {
            this.b = this.f.k(this.g, p, this.e);
        }
    }

    public abstract void r(Object obj);

    public abstract void s(Object obj);

    public void v() {
        this.f.x();
        AbstractC0260b.d(this.k == null, "Last call still set", new Object[0]);
        AbstractC0260b.d(this.b == null, "Idle timer still set", new Object[0]);
        U u = this.i;
        if (u == U.Error) {
            u();
            return;
        }
        AbstractC0260b.d(u == U.Initial, "Already started", new Object[0]);
        this.k = this.c.m(this.d, new C0005c(new a(this.j)));
        this.i = U.Starting;
    }

    public void w() {
        if (n()) {
            i(U.Initial, p0.e);
        }
    }

    protected void y(Object obj) {
        this.f.x();
        E9.x.a(getClass().getSimpleName(), "(%x) Stream sending: %s", Integer.valueOf(System.identityHashCode(this)), obj);
        h();
        this.k.sendMessage(obj);
    }

    protected void x() {
    }
}