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

应用版本信息
应用名称:Նվագարկիչ
版本号:9.9.9
包名称:com.iptv.player

MD5 校验值:d7f913ab91d7343430e85d5ce2e5aff0

反编译源代码说明

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


package yh;

import bi.g;
import bi.u;
import java.io.IOException;
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.Objects;
import java.util.concurrent.ThreadPoolExecutor;
import vh.e0;
import vh.i;
import vh.n;
import vh.o;
import vh.s;
import vh.v;
import yh.d;

public final class e {

    public final vh.a f45232a;

    public d.a f45233b;

    public e0 f45234c;

    public final i f45235d;

    public final vh.e f45236e;

    public final o f45237f;

    public final Object f45238g;

    public final d f45239h;

    public int f45240i;

    public b f45241j;

    public boolean f45242k;

    public boolean f45243l;

    public boolean f45244m;

    public zh.c f45245n;

    public static final class a extends WeakReference<e> {

        public final Object f45246a;

        public a(e eVar, Object obj) {
            super(eVar);
            this.f45246a = obj;
        }
    }

    public e(i iVar, vh.a aVar, vh.e eVar, o oVar, Object obj) {
        this.f45235d = iVar;
        this.f45232a = aVar;
        this.f45236e = eVar;
        this.f45237f = oVar;
        Objects.requireNonNull((v.a) wh.a.f44059a);
        this.f45239h = new d(aVar, iVar.f43333e, eVar, oVar);
        this.f45238g = obj;
    }

    public void a(b bVar, boolean z10) {
        if (this.f45241j != null) {
            throw new IllegalStateException();
        }
        this.f45241j = bVar;
        this.f45242k = z10;
        bVar.f45218n.add(new a(this, this.f45238g));
    }

    public synchronized b b() {
        return this.f45241j;
    }

    public final Socket c(boolean z10, boolean z11, boolean z12) {
        Socket socket;
        if (z12) {
            this.f45245n = null;
        }
        boolean z13 = true;
        if (z11) {
            this.f45243l = true;
        }
        b bVar = this.f45241j;
        if (bVar == null) {
            return null;
        }
        if (z10) {
            bVar.f45215k = true;
        }
        if (this.f45245n != null) {
            return null;
        }
        if (!this.f45243l && !bVar.f45215k) {
            return null;
        }
        int size = bVar.f45218n.size();
        for (int i10 = 0; i10 < size; i10++) {
            if (bVar.f45218n.get(i10).get() == this) {
                bVar.f45218n.remove(i10);
                if (this.f45241j.f45218n.isEmpty()) {
                    this.f45241j.f45219o = System.nanoTime();
                    wh.a aVar = wh.a.f44059a;
                    i iVar = this.f45235d;
                    b bVar2 = this.f45241j;
                    Objects.requireNonNull((v.a) aVar);
                    Objects.requireNonNull(iVar);
                    if (bVar2.f45215k || iVar.f43329a == 0) {
                        iVar.f43332d.remove(bVar2);
                    } else {
                        iVar.notifyAll();
                        z13 = false;
                    }
                    if (z13) {
                        socket = this.f45241j.f45209e;
                        this.f45241j = null;
                        return socket;
                    }
                }
                socket = null;
                this.f45241j = null;
                return socket;
            }
        }
        throw new IllegalStateException();
    }

    public final b d(int i10, int i11, int i12, int i13, boolean z10) {
        b bVar;
        e0 e0Var;
        Socket c10;
        b bVar2;
        boolean z11;
        boolean z12;
        Socket socket;
        d.a aVar;
        String str;
        int i14;
        boolean contains;
        synchronized (this.f45235d) {
            if (this.f45243l) {
                throw new IllegalStateException("released");
            }
            if (this.f45245n != null) {
                throw new IllegalStateException("codec != null");
            }
            if (this.f45244m) {
                throw new IOException("Canceled");
            }
            bVar = this.f45241j;
            e0Var = null;
            c10 = (bVar == null || !bVar.f45215k) ? null : c(false, false, true);
            b bVar3 = this.f45241j;
            if (bVar3 != null) {
                bVar = null;
            } else {
                bVar3 = null;
            }
            if (!this.f45242k) {
                bVar = null;
            }
            if (bVar3 == null) {
                wh.a.f44059a.b(this.f45235d, this.f45232a, this, null);
                bVar2 = this.f45241j;
                if (bVar2 != null) {
                    z11 = true;
                } else {
                    e0Var = this.f45234c;
                }
            }
            bVar2 = bVar3;
            z11 = false;
        }
        wh.c.e(c10);
        if (bVar != null) {
            Objects.requireNonNull(this.f45237f);
        }
        if (z11) {
            Objects.requireNonNull(this.f45237f);
        }
        if (bVar2 != null) {
            this.f45234c = this.f45241j.f45207c;
            return bVar2;
        }
        if (e0Var != null || ((aVar = this.f45233b) != null && aVar.a())) {
            z12 = false;
        } else {
            d dVar = this.f45239h;
            if (!dVar.b()) {
                throw new NoSuchElementException();
            }
            ArrayList arrayList = new ArrayList();
            while (dVar.c()) {
                if (!dVar.c()) {
                    StringBuilder a10 = android.support.v4.media.b.a("No route to ");
                    a10.append(dVar.f45222a.f43203a.f43377d);
                    a10.append("; exhausted proxy configurations: ");
                    a10.append(dVar.f45226e);
                    throw new SocketException(a10.toString());
                }
                List<Proxy> list = dVar.f45226e;
                int i15 = dVar.f45227f;
                dVar.f45227f = i15 + 1;
                Proxy proxy = list.get(i15);
                dVar.f45228g = new ArrayList();
                if (proxy.type() == Proxy.Type.DIRECT || proxy.type() == Proxy.Type.SOCKS) {
                    s sVar = dVar.f45222a.f43203a;
                    str = sVar.f43377d;
                    i14 = sVar.f43378e;
                } else {
                    SocketAddress address = proxy.address();
                    if (!(address instanceof InetSocketAddress)) {
                        StringBuilder a11 = android.support.v4.media.b.a("Proxy.address() is not an InetSocketAddress: ");
                        a11.append(address.getClass());
                        throw new IllegalArgumentException(a11.toString());
                    }
                    InetSocketAddress inetSocketAddress = (InetSocketAddress) address;
                    InetAddress address2 = inetSocketAddress.getAddress();
                    str = address2 == null ? inetSocketAddress.getHostName() : address2.getHostAddress();
                    i14 = inetSocketAddress.getPort();
                }
                if (i14 < 1 || i14 > 65535) {
                    throw new SocketException("No route to " + str + ":" + i14 + "; port is out of range");
                }
                if (proxy.type() == Proxy.Type.SOCKS) {
                    dVar.f45228g.add(InetSocketAddress.createUnresolved(str, i14));
                } else {
                    Objects.requireNonNull(dVar.f45225d);
                    Objects.requireNonNull((n.a) dVar.f45222a.f43204b);
                    if (str == null) {
                        throw new UnknownHostException("hostname == null");
                    }
                    try {
                        List asList = Arrays.asList(InetAddress.getAllByName(str));
                        if (asList.isEmpty()) {
                            throw new UnknownHostException(dVar.f45222a.f43204b + " returned no addresses for " + str);
                        }
                        Objects.requireNonNull(dVar.f45225d);
                        int size = asList.size();
                        for (int i16 = 0; i16 < size; i16++) {
                            dVar.f45228g.add(new InetSocketAddress((InetAddress) asList.get(i16), i14));
                        }
                    } catch (NullPointerException e10) {
                        UnknownHostException unknownHostException = new UnknownHostException(i.c.a("Broken system behaviour for dns lookup of ", str));
                        unknownHostException.initCause(e10);
                        throw unknownHostException;
                    }
                }
                int size2 = dVar.f45228g.size();
                for (int i17 = 0; i17 < size2; i17++) {
                    e0 e0Var2 = new e0(dVar.f45222a, proxy, dVar.f45228g.get(i17));
                    qc.d dVar2 = dVar.f45223b;
                    synchronized (dVar2) {
                        contains = dVar2.f39219a.contains(e0Var2);
                    }
                    if (contains) {
                        dVar.f45229h.add(e0Var2);
                    } else {
                        arrayList.add(e0Var2);
                    }
                }
                if (!arrayList.isEmpty()) {
                    break;
                }
            }
            if (arrayList.isEmpty()) {
                arrayList.addAll(dVar.f45229h);
                dVar.f45229h.clear();
            }
            this.f45233b = new d.a(arrayList);
            z12 = true;
        }
        synchronized (this.f45235d) {
            if (this.f45244m) {
                throw new IOException("Canceled");
            }
            if (z12) {
                d.a aVar2 = this.f45233b;
                Objects.requireNonNull(aVar2);
                ArrayList arrayList2 = new ArrayList(aVar2.f45230a);
                int size3 = arrayList2.size();
                int i18 = 0;
                while (true) {
                    if (i18 >= size3) {
                        break;
                    }
                    e0 e0Var3 = (e0) arrayList2.get(i18);
                    wh.a.f44059a.b(this.f45235d, this.f45232a, this, e0Var3);
                    b bVar4 = this.f45241j;
                    if (bVar4 != null) {
                        this.f45234c = e0Var3;
                        z11 = true;
                        bVar2 = bVar4;
                        break;
                    }
                    i18++;
                }
            }
            if (!z11) {
                if (e0Var == null) {
                    d.a aVar3 = this.f45233b;
                    if (!aVar3.a()) {
                        throw new NoSuchElementException();
                    }
                    List<e0> list2 = aVar3.f45230a;
                    int i19 = aVar3.f45231b;
                    aVar3.f45231b = i19 + 1;
                    e0Var = list2.get(i19);
                }
                this.f45234c = e0Var;
                this.f45240i = 0;
                bVar2 = new b(this.f45235d, e0Var);
                a(bVar2, false);
            }
        }
        if (z11) {
            Objects.requireNonNull(this.f45237f);
            return bVar2;
        }
        bVar2.c(i10, i11, i12, i13, z10, this.f45236e, this.f45237f);
        wh.a aVar4 = wh.a.f44059a;
        i iVar = this.f45235d;
        Objects.requireNonNull((v.a) aVar4);
        iVar.f43333e.a(bVar2.f45207c);
        synchronized (this.f45235d) {
            this.f45242k = true;
            wh.a aVar5 = wh.a.f44059a;
            i iVar2 = this.f45235d;
            Objects.requireNonNull((v.a) aVar5);
            if (!iVar2.f43334f) {
                iVar2.f43334f = true;
                ((ThreadPoolExecutor) i.f43328g).execute(iVar2.f43331c);
            }
            iVar2.f43332d.add(bVar2);
            if (bVar2.h()) {
                socket = wh.a.f44059a.a(this.f45235d, this.f45232a, this);
                bVar2 = this.f45241j;
            } else {
                socket = null;
            }
        }
        wh.c.e(socket);
        Objects.requireNonNull(this.f45237f);
        return bVar2;
    }

    public final b e(int i10, int i11, int i12, int i13, boolean z10, boolean z11) {
        while (true) {
            b d10 = d(i10, i11, i12, i13, z10);
            synchronized (this.f45235d) {
                if (d10.f45216l == 0 && !d10.h()) {
                    return d10;
                }
                boolean z12 = false;
                if (!d10.f45209e.isClosed() && !d10.f45209e.isInputShutdown() && !d10.f45209e.isOutputShutdown()) {
                    g gVar = d10.f45212h;
                    if (gVar != null) {
                        long nanoTime = System.nanoTime();
                        synchronized (gVar) {
                            if (!gVar.f13716g) {
                                if (gVar.f13723n >= gVar.f13722m || nanoTime < gVar.f13725p) {
                                    z12 = true;
                                }
                            }
                        }
                    } else {
                        if (z11) {
                            try {
                                int soTimeout = d10.f45209e.getSoTimeout();
                                try {
                                    d10.f45209e.setSoTimeout(1);
                                    if (d10.f45213i.J()) {
                                        d10.f45209e.setSoTimeout(soTimeout);
                                    } else {
                                        d10.f45209e.setSoTimeout(soTimeout);
                                    }
                                } catch (Throwable th2) {
                                    d10.f45209e.setSoTimeout(soTimeout);
                                    throw th2;
                                    break;
                                }
                            } catch (SocketTimeoutException unused) {
                            } catch (IOException unused2) {
                            }
                        }
                        z12 = true;
                    }
                }
                if (z12) {
                    return d10;
                }
                f();
            }
        }
    }

    public void f() {
        b bVar;
        Socket c10;
        synchronized (this.f45235d) {
            bVar = this.f45241j;
            c10 = c(true, false, false);
            if (this.f45241j != null) {
                bVar = null;
            }
        }
        wh.c.e(c10);
        if (bVar != null) {
            Objects.requireNonNull(this.f45237f);
        }
    }

    public void g() {
        b bVar;
        Socket c10;
        synchronized (this.f45235d) {
            bVar = this.f45241j;
            c10 = c(false, true, false);
            if (this.f45241j != null) {
                bVar = null;
            }
        }
        wh.c.e(c10);
        if (bVar != null) {
            wh.a.f44059a.c(this.f45236e, null);
            Objects.requireNonNull(this.f45237f);
            Objects.requireNonNull(this.f45237f);
        }
    }

    public void h(IOException iOException) {
        b bVar;
        boolean z10;
        Socket c10;
        synchronized (this.f45235d) {
            bVar = null;
            if (iOException instanceof u) {
                bi.b bVar2 = ((u) iOException).f13821a;
                if (bVar2 == bi.b.REFUSED_STREAM) {
                    int i10 = this.f45240i + 1;
                    this.f45240i = i10;
                    if (i10 > 1) {
                        this.f45234c = null;
                        z10 = true;
                    }
                    z10 = false;
                } else {
                    if (bVar2 != bi.b.CANCEL) {
                        this.f45234c = null;
                        z10 = true;
                    }
                    z10 = false;
                }
            } else {
                b bVar3 = this.f45241j;
                if (bVar3 != null && (!bVar3.h() || (iOException instanceof bi.a))) {
                    if (this.f45241j.f45216l == 0) {
                        e0 e0Var = this.f45234c;
                        if (e0Var != null && iOException != null) {
                            this.f45239h.a(e0Var, iOException);
                        }
                        this.f45234c = null;
                    }
                    z10 = true;
                }
                z10 = false;
            }
            b bVar4 = this.f45241j;
            c10 = c(z10, false, true);
            if (this.f45241j == null && this.f45242k) {
                bVar = bVar4;
            }
        }
        wh.c.e(c10);
        if (bVar != null) {
            Objects.requireNonNull(this.f45237f);
        }
    }

    public void i(boolean z10, zh.c cVar, long j10, IOException iOException) {
        b bVar;
        Socket c10;
        boolean z11;
        Objects.requireNonNull(this.f45237f);
        synchronized (this.f45235d) {
            if (cVar != null) {
                if (cVar == this.f45245n) {
                    if (!z10) {
                        this.f45241j.f45216l++;
                    }
                    bVar = this.f45241j;
                    c10 = c(z10, false, true);
                    if (this.f45241j != null) {
                        bVar = null;
                    }
                    z11 = this.f45243l;
                }
            }
            throw new IllegalStateException("expected " + this.f45245n + " but was " + cVar);
        }
        wh.c.e(c10);
        if (bVar != null) {
            Objects.requireNonNull(this.f45237f);
        }
        if (iOException != null) {
            wh.a.f44059a.c(this.f45236e, iOException);
            Objects.requireNonNull(this.f45237f);
        } else if (z11) {
            wh.a.f44059a.c(this.f45236e, null);
            Objects.requireNonNull(this.f45237f);
        }
    }

    public String toString() {
        b b10 = b();
        return b10 != null ? b10.toString() : this.f45232a.toString();
    }
}