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

应用版本信息
应用名称:Wall
版本号:1.0.4
包名称:com.bundle.wallapp

MD5 校验值:b359069a22e95e2832438c301625aae5

反编译源代码说明

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


package id;

import id.c;
import id.p0;
import java.net.ConnectException;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import jd.g;
import vf.g1;
import vf.v0;
import vf.w0;

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

    private static final long f17435n;

    private static final long f17436o;

    private static final long f17437p;

    private static final long f17438q;

    private static final long f17439r;

    private g.b f17440a;

    private g.b f17441b;

    private final u f17442c;

    private final w0<ReqT, RespT> f17443d;

    private final jd.g f17445f;

    private final g.d f17446g;

    private final g.d f17447h;

    private vf.g<ReqT, RespT> f17450k;

    final jd.r f17451l;

    final CallbackT f17452m;

    private o0 f17448i = o0.Initial;

    private long f17449j = 0;

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

    public class a {

        private final long f17453a;

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

        void a(Runnable runnable) {
            c.this.f17445f.w();
            if (c.this.f17449j == this.f17453a) {
                runnable.run();
            } else {
                jd.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 C0244c implements f0<RespT> {

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

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

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

        public void j(vf.v0 v0Var) {
            if (jd.v.c()) {
                HashMap hashMap = new HashMap();
                for (String str : v0Var.j()) {
                    if (m.f17523e.contains(str.toLowerCase(Locale.ENGLISH))) {
                        hashMap.put(str, (String) v0Var.g(v0.g.e(str, vf.v0.f24241e)));
                    }
                }
                if (hashMap.isEmpty()) {
                    return;
                }
                jd.v.a(c.this.getClass().getSimpleName(), "(%x) Stream received headers: %s", Integer.valueOf(System.identityHashCode(c.this)), hashMap);
            }
        }

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

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

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

        @Override
        public void b(final g1 g1Var) {
            this.f17456a.a(new Runnable() {
                @Override
                public final void run() {
                    c.C0244c.this.i(g1Var);
                }
            });
        }

        @Override
        public void c(final vf.v0 v0Var) {
            this.f17456a.a(new Runnable() {
                @Override
                public final void run() {
                    c.C0244c.this.j(v0Var);
                }
            });
        }

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

    static {
        TimeUnit timeUnit = TimeUnit.SECONDS;
        f17435n = timeUnit.toMillis(1L);
        TimeUnit timeUnit2 = TimeUnit.MINUTES;
        f17436o = timeUnit2.toMillis(1L);
        f17437p = timeUnit2.toMillis(1L);
        f17438q = timeUnit.toMillis(10L);
        f17439r = timeUnit.toMillis(10L);
    }

    public c(u uVar, w0<ReqT, RespT> w0Var, jd.g gVar, g.d dVar, g.d dVar2, g.d dVar3, CallbackT callbackt) {
        this.f17442c = uVar;
        this.f17443d = w0Var;
        this.f17445f = gVar;
        this.f17446g = dVar2;
        this.f17447h = dVar3;
        this.f17452m = callbackt;
        this.f17451l = new jd.r(gVar, dVar, f17435n, 1.5d, f17436o);
    }

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

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

    private void i(o0 o0Var, g1 g1Var) {
        jd.b.d(n(), "Only started streams should be closed.", new Object[0]);
        o0 o0Var2 = o0.Error;
        jd.b.d(o0Var == o0Var2 || g1Var.o(), "Can't provide an error when not in an error state.", new Object[0]);
        this.f17445f.w();
        if (m.h(g1Var)) {
            jd.g0.o(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.", g1Var.l()));
        }
        h();
        g();
        this.f17451l.c();
        this.f17449j++;
        g1.b m10 = g1Var.m();
        if (m10 == g1.b.OK) {
            this.f17451l.f();
        } else if (m10 == g1.b.RESOURCE_EXHAUSTED) {
            jd.v.a(getClass().getSimpleName(), "(%x) Using maximum backoff delay to prevent overloading the backend.", Integer.valueOf(System.identityHashCode(this)));
            this.f17451l.g();
        } else if (m10 == g1.b.UNAUTHENTICATED && this.f17448i != o0.Healthy) {
            this.f17442c.h();
        } else if (m10 == g1.b.UNAVAILABLE && ((g1Var.l() instanceof UnknownHostException) || (g1Var.l() instanceof ConnectException))) {
            this.f17451l.h(f17439r);
        }
        if (o0Var != o0Var2) {
            jd.v.a(getClass().getSimpleName(), "(%x) Performing stream teardown", Integer.valueOf(System.identityHashCode(this)));
            w();
        }
        if (this.f17450k != null) {
            if (g1Var.o()) {
                jd.v.a(getClass().getSimpleName(), "(%x) Closing stream client-side", Integer.valueOf(System.identityHashCode(this)));
                this.f17450k.b();
            }
            this.f17450k = null;
        }
        this.f17448i = o0Var;
        this.f17452m.b(g1Var);
    }

    public void j() {
        if (m()) {
            i(o0.Initial, g1.f24092f);
        }
    }

    public void o() {
        if (m()) {
            this.f17448i = o0.Healthy;
        }
    }

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

    public void s() {
        this.f17448i = o0.Open;
        this.f17452m.a();
        if (this.f17440a == null) {
            this.f17440a = this.f17445f.k(this.f17447h, f17438q, new Runnable() {
                @Override
                public final void run() {
                    c.this.o();
                }
            });
        }
    }

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

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

    public void l() {
        jd.b.d(!n(), "Can only inhibit backoff after in a stopped state", new Object[0]);
        this.f17445f.w();
        this.f17448i = o0.Initial;
        this.f17451l.f();
    }

    public boolean m() {
        this.f17445f.w();
        o0 o0Var = this.f17448i;
        return o0Var == o0.Open || o0Var == o0.Healthy;
    }

    public boolean n() {
        this.f17445f.w();
        o0 o0Var = this.f17448i;
        return o0Var == o0.Starting || o0Var == o0.Backoff || m();
    }

    public void q() {
        if (m() && this.f17441b == null) {
            this.f17441b = this.f17445f.k(this.f17446g, f17437p, this.f17444e);
        }
    }

    public abstract void r(RespT respt);

    public void u() {
        this.f17445f.w();
        jd.b.d(this.f17450k == null, "Last call still set", new Object[0]);
        jd.b.d(this.f17441b == null, "Idle timer still set", new Object[0]);
        o0 o0Var = this.f17448i;
        if (o0Var == o0.Error) {
            t();
            return;
        }
        jd.b.d(o0Var == o0.Initial, "Already started", new Object[0]);
        this.f17450k = this.f17442c.m(this.f17443d, new C0244c(new a(this.f17449j)));
        this.f17448i = o0.Starting;
    }

    public void v() {
        if (n()) {
            i(o0.Initial, g1.f24092f);
        }
    }

    protected void w() {
    }

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