public static SSLSocketFactory wrapSocketFactoryIfNeeded(OpenSSLSocketFactoryImpl factory) {
        if (Build.VERSION.SDK_INT < 22) {
            return new KitKatPlatformOpenSSLSocketAdapterFactory(factory);
        }
        return factory;
    }
Wrap the SocketFactory with the platform wrapper if needed for compatability.
android/src/main/java/org/conscrypt/Platform.java