package t7;

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

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

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

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

    public l(k kVar) {
        this.f17040a = kVar;
    }

    @Override // t7.m
    public final boolean a(SSLSocket sSLSocket) {
        return this.f17040a.a(sSLSocket);
    }

    @Override // t7.m
    public final String b(SSLSocket sSLSocket) {
        m mVarE = e(sSLSocket);
        if (mVarE != null) {
            return mVarE.b(sSLSocket);
        }
        return null;
    }

    @Override // t7.m
    public final boolean c() {
        return true;
    }

    @Override // t7.m
    public final void d(SSLSocket sSLSocket, String str, List list) {
        P6.g.e(list, "protocols");
        m mVarE = e(sSLSocket);
        if (mVarE != null) {
            mVarE.d(sSLSocket, str, list);
        }
    }

    public final synchronized m e(SSLSocket sSLSocket) {
        try {
            if (this.f17041b == null && this.f17040a.a(sSLSocket)) {
                this.f17041b = this.f17040a.b(sSLSocket);
            }
        } catch (Throwable th) {
            throw th;
        }
        return this.f17041b;
    }
}
