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

应用版本信息
应用名称:Shopping List
版本号:2.74
包名称:com.icedblueberry.shoppinglisteasy

MD5 校验值:8005b9444b02324a81f85f1ef7e26f28

反编译源代码说明

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


package rc;

import java.io.IOException;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.Socket;
import java.net.SocketAddress;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Set;
import oc.c0;
import oc.h;
import oc.m;
import oc.n;
import oc.r;
import oc.u;
import oc.w;
import rc.e;
import v3.g;

public final class f {

    public final oc.a f20757a;

    public e.a f20758b;

    public c0 f20759c;

    public final h f20760d;

    public final oc.d f20761e;

    public final n f20762f;

    public final Object f20763g;

    public final e f20764h;

    public int f20765i;
    public c j;

    public boolean f20766k;

    public boolean f20767l;

    public boolean f20768m;

    public sc.c f20769n;

    public static final class a extends WeakReference<f> {

        public final Object f20770a;

        public a(f fVar, Object obj) {
            super(fVar);
            this.f20770a = obj;
        }
    }

    public f(h hVar, oc.a aVar, oc.d dVar, n nVar, Object obj) {
        this.f20760d = hVar;
        this.f20757a = aVar;
        this.f20761e = dVar;
        this.f20762f = nVar;
        pc.a.f20503a.getClass();
        this.f20764h = new e(aVar, hVar.f20043e, dVar, nVar);
        this.f20763g = obj;
    }

    public final void a(c cVar, boolean z10) {
        if (this.j == null) {
            this.j = cVar;
            this.f20766k = z10;
            cVar.f20744n.add(new a(this, this.f20763g));
            return;
        }
        throw new IllegalStateException();
    }

    public final synchronized c b() {
        return this.j;
    }

    public final Socket c(boolean z10, boolean z11, boolean z12) {
        Socket socket;
        if (z12) {
            this.f20769n = null;
        }
        boolean z13 = true;
        if (z11) {
            this.f20767l = true;
        }
        c cVar = this.j;
        if (cVar == null) {
            return null;
        }
        if (z10) {
            cVar.f20741k = true;
        }
        if (this.f20769n != null) {
            return null;
        }
        if (!this.f20767l && !cVar.f20741k) {
            return null;
        }
        int size = cVar.f20744n.size();
        for (int i10 = 0; i10 < size; i10++) {
            if (((Reference) cVar.f20744n.get(i10)).get() == this) {
                cVar.f20744n.remove(i10);
                if (this.j.f20744n.isEmpty()) {
                    this.j.f20745o = System.nanoTime();
                    u.a aVar = pc.a.f20503a;
                    h hVar = this.f20760d;
                    c cVar2 = this.j;
                    aVar.getClass();
                    hVar.getClass();
                    if (!cVar2.f20741k && hVar.f20039a != 0) {
                        hVar.notifyAll();
                        z13 = false;
                    } else {
                        hVar.f20042d.remove(cVar2);
                    }
                    if (z13) {
                        socket = this.j.f20736e;
                        this.j = null;
                        return socket;
                    }
                }
                socket = null;
                this.j = null;
                return socket;
            }
        }
        throw new IllegalStateException();
    }

    public final c d(boolean z10, int i10, int i11, int i12) throws IOException {
        c cVar;
        c0 c0Var;
        boolean z11;
        Socket socket;
        c cVar2;
        boolean z12;
        boolean z13;
        Socket socket2;
        boolean z14;
        boolean z15;
        boolean z16;
        boolean z17;
        boolean z18;
        String str;
        int i13;
        boolean contains;
        boolean z19;
        synchronized (this.f20760d) {
            if (!this.f20767l) {
                if (this.f20769n == null) {
                    if (!this.f20768m) {
                        cVar = this.j;
                        c0Var = null;
                        z11 = false;
                        if (cVar != null && cVar.f20741k) {
                            socket = c(false, false, true);
                        } else {
                            socket = null;
                        }
                        c cVar3 = this.j;
                        if (cVar3 != null) {
                            cVar = null;
                        } else {
                            cVar3 = null;
                        }
                        if (!this.f20766k) {
                            cVar = null;
                        }
                        if (cVar3 == null) {
                            pc.a.f20503a.b(this.f20760d, this.f20757a, this, null);
                            cVar2 = this.j;
                            if (cVar2 != null) {
                                z12 = true;
                            } else {
                                c0Var = this.f20759c;
                            }
                        }
                        cVar2 = cVar3;
                        z12 = false;
                    } else {
                        throw new IOException("Canceled");
                    }
                } else {
                    throw new IllegalStateException("codec != null");
                }
            } else {
                throw new IllegalStateException("released");
            }
        }
        pc.b.d(socket);
        if (cVar != null) {
            this.f20762f.getClass();
        }
        if (z12) {
            this.f20762f.getClass();
        }
        if (cVar2 != null) {
            return cVar2;
        }
        if (c0Var == null) {
            e.a aVar = this.f20758b;
            if (aVar != null) {
                if (aVar.f20756b < aVar.f20755a.size()) {
                    z19 = true;
                } else {
                    z19 = false;
                }
            }
            e eVar = this.f20764h;
            if (eVar.f20752e < eVar.f20751d.size()) {
                z15 = true;
            } else {
                z15 = false;
            }
            if (!z15 && eVar.f20754g.isEmpty()) {
                z16 = false;
            } else {
                z16 = true;
            }
            if (z16) {
                ArrayList arrayList = new ArrayList();
                do {
                    if (eVar.f20752e < eVar.f20751d.size()) {
                        z17 = true;
                    } else {
                        z17 = false;
                    }
                    if (!z17) {
                        break;
                    }
                    if (eVar.f20752e < eVar.f20751d.size()) {
                        z18 = true;
                    } else {
                        z18 = false;
                    }
                    if (z18) {
                        List<Proxy> list = eVar.f20751d;
                        int i14 = eVar.f20752e;
                        eVar.f20752e = i14 + 1;
                        Proxy proxy = list.get(i14);
                        eVar.f20753f = new ArrayList();
                        if (proxy.type() != Proxy.Type.DIRECT && proxy.type() != Proxy.Type.SOCKS) {
                            SocketAddress address = proxy.address();
                            if (address instanceof InetSocketAddress) {
                                InetSocketAddress inetSocketAddress = (InetSocketAddress) address;
                                InetAddress address2 = inetSocketAddress.getAddress();
                                if (address2 == null) {
                                    str = inetSocketAddress.getHostName();
                                } else {
                                    str = address2.getHostAddress();
                                }
                                i13 = inetSocketAddress.getPort();
                            } else {
                                StringBuilder h10 = c.b.h("Proxy.address() is not an InetSocketAddress: ");
                                h10.append(address.getClass());
                                throw new IllegalArgumentException(h10.toString());
                            }
                        } else {
                            r rVar = eVar.f20748a.f19977a;
                            str = rVar.f20087d;
                            i13 = rVar.f20088e;
                        }
                        if (i13 >= 1 && i13 <= 65535) {
                            if (proxy.type() == Proxy.Type.SOCKS) {
                                eVar.f20753f.add(InetSocketAddress.createUnresolved(str, i13));
                            } else {
                                eVar.f20750c.getClass();
                                ((m.a) eVar.f20748a.f19978b).getClass();
                                if (str != null) {
                                    try {
                                        List asList = Arrays.asList(InetAddress.getAllByName(str));
                                        if (!asList.isEmpty()) {
                                            eVar.f20750c.getClass();
                                            int size = asList.size();
                                            for (int i15 = 0; i15 < size; i15++) {
                                                eVar.f20753f.add(new InetSocketAddress((InetAddress) asList.get(i15), i13));
                                            }
                                        } else {
                                            throw new UnknownHostException(eVar.f20748a.f19978b + " returned no addresses for " + str);
                                        }
                                    } catch (NullPointerException e10) {
                                        UnknownHostException unknownHostException = new UnknownHostException(d9.h.g("Broken system behaviour for dns lookup of ", str));
                                        unknownHostException.initCause(e10);
                                        throw unknownHostException;
                                    }
                                } else {
                                    throw new UnknownHostException("hostname == null");
                                }
                            }
                            int size2 = eVar.f20753f.size();
                            for (int i16 = 0; i16 < size2; i16++) {
                                c0 c0Var2 = new c0(eVar.f20748a, proxy, eVar.f20753f.get(i16));
                                g gVar = eVar.f20749b;
                                synchronized (gVar) {
                                    contains = ((Set) gVar.f22578t).contains(c0Var2);
                                }
                                if (contains) {
                                    eVar.f20754g.add(c0Var2);
                                } else {
                                    arrayList.add(c0Var2);
                                }
                            }
                        } else {
                            throw new SocketException("No route to " + str + ":" + i13 + "; port is out of range");
                        }
                    } else {
                        StringBuilder h11 = c.b.h("No route to ");
                        h11.append(eVar.f20748a.f19977a.f20087d);
                        h11.append("; exhausted proxy configurations: ");
                        h11.append(eVar.f20751d);
                        throw new SocketException(h11.toString());
                    }
                } while (arrayList.isEmpty());
                if (arrayList.isEmpty()) {
                    arrayList.addAll(eVar.f20754g);
                    eVar.f20754g.clear();
                }
                this.f20758b = new e.a(arrayList);
                z13 = true;
                synchronized (this.f20760d) {
                    if (!this.f20768m) {
                        if (z13) {
                            e.a aVar2 = this.f20758b;
                            aVar2.getClass();
                            ArrayList arrayList2 = new ArrayList(aVar2.f20755a);
                            int size3 = arrayList2.size();
                            int i17 = 0;
                            while (true) {
                                if (i17 >= size3) {
                                    break;
                                }
                                c0 c0Var3 = (c0) arrayList2.get(i17);
                                pc.a.f20503a.b(this.f20760d, this.f20757a, this, c0Var3);
                                c cVar4 = this.j;
                                if (cVar4 != null) {
                                    this.f20759c = c0Var3;
                                    z12 = true;
                                    cVar2 = cVar4;
                                    break;
                                }
                                i17++;
                            }
                        }
                        if (!z12) {
                            if (c0Var == null) {
                                e.a aVar3 = this.f20758b;
                                if (aVar3.f20756b < aVar3.f20755a.size()) {
                                    z14 = true;
                                } else {
                                    z14 = false;
                                }
                                if (z14) {
                                    List<c0> list2 = aVar3.f20755a;
                                    int i18 = aVar3.f20756b;
                                    aVar3.f20756b = i18 + 1;
                                    c0Var = list2.get(i18);
                                } else {
                                    throw new NoSuchElementException();
                                }
                            }
                            this.f20759c = c0Var;
                            this.f20765i = 0;
                            cVar2 = new c(this.f20760d, c0Var);
                            a(cVar2, false);
                        }
                    } else {
                        throw new IOException("Canceled");
                    }
                }
                if (z12) {
                    this.f20762f.getClass();
                    return cVar2;
                }
                cVar2.c(i10, i11, i12, z10, this.f20762f);
                u.a aVar4 = pc.a.f20503a;
                h hVar = this.f20760d;
                aVar4.getClass();
                hVar.f20043e.a(cVar2.f20734c);
                synchronized (this.f20760d) {
                    this.f20766k = true;
                    u.a aVar5 = pc.a.f20503a;
                    h hVar2 = this.f20760d;
                    aVar5.getClass();
                    if (!hVar2.f20044f) {
                        hVar2.f20044f = true;
                        h.f20038g.execute(hVar2.f20041c);
                    }
                    hVar2.f20042d.add(cVar2);
                    if (cVar2.f20739h != null) {
                        z11 = true;
                    }
                    if (z11) {
                        socket2 = pc.a.f20503a.a(this.f20760d, this.f20757a, this);
                        cVar2 = this.j;
                    } else {
                        socket2 = null;
                    }
                }
                pc.b.d(socket2);
                this.f20762f.getClass();
                return cVar2;
            }
            throw new NoSuchElementException();
        }
        z13 = false;
        synchronized (this.f20760d) {
        }
    }

    public final c e(int i10, int i11, int i12, boolean z10, boolean z11) throws IOException {
        boolean z12;
        while (true) {
            c d10 = d(z10, i10, i11, i12);
            synchronized (this.f20760d) {
                if (d10.f20742l == 0) {
                    return d10;
                }
                boolean z13 = false;
                if (!d10.f20736e.isClosed() && !d10.f20736e.isInputShutdown() && !d10.f20736e.isOutputShutdown()) {
                    uc.g gVar = d10.f20739h;
                    if (gVar != null) {
                        synchronized (gVar) {
                            z12 = gVar.f22415y;
                        }
                        z13 = !z12;
                    } else {
                        if (z11) {
                            try {
                                int soTimeout = d10.f20736e.getSoTimeout();
                                try {
                                    d10.f20736e.setSoTimeout(1);
                                    if (d10.f20740i.B()) {
                                        d10.f20736e.setSoTimeout(soTimeout);
                                    } else {
                                        d10.f20736e.setSoTimeout(soTimeout);
                                    }
                                } catch (Throwable th) {
                                    d10.f20736e.setSoTimeout(soTimeout);
                                    throw th;
                                    break;
                                }
                            } catch (SocketTimeoutException unused) {
                            } catch (IOException unused2) {
                            }
                        }
                        z13 = true;
                    }
                }
                if (!z13) {
                    f();
                } else {
                    return d10;
                }
            }
        }
    }

    public final void f() {
        c cVar;
        Socket c10;
        synchronized (this.f20760d) {
            cVar = this.j;
            c10 = c(true, false, false);
            if (this.j != null) {
                cVar = null;
            }
        }
        pc.b.d(c10);
        if (cVar != null) {
            this.f20762f.getClass();
        }
    }

    public final void g() {
        c cVar;
        Socket c10;
        synchronized (this.f20760d) {
            cVar = this.j;
            c10 = c(false, true, false);
            if (this.j != null) {
                cVar = null;
            }
        }
        pc.b.d(c10);
        if (cVar != null) {
            u.a aVar = pc.a.f20503a;
            oc.d dVar = this.f20761e;
            aVar.getClass();
            ((w) dVar).d(null);
            this.f20762f.getClass();
            this.f20762f.getClass();
        }
    }

    public final void h(IOException iOException) {
        c cVar;
        boolean z10;
        boolean z11;
        Socket c10;
        synchronized (this.f20760d) {
            try {
                cVar = null;
                if (iOException instanceof uc.u) {
                    int i10 = ((uc.u) iOException).f22485s;
                    if (i10 == 5) {
                        int i11 = this.f20765i + 1;
                        this.f20765i = i11;
                        if (i11 > 1) {
                            this.f20759c = null;
                            z11 = true;
                        }
                        z11 = false;
                    } else {
                        if (i10 != 6) {
                            this.f20759c = null;
                            z11 = true;
                        }
                        z11 = false;
                    }
                } else {
                    c cVar2 = this.j;
                    if (cVar2 != null) {
                        if (cVar2.f20739h != null) {
                            z10 = true;
                        } else {
                            z10 = false;
                        }
                        if (!z10 || (iOException instanceof uc.a)) {
                            if (cVar2.f20742l == 0) {
                                c0 c0Var = this.f20759c;
                                if (c0Var != null && iOException != null) {
                                    this.f20764h.a(c0Var, iOException);
                                }
                                this.f20759c = null;
                            }
                            z11 = true;
                        }
                    }
                    z11 = false;
                }
                c cVar3 = this.j;
                c10 = c(z11, false, true);
                if (this.j == null && this.f20766k) {
                    cVar = cVar3;
                }
            } catch (Throwable th) {
                throw th;
            }
        }
        pc.b.d(c10);
        if (cVar != null) {
            this.f20762f.getClass();
        }
    }

    public final void i(boolean z10, sc.c cVar, IOException iOException) {
        c cVar2;
        Socket c10;
        boolean z11;
        this.f20762f.getClass();
        synchronized (this.f20760d) {
            if (cVar != null) {
                if (cVar == this.f20769n) {
                    if (!z10) {
                        this.j.f20742l++;
                    }
                    cVar2 = this.j;
                    c10 = c(z10, false, true);
                    if (this.j != null) {
                        cVar2 = null;
                    }
                    z11 = this.f20767l;
                }
            }
            throw new IllegalStateException("expected " + this.f20769n + " but was " + cVar);
        }
        pc.b.d(c10);
        if (cVar2 != null) {
            this.f20762f.getClass();
        }
        if (iOException != null) {
            u.a aVar = pc.a.f20503a;
            oc.d dVar = this.f20761e;
            aVar.getClass();
            ((w) dVar).d(iOException);
            this.f20762f.getClass();
            return;
        }
        if (z11) {
            u.a aVar2 = pc.a.f20503a;
            oc.d dVar2 = this.f20761e;
            aVar2.getClass();
            ((w) dVar2).d(null);
            this.f20762f.getClass();
        }
    }

    public final String toString() {
        c b10 = b();
        if (b10 != null) {
            return b10.toString();
        }
        return this.f20757a.toString();
    }
}