package T4;

import java.util.List;
import javax.net.ssl.SSLSocket;
import r4.AbstractC0983h;

/* JADX INFO: loaded from: classes.dex */
public final class m implements n {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final l f2883a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public n f2884b;

    public m(l lVar) {
        this.f2883a = lVar;
    }

    @Override // T4.n
    public final boolean a(SSLSocket sSLSocket) {
        return this.f2883a.a(sSLSocket);
    }

    @Override // T4.n
    public final String b(SSLSocket sSLSocket) {
        n nVarD = d(sSLSocket);
        if (nVarD == null) {
            return null;
        }
        return nVarD.b(sSLSocket);
    }

    @Override // T4.n
    public final void c(SSLSocket sSLSocket, String str, List list) {
        AbstractC0983h.e("protocols", list);
        n nVarD = d(sSLSocket);
        if (nVarD == null) {
            return;
        }
        nVarD.c(sSLSocket, str, list);
    }

    public final synchronized n d(SSLSocket sSLSocket) {
        try {
            if (this.f2884b == null && this.f2883a.a(sSLSocket)) {
                this.f2884b = this.f2883a.b(sSLSocket);
            }
        } catch (Throwable th) {
            throw th;
        }
        return this.f2884b;
    }

    @Override // T4.n
    public final boolean isSupported() {
        return true;
    }
}
