package o;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import javax.net.ssl.SSLSocket;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.ml, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1889ml {
    public static final C1889ml e;
    public static final C1889ml f;
    public final boolean a;
    public final boolean b;
    public final String[] c;
    public final String[] d;

    static {
        C0396Ph c0396Ph = C0396Ph.r;
        C0396Ph c0396Ph2 = C0396Ph.s;
        C0396Ph c0396Ph3 = C0396Ph.t;
        C0396Ph c0396Ph4 = C0396Ph.l;
        C0396Ph c0396Ph5 = C0396Ph.n;
        C0396Ph c0396Ph6 = C0396Ph.m;
        C0396Ph c0396Ph7 = C0396Ph.f286o;
        C0396Ph c0396Ph8 = C0396Ph.q;
        C0396Ph c0396Ph9 = C0396Ph.p;
        C0396Ph[] c0396PhArr = {c0396Ph, c0396Ph2, c0396Ph3, c0396Ph4, c0396Ph5, c0396Ph6, c0396Ph7, c0396Ph8, c0396Ph9};
        C0396Ph[] c0396PhArr2 = {c0396Ph, c0396Ph2, c0396Ph3, c0396Ph4, c0396Ph5, c0396Ph6, c0396Ph7, c0396Ph8, c0396Ph9, C0396Ph.j, C0396Ph.k, C0396Ph.h, C0396Ph.i, C0396Ph.f, C0396Ph.g, C0396Ph.e};
        C1794ll c1794ll = new C1794ll();
        c1794ll.c((C0396Ph[]) Arrays.copyOf(c0396PhArr, 9));
        Jf0 jf0 = Jf0.m;
        Jf0 jf02 = Jf0.n;
        c1794ll.e(jf0, jf02);
        c1794ll.b = true;
        c1794ll.a();
        C1794ll c1794ll2 = new C1794ll();
        c1794ll2.c((C0396Ph[]) Arrays.copyOf(c0396PhArr2, 16));
        c1794ll2.e(jf0, jf02);
        c1794ll2.b = true;
        e = c1794ll2.a();
        C1794ll c1794ll3 = new C1794ll();
        c1794ll3.c((C0396Ph[]) Arrays.copyOf(c0396PhArr2, 16));
        c1794ll3.e(jf0, jf02, Jf0.f175o, Jf0.p);
        c1794ll3.b = true;
        c1794ll3.a();
        f = new C1889ml(false, false, null, null);
    }

    public C1889ml(boolean z, boolean z2, String[] strArr, String[] strArr2) {
        this.a = z;
        this.b = z2;
        this.c = strArr;
        this.d = strArr2;
    }

    public final List a() {
        String[] strArr = this.c;
        if (strArr == null) {
            return null;
        }
        ArrayList arrayList = new ArrayList(strArr.length);
        for (String str : strArr) {
            arrayList.add(C0396Ph.b.o(str));
        }
        return AbstractC3117zi.t0(arrayList);
    }

    public final boolean b(SSLSocket sSLSocket) {
        if (!this.a) {
            return false;
        }
        String[] strArr = this.d;
        if (strArr != null && !AbstractC2264qi0.i(strArr, sSLSocket.getEnabledProtocols(), C2617uR.b)) {
            return false;
        }
        String[] strArr2 = this.c;
        return strArr2 == null || AbstractC2264qi0.i(strArr2, sSLSocket.getEnabledCipherSuites(), C0396Ph.c);
    }

    public final List c() {
        String[] strArr = this.d;
        if (strArr == null) {
            return null;
        }
        ArrayList arrayList = new ArrayList(strArr.length);
        for (String str : strArr) {
            arrayList.add(AbstractC0752ap.J(str));
        }
        return AbstractC3117zi.t0(arrayList);
    }

    public final boolean equals(Object obj) {
        if (!(obj instanceof C1889ml)) {
            return false;
        }
        if (obj == this) {
            return true;
        }
        C1889ml c1889ml = (C1889ml) obj;
        boolean z = c1889ml.a;
        boolean z2 = this.a;
        if (z2 != z) {
            return false;
        }
        if (z2) {
            return Arrays.equals(this.c, c1889ml.c) && Arrays.equals(this.d, c1889ml.d) && this.b == c1889ml.b;
        }
        return true;
    }

    public final int hashCode() {
        if (!this.a) {
            return 17;
        }
        String[] strArr = this.c;
        int iHashCode = (527 + (strArr != null ? Arrays.hashCode(strArr) : 0)) * 31;
        String[] strArr2 = this.d;
        return ((iHashCode + (strArr2 != null ? Arrays.hashCode(strArr2) : 0)) * 31) + (!this.b ? 1 : 0);
    }

    public final String toString() {
        if (!this.a) {
            return "ConnectionSpec()";
        }
        return "ConnectionSpec(cipherSuites=" + Objects.toString(a(), "[all enabled]") + ", tlsVersions=" + Objects.toString(c(), "[all enabled]") + ", supportsTlsExtensions=" + this.b + ')';
    }
}
