package ඓ.㳳.K.K;

import java.io.IOException;
import ඓ.㳳.K.K.ʬ.AbstractC1295;
import ඓ.㳳.K.K.ඓ.C1297;
import ඓ.㳳.K.K.㸾.C1310;
import 㿎.AbstractC2537;
import 㿎.AbstractC2632;
import 㿎.AbstractC2660;
import 㿎.C2625;
import 㿎.C2642;
import 㿎.C2671;

/* renamed from: ඓ.㳳.K.K.K  reason: contains not printable characters */
/* compiled from: OkHttpUtils */
public class C1304 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public static volatile C1304 f5062;

    /* renamed from: ῲ  reason: contains not printable characters */
    public C1297 f5063;

    /* renamed from: K  reason: contains not printable characters */
    public C2625 f5064;

    /* renamed from: ඓ.㳳.K.K.K$ʬ  reason: contains not printable characters */
    /* compiled from: OkHttpUtils */
    public class RunnableC1305 implements Runnable {

        /* renamed from: ʬ  reason: contains not printable characters */
        public final /* synthetic */ Object f5065;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final /* synthetic */ AbstractC1295 f5066;

        /* renamed from: 㸾  reason: contains not printable characters */
        public final /* synthetic */ int f5067;

        public RunnableC1305(C1304 k, AbstractC1295 k2, Object obj, int i) {
            this.f5066 = k2;
            this.f5065 = obj;
            this.f5067 = i;
        }

        public void run() {
            this.f5066.m3423(this.f5065, this.f5067);
            this.f5066.m3420();
        }
    }

    /* renamed from: ඓ.㳳.K.K.K$ῲ  reason: contains not printable characters */
    /* compiled from: OkHttpUtils */
    public class RunnableC1306 implements Runnable {

        /* renamed from: ʬ  reason: contains not printable characters */
        public final /* synthetic */ AbstractC2537 f5068;

        /* renamed from: ඓ  reason: contains not printable characters */
        public final /* synthetic */ int f5069;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final /* synthetic */ AbstractC1295 f5070;

        /* renamed from: 㸾  reason: contains not printable characters */
        public final /* synthetic */ Exception f5071;

        public RunnableC1306(C1304 k, AbstractC1295 k2, AbstractC2537 r3, Exception exc, int i) {
            this.f5070 = k2;
            this.f5068 = r3;
            this.f5071 = exc;
            this.f5069 = i;
        }

        public void run() {
            this.f5070.m3424(this.f5068, this.f5071, this.f5069);
            this.f5070.m3420();
        }
    }

    /* renamed from: ඓ.㳳.K.K.K$K  reason: contains not printable characters */
    /* compiled from: OkHttpUtils */
    public class C1307 implements AbstractC2660 {

        /* renamed from: ῲ  reason: contains not printable characters */
        public final /* synthetic */ int f5073;

        /* renamed from: K  reason: contains not printable characters */
        public final /* synthetic */ AbstractC1295 f5074;

        public C1307(AbstractC1295 k, int i) {
            this.f5074 = k;
            this.f5073 = i;
        }

        @Override // 㿎.AbstractC2660
        public void onFailure(AbstractC2537 r4, IOException iOException) {
            C1304.this.m3436(r4, iOException, this.f5074, this.f5073);
        }

        @Override // 㿎.AbstractC2660
        public void onResponse(AbstractC2537 r6, C2671 r7) {
            AbstractC2632 r62;
            C2642 r0 = (C2642) r6;
            try {
                if (r0.m6959()) {
                    C1304.this.m3436(r0, new IOException("Canceled!"), this.f5074, this.f5073);
                    AbstractC2632 r63 = r7.f9093;
                    if (r63 != null) {
                        r63.close();
                    }
                } else if (!this.f5074.m3425(r7)) {
                    C1304 k = C1304.this;
                    k.m3436(r0, new IOException("request failed , reponse's code is : " + r7.f9092), this.f5074, this.f5073);
                    AbstractC2632 r64 = r7.f9093;
                    if (r64 != null) {
                        r64.close();
                    }
                } else {
                    C1304.this.m3434(this.f5074.m3421(r7, this.f5073), this.f5074, this.f5073);
                    r62 = r7.f9093;
                    if (r62 == null) {
                        return;
                    }
                    r62.close();
                }
            } catch (Exception e) {
                C1304.this.m3436(r6, e, this.f5074, this.f5073);
                r62 = r7.f9093;
                if (r62 == null) {
                }
            } catch (Throwable th) {
                AbstractC2632 r72 = r7.f9093;
                if (r72 != null) {
                    r72.close();
                }
                throw th;
            }
        }
    }

    public C1304(C2625 r2) {
        if (r2 == null) {
            this.f5064 = new C2625(new C2625.C2626());
        } else {
            this.f5064 = r2;
        }
        C1297.f5051.getClass().toString();
        this.f5063 = C1297.f5051;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static C1304 m3433(C2625 r2) {
        if (f5062 == null) {
            synchronized (C1304.class) {
                if (f5062 == null) {
                    f5062 = new C1304(r2);
                }
            }
        }
        return f5062;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static C1304 m3432() {
        return m3433(null);
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m3435(C1310 r3, AbstractC1295 k) {
        if (k == null) {
            k = AbstractC1295.f5050;
        }
        int i = r3.f5084.f5088;
        ((C2642) r3.f5080).m6957(new C1307(k, i));
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m3436(AbstractC2537 r9, Exception exc, AbstractC1295 k, int i) {
        if (k != null) {
            C1297 k2 = this.f5063;
            k2.m3429().execute(new RunnableC1306(this, k, r9, exc, i));
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m3434(Object obj, AbstractC1295 k, int i) {
        if (k != null) {
            C1297 k2 = this.f5063;
            k2.m3429().execute(new RunnableC1305(this, k, obj, i));
        }
    }
}
