package p447.p448.p457;

import java.util.List;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import kotlin.TypeCastException;
import kotlin.jvm.internal.DefaultConstructorMarker;
import p402.InterfaceC6540;
import p402.p411.p413.C6635;
import p402.p420.C6703;
import p447.EnumC6924;

/* JADX INFO: renamed from: ސ.ޣ.މ.ރ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6540
public class C7065 extends C7069 {

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public static final boolean f20581;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public static final C7066 f20582 = new C7066(0 == true ? 1 : 0);

    /* JADX INFO: renamed from: ސ.ޣ.މ.ރ$֏, reason: contains not printable characters */
    public static final class C7066 {
        public C7066() {
        }

        public /* synthetic */ C7066(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    static {
        String property = System.getProperty("java.specification.version");
        Integer numM9888 = property != null ? C6703.m9888(property) : null;
        boolean z = true;
        if (numM9888 == null) {
            try {
                SSLSocket.class.getMethod("getApplicationProtocol", new Class[0]);
            } catch (NoSuchMethodException unused) {
                z = false;
            }
        } else if (numM9888.intValue() < 9) {
            z = false;
        }
        f20581 = z;
    }

    @Override // p447.p448.p457.C7069
    /* JADX INFO: renamed from: ֏ */
    public void mo10367(SSLSocket sSLSocket, String str, List<EnumC6924> list) {
        if (sSLSocket == null) {
            C6635.m9824("sslSocket");
            throw null;
        }
        if (list == null) {
            C6635.m9824("protocols");
            throw null;
        }
        SSLParameters sSLParameters = sSLSocket.getSSLParameters();
        List<String> listM10382 = C7069.f20588.m10382(list);
        C6635.m9823((Object) sSLParameters, "sslParameters");
        Object[] array = listM10382.toArray(new String[0]);
        if (array == null) {
            throw new TypeCastException("null cannot be cast to non-null type kotlin.Array<T>");
        }
        sSLParameters.setApplicationProtocols((String[]) array);
        sSLSocket.setSSLParameters(sSLParameters);
    }

    @Override // p447.p448.p457.C7069
    /* JADX INFO: renamed from: ؠ */
    public String mo10368(SSLSocket sSLSocket) {
        if (sSLSocket == null) {
            C6635.m9824("sslSocket");
            throw null;
        }
        try {
            String applicationProtocol = sSLSocket.getApplicationProtocol();
            if (applicationProtocol == null) {
                return null;
            }
            if (C6635.m9825((Object) applicationProtocol, (Object) "")) {
                return null;
            }
            return applicationProtocol;
        } catch (UnsupportedOperationException unused) {
            return null;
        }
    }
}
