导航菜单

页面标题

页面副标题

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

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

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


package D9;

import D9.AbstractC0802c;
import E9.AbstractC0843b;
import E9.C0848g;
import io.grpc.AbstractC3281g;
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 AbstractC0802c {

    private static final long f2018n;

    private static final long f2019o;

    private static final long f2020p;

    private static final long f2021q;

    private static final long f2022r;

    private C0848g.b f2023a;

    private C0848g.b f2024b;

    private final C0823y f2025c;

    private final io.grpc.a0 f2026d;

    private final C0848g f2028f;

    private final C0848g.d f2029g;

    private final C0848g.d f2030h;

    private AbstractC3281g f2033k;

    final E9.r f2034l;

    final V f2035m;

    private U f2031i = U.Initial;

    private long f2032j = 0;

    private final b f2027e = new b();

    class a {

        private final long f2036a;

        a(long j10) {
            this.f2036a = j10;
        }

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

    class b implements Runnable {
        b() {
        }

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

    class C0023c implements J {

        private final a f2039a;

        private int f2040b = 0;

        C0023c(a aVar) {
            this.f2039a = aVar;
        }

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

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

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

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

        @Override
        public void a(final p0 p0Var) {
            this.f2039a.a(new Runnable() {
                @Override
                public final void run() {
                    AbstractC0802c.C0023c.this.h(p0Var);
                }
            });
        }

        @Override
        public void b() {
            this.f2039a.a(new Runnable() {
                @Override
                public final void run() {
                    AbstractC0802c.C0023c.this.k();
                }
            });
        }

        @Override
        public void c(final io.grpc.Z z10) {
            this.f2039a.a(new Runnable() {
                @Override
                public final void run() {
                    AbstractC0802c.C0023c.this.i(z10);
                }
            });
        }

        @Override
        public void onNext(final Object obj) {
            final int i10 = this.f2040b + 1;
            this.f2039a.a(new Runnable() {
                @Override
                public final void run() {
                    AbstractC0802c.C0023c.this.j(i10, obj);
                }
            });
            this.f2040b = i10;
        }
    }

    static {
        TimeUnit timeUnit = TimeUnit.SECONDS;
        f2018n = timeUnit.toMillis(1L);
        TimeUnit timeUnit2 = TimeUnit.MINUTES;
        f2019o = timeUnit2.toMillis(1L);
        f2020p = timeUnit2.toMillis(1L);
        f2021q = timeUnit.toMillis(10L);
        f2022r = timeUnit.toMillis(10L);
    }

    AbstractC0802c(C0823y c0823y, io.grpc.a0 a0Var, C0848g c0848g, C0848g.d dVar, C0848g.d dVar2, C0848g.d dVar3, V v10) {
        this.f2025c = c0823y;
        this.f2026d = a0Var;
        this.f2028f = c0848g;
        this.f2029g = dVar2;
        this.f2030h = dVar3;
        this.f2035m = v10;
        this.f2034l = new E9.r(c0848g, dVar, f2018n, 1.5d, f2019o);
    }

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

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

    private void i(U u10, p0 p0Var) {
        AbstractC0843b.d(n(), "Only started streams should be closed.", new Object[0]);
        U u11 = U.Error;
        AbstractC0843b.d(u10 == u11 || p0Var.p(), "Can't provide an error when not in an error state.", new Object[0]);
        this.f2028f.x();
        if (C0816q.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.f2034l.c();
        this.f2032j++;
        p0.b n10 = p0Var.n();
        if (n10 == p0.b.OK) {
            this.f2034l.f();
        } else if (n10 == p0.b.RESOURCE_EXHAUSTED) {
            E9.x.a(getClass().getSimpleName(), "(%x) Using maximum backoff delay to prevent overloading the backend.", Integer.valueOf(System.identityHashCode(this)));
            this.f2034l.g();
        } else if (n10 == p0.b.UNAUTHENTICATED && this.f2031i != U.Healthy) {
            this.f2025c.h();
        } else if (n10 == p0.b.UNAVAILABLE && ((p0Var.m() instanceof UnknownHostException) || (p0Var.m() instanceof ConnectException))) {
            this.f2034l.h(f2022r);
        }
        if (u10 != u11) {
            E9.x.a(getClass().getSimpleName(), "(%x) Performing stream teardown", Integer.valueOf(System.identityHashCode(this)));
            x();
        }
        if (this.f2033k != null) {
            if (p0Var.p()) {
                E9.x.a(getClass().getSimpleName(), "(%x) Closing stream client-side", Integer.valueOf(System.identityHashCode(this)));
                this.f2033k.halfClose();
            }
            this.f2033k = null;
        }
        this.f2031i = u10;
        this.f2035m.a(p0Var);
    }

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

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

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

    public void t() {
        this.f2031i = U.Open;
        this.f2035m.b();
        if (this.f2023a == null) {
            this.f2023a = this.f2028f.k(this.f2030h, f2021q, new Runnable() {
                @Override
                public final void run() {
                    AbstractC0802c.this.o();
                }
            });
        }
    }

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

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

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

    public boolean m() {
        this.f2028f.x();
        U u10 = this.f2031i;
        return u10 == U.Open || u10 == U.Healthy;
    }

    public boolean n() {
        this.f2028f.x();
        U u10 = this.f2031i;
        return u10 == U.Starting || u10 == U.Backoff || m();
    }

    void q() {
        if (m() && this.f2024b == null) {
            this.f2024b = this.f2028f.k(this.f2029g, f2020p, this.f2027e);
        }
    }

    public abstract void r(Object obj);

    public abstract void s(Object obj);

    public void v() {
        this.f2028f.x();
        AbstractC0843b.d(this.f2033k == null, "Last call still set", new Object[0]);
        AbstractC0843b.d(this.f2024b == null, "Idle timer still set", new Object[0]);
        U u10 = this.f2031i;
        if (u10 == U.Error) {
            u();
            return;
        }
        AbstractC0843b.d(u10 == U.Initial, "Already started", new Object[0]);
        this.f2033k = this.f2025c.m(this.f2026d, new C0023c(new a(this.f2032j)));
        this.f2031i = U.Starting;
    }

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

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

    protected void x() {
    }
}