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

应用版本信息
应用名称:Соседи
版本号:3.1.3
包名称:by.imlab.sosedi.kupilka

MD5 校验值:52ffe34fa08a87a6cc4bc36d7eb3dad1

反编译源代码说明

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


package dp;

import androidx.biometric.l0;
import bm.m;
import com.huawei.hms.framework.common.NetworkUtil;
import com.huawei.hms.push.constant.RemoteMessageConst;
import fp.b;
import gp.e;
import gp.r;
import gp.v;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.ConnectException;
import java.net.InetSocketAddress;
import java.net.ProtocolException;
import java.net.Proxy;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownServiceException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import mp.b0;
import mp.c0;
import mp.h;
import mp.j0;
import okhttp3.internal.connection.RouteException;
import zo.a0;
import zo.e0;
import zo.h0;
import zo.p;
import zo.s;
import zo.t;
import zo.u;
import zo.y;
import zo.z;

public final class f extends e.b {

    public final h0 f11180b;

    public Socket f11181c;

    public Socket f11182d;

    public s f11183e;

    public z f11184f;

    public gp.e f11185g;

    public c0 f11186h;

    public b0 f11187i;

    public boolean f11188j;

    public boolean f11189k;

    public int f11190l;

    public int f11191m;

    public int f11192n;

    public int f11193o;

    public final ArrayList f11194p;
    public long q;

    public class a {
        public static final int[] $EnumSwitchMapping$0;

        static {
            int[] iArr = new int[Proxy.Type.values().length];
            iArr[Proxy.Type.DIRECT.ordinal()] = 1;
            iArr[Proxy.Type.HTTP.ordinal()] = 2;
            $EnumSwitchMapping$0 = iArr;
        }
    }

    public f(j jVar, h0 h0Var) {
        m.f(jVar, "connectionPool");
        m.f(h0Var, "route");
        this.f11180b = h0Var;
        this.f11193o = 1;
        this.f11194p = new ArrayList();
        this.q = Long.MAX_VALUE;
    }

    public static void d(y yVar, h0 h0Var, IOException iOException) {
        m.f(yVar, "client");
        m.f(h0Var, "failedRoute");
        m.f(iOException, "failure");
        if (h0Var.f38537b.type() != Proxy.Type.DIRECT) {
            zo.a aVar = h0Var.f38536a;
            aVar.f38431h.connectFailed(aVar.f38432i.g(), h0Var.f38537b.address(), iOException);
        }
        y.e eVar = yVar.Y;
        synchronized (eVar) {
            ((Set) eVar.f36969a).add(h0Var);
        }
    }

    @Override
    public final synchronized void a(gp.e eVar, v vVar) {
        int i10;
        m.f(eVar, "connection");
        m.f(vVar, "settings");
        if ((vVar.f16599a & 16) != 0) {
            i10 = vVar.f16600b[4];
        } else {
            i10 = NetworkUtil.UNAVAILABLE;
        }
        this.f11193o = i10;
    }

    @Override
    public final void b(r rVar) throws IOException {
        m.f(rVar, "stream");
        rVar.c(gp.a.REFUSED_STREAM, null);
    }

    public final void c(int i10, int i11, int i12, int i13, boolean z10, e eVar, p pVar) {
        Socket socket;
        Socket socket2;
        h0 h0Var;
        m.f(eVar, "call");
        m.f(pVar, "eventListener");
        if (this.f11184f == null) {
            List<zo.k> list = this.f11180b.f38536a.f38434k;
            b bVar = new b(list);
            zo.a aVar = this.f11180b.f38536a;
            if (aVar.f38426c == null) {
                if (list.contains(zo.k.f38567f)) {
                    String str = this.f11180b.f38536a.f38432i.f38615d;
                    ip.k kVar = ip.k.f19450a;
                    if (!ip.k.f19450a.h(str)) {
                        throw new RouteException(new UnknownServiceException(d0.g.b("CLEARTEXT communication to ", str, " not permitted by network security policy")));
                    }
                } else {
                    throw new RouteException(new UnknownServiceException("CLEARTEXT communication not enabled for client"));
                }
            } else if (aVar.f38433j.contains(z.H2_PRIOR_KNOWLEDGE)) {
                throw new RouteException(new UnknownServiceException("H2_PRIOR_KNOWLEDGE cannot be used with HTTPS"));
            }
            RouteException routeException = null;
            do {
                try {
                    h0 h0Var2 = this.f11180b;
                    try {
                        if (h0Var2.f38536a.f38426c != null && h0Var2.f38537b.type() == Proxy.Type.HTTP) {
                            f(i10, i11, i12, eVar, pVar);
                            if (this.f11181c == null) {
                                h0Var = this.f11180b;
                                if (!(h0Var.f38536a.f38426c == null && h0Var.f38537b.type() == Proxy.Type.HTTP) && this.f11181c == null) {
                                    throw new RouteException(new ProtocolException("Too many tunnel connections attempted: 21"));
                                }
                                this.q = System.nanoTime();
                                return;
                            }
                        } else {
                            try {
                                e(i10, i11, eVar, pVar);
                            } catch (IOException e10) {
                                e = e10;
                                socket = this.f11182d;
                                if (socket != null) {
                                    ap.b.e(socket);
                                }
                                socket2 = this.f11181c;
                                if (socket2 != null) {
                                    ap.b.e(socket2);
                                }
                                this.f11182d = null;
                                this.f11181c = null;
                                this.f11186h = null;
                                this.f11187i = null;
                                this.f11183e = null;
                                this.f11184f = null;
                                this.f11185g = null;
                                this.f11193o = 1;
                                h0 h0Var3 = this.f11180b;
                                InetSocketAddress inetSocketAddress = h0Var3.f38538c;
                                Proxy proxy = h0Var3.f38537b;
                                m.f(inetSocketAddress, "inetSocketAddress");
                                m.f(proxy, "proxy");
                                if (routeException != null) {
                                    routeException = new RouteException(e);
                                } else {
                                    l0.c(routeException.f27997a, e);
                                    routeException.f27998b = e;
                                }
                                if (!z10) {
                                    bVar.f11130d = true;
                                } else {
                                    throw routeException;
                                }
                            }
                        }
                        g(bVar, i13, eVar, pVar);
                        h0 h0Var4 = this.f11180b;
                        InetSocketAddress inetSocketAddress2 = h0Var4.f38538c;
                        Proxy proxy2 = h0Var4.f38537b;
                        p.a aVar2 = p.f38595a;
                        m.f(inetSocketAddress2, "inetSocketAddress");
                        m.f(proxy2, "proxy");
                        h0Var = this.f11180b;
                        if (!(h0Var.f38536a.f38426c == null && h0Var.f38537b.type() == Proxy.Type.HTTP)) {
                        }
                        this.q = System.nanoTime();
                        return;
                    } catch (IOException e11) {
                        e = e11;
                        socket = this.f11182d;
                        if (socket != null) {
                        }
                        socket2 = this.f11181c;
                        if (socket2 != null) {
                        }
                        this.f11182d = null;
                        this.f11181c = null;
                        this.f11186h = null;
                        this.f11187i = null;
                        this.f11183e = null;
                        this.f11184f = null;
                        this.f11185g = null;
                        this.f11193o = 1;
                        h0 h0Var32 = this.f11180b;
                        InetSocketAddress inetSocketAddress3 = h0Var32.f38538c;
                        Proxy proxy3 = h0Var32.f38537b;
                        m.f(inetSocketAddress3, "inetSocketAddress");
                        m.f(proxy3, "proxy");
                        if (routeException != null) {
                        }
                        if (!z10) {
                        }
                    }
                } catch (IOException e12) {
                    e = e12;
                }
            } while ((!bVar.f11129c || (e instanceof ProtocolException) || (e instanceof InterruptedIOException) || ((e instanceof SSLHandshakeException) && (e.getCause() instanceof CertificateException)) || (e instanceof SSLPeerUnverifiedException) || !(e instanceof SSLException)) ? false : true);
            throw routeException;
        }
        throw new IllegalStateException("already connected".toString());
    }

    public final void e(int i10, int i11, e eVar, p pVar) throws IOException {
        int i12;
        Socket createSocket;
        h0 h0Var = this.f11180b;
        Proxy proxy = h0Var.f38537b;
        zo.a aVar = h0Var.f38536a;
        Proxy.Type type = proxy.type();
        if (type == null) {
            i12 = -1;
        } else {
            i12 = a.$EnumSwitchMapping$0[type.ordinal()];
        }
        if (i12 != 1 && i12 != 2) {
            createSocket = new Socket(proxy);
        } else {
            createSocket = aVar.f38425b.createSocket();
            m.c(createSocket);
        }
        this.f11181c = createSocket;
        InetSocketAddress inetSocketAddress = this.f11180b.f38538c;
        pVar.getClass();
        m.f(eVar, "call");
        m.f(inetSocketAddress, "inetSocketAddress");
        createSocket.setSoTimeout(i11);
        try {
            ip.k kVar = ip.k.f19450a;
            ip.k.f19450a.e(createSocket, this.f11180b.f38538c, i10);
            try {
                this.f11186h = mp.v.b(mp.v.e(createSocket));
                this.f11187i = mp.v.a(mp.v.d(createSocket));
            } catch (NullPointerException e10) {
                if (!m.a(e10.getMessage(), "throw with null exception")) {
                } else {
                    throw new IOException(e10);
                }
            }
        } catch (ConnectException e11) {
            ConnectException connectException = new ConnectException(m.k(this.f11180b.f38538c, "Failed to connect to "));
            connectException.initCause(e11);
            throw connectException;
        }
    }

    public final void f(int i10, int i11, int i12, e eVar, p pVar) throws IOException {
        a0.a aVar = new a0.a();
        u uVar = this.f11180b.f38536a.f38432i;
        m.f(uVar, RemoteMessageConst.Notification.URL);
        aVar.f38441a = uVar;
        y yVar = null;
        aVar.d("CONNECT", null);
        boolean z10 = true;
        aVar.c("Host", ap.b.v(this.f11180b.f38536a.f38432i, true));
        aVar.c("Proxy-Connection", "Keep-Alive");
        aVar.c("User-Agent", "okhttp/4.10.0");
        a0 a8 = aVar.a();
        e0.a aVar2 = new e0.a();
        aVar2.f38514a = a8;
        aVar2.f38515b = z.HTTP_1_1;
        aVar2.f38516c = 407;
        aVar2.f38517d = "Preemptive Authenticate";
        aVar2.f38520g = ap.b.f3532c;
        aVar2.f38524k = -1L;
        aVar2.f38525l = -1L;
        t.a aVar3 = aVar2.f38519f;
        aVar3.getClass();
        t.b.a("Proxy-Authenticate");
        t.b.b("OkHttp-Preemptive", "Proxy-Authenticate");
        aVar3.f("Proxy-Authenticate");
        aVar3.c("Proxy-Authenticate", "OkHttp-Preemptive");
        e0 a10 = aVar2.a();
        h0 h0Var = this.f11180b;
        a0 a11 = h0Var.f38536a.f38429f.a(h0Var, a10);
        if (a11 != null) {
            a8 = a11;
        }
        u uVar2 = a8.f38435a;
        int i13 = 0;
        while (i13 < 21) {
            int i14 = i13 + 1;
            e(i10, i11, eVar, pVar);
            String str = "CONNECT " + ap.b.v(uVar2, z10) + " HTTP/1.1";
            while (true) {
                c0 c0Var = this.f11186h;
                m.c(c0Var);
                b0 b0Var = this.f11187i;
                m.c(b0Var);
                fp.b bVar = new fp.b(yVar, this, c0Var, b0Var);
                TimeUnit timeUnit = TimeUnit.MILLISECONDS;
                c0Var.l().g(i11, timeUnit);
                int i15 = i14;
                b0Var.l().g(i12, timeUnit);
                bVar.k(a8.f38437c, str);
                bVar.a();
                e0.a b10 = bVar.b(false);
                m.c(b10);
                b10.f38514a = a8;
                e0 a12 = b10.a();
                long k7 = ap.b.k(a12);
                if (k7 != -1) {
                    b.d j10 = bVar.j(k7);
                    ap.b.t(j10, NetworkUtil.UNAVAILABLE, timeUnit);
                    j10.close();
                }
                int i16 = a12.f38503d;
                if (i16 != 200) {
                    if (i16 == 407) {
                        h0 h0Var2 = this.f11180b;
                        a0 a13 = h0Var2.f38536a.f38429f.a(h0Var2, a12);
                        if (a13 != null) {
                            if (po.k.K("close", e0.c(a12, "Connection"), true)) {
                                a8 = a13;
                                break;
                            } else {
                                a8 = a13;
                                i14 = i15;
                                yVar = null;
                            }
                        } else {
                            throw new IOException("Failed to authenticate with proxy");
                        }
                    } else {
                        throw new IOException(m.k(Integer.valueOf(a12.f38503d), "Unexpected response code for CONNECT: "));
                    }
                } else if (c0Var.f25945b.H() && b0Var.f25940b.H()) {
                    a8 = null;
                } else {
                    throw new IOException("TLS tunnel buffered too many bytes!");
                }
            }
        }
    }

    public final void g(b bVar, int i10, e eVar, p pVar) throws IOException {
        z zVar = z.HTTP_1_1;
        zo.a aVar = this.f11180b.f38536a;
        if (aVar.f38426c == null) {
            List<z> list = aVar.f38433j;
            z zVar2 = z.H2_PRIOR_KNOWLEDGE;
            if (list.contains(zVar2)) {
                this.f11182d = this.f11181c;
                this.f11184f = zVar2;
                l(i10);
                return;
            } else {
                this.f11182d = this.f11181c;
                this.f11184f = zVar;
                return;
            }
        }
        pVar.getClass();
        m.f(eVar, "call");
        zo.a aVar2 = this.f11180b.f38536a;
        SSLSocketFactory sSLSocketFactory = aVar2.f38426c;
        SSLSocket sSLSocket = null;
        String str = null;
        try {
            m.c(sSLSocketFactory);
            Socket socket = this.f11181c;
            u uVar = aVar2.f38432i;
            Socket createSocket = sSLSocketFactory.createSocket(socket, uVar.f38615d, uVar.f38616e, true);
            if (createSocket != null) {
                SSLSocket sSLSocket2 = (SSLSocket) createSocket;
                try {
                    zo.k a8 = bVar.a(sSLSocket2);
                    if (a8.f38569b) {
                        ip.k kVar = ip.k.f19450a;
                        ip.k.f19450a.d(sSLSocket2, aVar2.f38432i.f38615d, aVar2.f38433j);
                    }
                    sSLSocket2.startHandshake();
                    SSLSession session = sSLSocket2.getSession();
                    m.e(session, "sslSocketSession");
                    s a10 = s.a.a(session);
                    HostnameVerifier hostnameVerifier = aVar2.f38427d;
                    m.c(hostnameVerifier);
                    if (!hostnameVerifier.verify(aVar2.f38432i.f38615d, session)) {
                        List<Certificate> a11 = a10.a();
                        if (!a11.isEmpty()) {
                            X509Certificate x509Certificate = (X509Certificate) a11.get(0);
                            StringBuilder sb2 = new StringBuilder();
                            sb2.append("\n              |Hostname ");
                            sb2.append(aVar2.f38432i.f38615d);
                            sb2.append(" not verified:\n              |    certificate: ");
                            zo.g gVar = zo.g.f38530c;
                            m.f(x509Certificate, "certificate");
                            mp.h hVar = mp.h.f25963d;
                            byte[] encoded = x509Certificate.getPublicKey().getEncoded();
                            m.e(encoded, "publicKey.encoded");
                            sb2.append(m.k(h.a.d(encoded).n("SHA-256").a(), "sha256/"));
                            sb2.append("\n              |    DN: ");
                            sb2.append((Object) x509Certificate.getSubjectDN().getName());
                            sb2.append("\n              |    subjectAltNames: ");
                            sb2.append(pl.v.p0(lp.d.a(x509Certificate, 2), lp.d.a(x509Certificate, 7)));
                            sb2.append("\n              ");
                            throw new SSLPeerUnverifiedException(po.g.G(sb2.toString()));
                        }
                        throw new SSLPeerUnverifiedException("Hostname " + aVar2.f38432i.f38615d + " not verified (no certificates)");
                    }
                    zo.g gVar2 = aVar2.f38428e;
                    m.c(gVar2);
                    this.f11183e = new s(a10.f38603a, a10.f38604b, a10.f38605c, new g(gVar2, a10, aVar2));
                    gVar2.a(aVar2.f38432i.f38615d, new h(this));
                    if (a8.f38569b) {
                        ip.k kVar2 = ip.k.f19450a;
                        str = ip.k.f19450a.f(sSLSocket2);
                    }
                    this.f11182d = sSLSocket2;
                    this.f11186h = mp.v.b(mp.v.e(sSLSocket2));
                    this.f11187i = mp.v.a(mp.v.d(sSLSocket2));
                    if (str != null) {
                        zVar = z.a.a(str);
                    }
                    this.f11184f = zVar;
                    ip.k kVar3 = ip.k.f19450a;
                    ip.k.f19450a.a(sSLSocket2);
                    if (this.f11184f == z.HTTP_2) {
                        l(i10);
                        return;
                    }
                    return;
                } catch (Throwable th2) {
                    th = th2;
                    sSLSocket = sSLSocket2;
                    if (sSLSocket != null) {
                        ip.k kVar4 = ip.k.f19450a;
                        ip.k.f19450a.a(sSLSocket);
                    }
                    if (sSLSocket != null) {
                        ap.b.e(sSLSocket);
                    }
                    throw th;
                }
            }
            throw new NullPointerException("null cannot be cast to non-null type javax.net.ssl.SSLSocket");
        } catch (Throwable th3) {
            th = th3;
        }
    }

    public final boolean h(zo.a aVar, List<h0> list) {
        boolean z10;
        boolean z11;
        s sVar;
        boolean z12;
        boolean z13;
        m.f(aVar, "address");
        byte[] bArr = ap.b.f3530a;
        if (this.f11194p.size() >= this.f11193o || this.f11188j || !this.f11180b.f38536a.a(aVar)) {
            return false;
        }
        if (m.a(aVar.f38432i.f38615d, this.f11180b.f38536a.f38432i.f38615d)) {
            return true;
        }
        if (this.f11185g != null && list != null) {
            if (!list.isEmpty()) {
                for (h0 h0Var : list) {
                    if (h0Var.f38537b.type() == Proxy.Type.DIRECT && this.f11180b.f38537b.type() == Proxy.Type.DIRECT && m.a(this.f11180b.f38538c, h0Var.f38538c)) {
                        z13 = true;
                    } else {
                        z13 = false;
                    }
                    if (z13) {
                        z10 = true;
                        break;
                    }
                }
            }
            z10 = false;
            if (!z10 || aVar.f38427d != lp.d.f24485a) {
                return false;
            }
            u uVar = aVar.f38432i;
            byte[] bArr2 = ap.b.f3530a;
            u uVar2 = this.f11180b.f38536a.f38432i;
            if (uVar.f38616e == uVar2.f38616e) {
                if (!m.a(uVar.f38615d, uVar2.f38615d)) {
                    if (!this.f11189k && (sVar = this.f11183e) != null) {
                        List<Certificate> a8 = sVar.a();
                        if (!a8.isEmpty()) {
                            if (lp.d.c((X509Certificate) a8.get(0), uVar.f38615d)) {
                                z12 = true;
                            }
                        }
                        z12 = false;
                    }
                }
                z11 = true;
                if (z11) {
                    return false;
                }
                try {
                    zo.g gVar = aVar.f38428e;
                    m.c(gVar);
                    String str = aVar.f38432i.f38615d;
                    s sVar2 = this.f11183e;
                    m.c(sVar2);
                    List<Certificate> a10 = sVar2.a();
                    m.f(str, "hostname");
                    m.f(a10, "peerCertificates");
                    gVar.a(str, new zo.h(gVar, a10, str));
                    return true;
                } catch (SSLPeerUnverifiedException unused) {
                }
            }
            z11 = false;
            if (z11) {
            }
        }
        return false;
    }

    public final boolean i(boolean z10) {
        long j10;
        byte[] bArr = ap.b.f3530a;
        long nanoTime = System.nanoTime();
        Socket socket = this.f11181c;
        m.c(socket);
        Socket socket2 = this.f11182d;
        m.c(socket2);
        c0 c0Var = this.f11186h;
        m.c(c0Var);
        if (socket.isClosed() || socket2.isClosed() || socket2.isInputShutdown() || socket2.isOutputShutdown()) {
            return false;
        }
        gp.e eVar = this.f11185g;
        if (eVar != null) {
            synchronized (eVar) {
                if (eVar.f16478g) {
                    return false;
                }
                if (eVar.f16487p < eVar.f16486o) {
                    if (nanoTime >= eVar.q) {
                        return false;
                    }
                }
                return true;
            }
        }
        synchronized (this) {
            j10 = nanoTime - this.q;
        }
        if (j10 < 10000000000L || !z10) {
            return true;
        }
        try {
            int soTimeout = socket2.getSoTimeout();
            try {
                socket2.setSoTimeout(1);
                boolean z11 = !c0Var.H();
                socket2.setSoTimeout(soTimeout);
                return z11;
            } catch (Throwable th2) {
                socket2.setSoTimeout(soTimeout);
                throw th2;
            }
        } catch (SocketTimeoutException unused) {
            return true;
        } catch (IOException unused2) {
            return false;
        }
    }

    public final ep.d j(y yVar, ep.f fVar) throws SocketException {
        Socket socket = this.f11182d;
        m.c(socket);
        c0 c0Var = this.f11186h;
        m.c(c0Var);
        b0 b0Var = this.f11187i;
        m.c(b0Var);
        gp.e eVar = this.f11185g;
        if (eVar != null) {
            return new gp.p(yVar, this, fVar, eVar);
        }
        socket.setSoTimeout(fVar.f12875g);
        j0 l10 = c0Var.l();
        long j10 = fVar.f12875g;
        TimeUnit timeUnit = TimeUnit.MILLISECONDS;
        l10.g(j10, timeUnit);
        b0Var.l().g(fVar.f12876h, timeUnit);
        return new fp.b(yVar, this, c0Var, b0Var);
    }

    public final synchronized void k() {
        this.f11188j = true;
    }

    public final void l(int i10) throws IOException {
        String k7;
        int i11;
        int i12;
        Socket socket = this.f11182d;
        m.c(socket);
        c0 c0Var = this.f11186h;
        m.c(c0Var);
        b0 b0Var = this.f11187i;
        m.c(b0Var);
        socket.setSoTimeout(0);
        cp.d dVar = cp.d.f10229h;
        e.a aVar = new e.a(dVar);
        String str = this.f11180b.f38536a.f38432i.f38615d;
        m.f(str, "peerName");
        aVar.f16499c = socket;
        if (aVar.f16497a) {
            k7 = ap.b.f3535f + ' ' + str;
        } else {
            k7 = m.k(str, "MockWebServer ");
        }
        m.f(k7, "<set-?>");
        aVar.f16500d = k7;
        aVar.f16501e = c0Var;
        aVar.f16502f = b0Var;
        aVar.f16503g = this;
        aVar.f16505i = i10;
        gp.e eVar = new gp.e(aVar);
        this.f11185g = eVar;
        v vVar = gp.e.B;
        if ((vVar.f16599a & 16) != 0) {
            i11 = vVar.f16600b[4];
        } else {
            i11 = NetworkUtil.UNAVAILABLE;
        }
        this.f11193o = i11;
        gp.s sVar = eVar.f16495y;
        synchronized (sVar) {
            if (!sVar.f16590e) {
                if (sVar.f16587b) {
                    Logger logger = gp.s.f16585g;
                    if (logger.isLoggable(Level.FINE)) {
                        logger.fine(ap.b.i(m.k(gp.d.f16468b.s(), ">> CONNECTION "), new Object[0]));
                    }
                    sVar.f16586a.s(gp.d.f16468b);
                    sVar.f16586a.flush();
                }
            } else {
                throw new IOException("closed");
            }
        }
        gp.s sVar2 = eVar.f16495y;
        v vVar2 = eVar.f16488r;
        synchronized (sVar2) {
            m.f(vVar2, "settings");
            if (!sVar2.f16590e) {
                sVar2.d(0, Integer.bitCount(vVar2.f16599a) * 6, 4, 0);
                int i13 = 0;
                while (i13 < 10) {
                    int i14 = i13 + 1;
                    boolean z10 = true;
                    if (((1 << i13) & vVar2.f16599a) == 0) {
                        z10 = false;
                    }
                    if (z10) {
                        if (i13 != 4) {
                            if (i13 != 7) {
                                i12 = i13;
                            } else {
                                i12 = 4;
                            }
                        } else {
                            i12 = 3;
                        }
                        sVar2.f16586a.writeShort(i12);
                        sVar2.f16586a.writeInt(vVar2.f16600b[i13]);
                    }
                    i13 = i14;
                }
                sVar2.f16586a.flush();
            } else {
                throw new IOException("closed");
            }
        }
        if (eVar.f16488r.a() != 65535) {
            eVar.f16495y.k(r0 - 65535, 0);
        }
        dVar.f().c(new cp.b(eVar.f16475d, eVar.f16496z), 0L);
    }

    public final String toString() {
        zo.i iVar;
        StringBuilder b10 = android.support.v4.media.d.b("Connection{");
        b10.append(this.f11180b.f38536a.f38432i.f38615d);
        b10.append(':');
        b10.append(this.f11180b.f38536a.f38432i.f38616e);
        b10.append(", proxy=");
        b10.append(this.f11180b.f38537b);
        b10.append(" hostAddress=");
        b10.append(this.f11180b.f38538c);
        b10.append(" cipherSuite=");
        s sVar = this.f11183e;
        Object obj = "none";
        if (sVar != null && (iVar = sVar.f38604b) != null) {
            obj = iVar;
        }
        b10.append(obj);
        b10.append(" protocol=");
        b10.append(this.f11184f);
        b10.append('}');
        return b10.toString();
    }
}