- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 11 for buildIfSupported (0.11 seconds)
-
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/StandardAndroidSocketAdapter.kt
/** * Base Android reflection based SocketAdapter for the built in Android SSLSocket. * * It's assumed to always be present with known class names on Android devices, so we build * optimistically via [buildIfSupported]. But it also doesn't assume a compile time API. */ class StandardAndroidSocketAdapter( sslSocketClass: Class<in SSLSocket>, private val sslSocketFactoryClass: Class<in SSLSocketFactory>,
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jan 10 09:36:53 GMT 2026 - 2.8K bytes - Click Count (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/Android10Platform.kt
@SuppressSignatureCheck class Android10Platform : Platform(), ContextAwarePlatform { override var applicationContext: Context? = null private val socketAdapters = listOfNotNull( Android10SocketAdapter.buildIfSupported(), DeferredSocketAdapter(AndroidSocketAdapter.playProviderFactory), // Delay and Defer any initialisation of Conscrypt and BouncyCastle DeferredSocketAdapter(ConscryptSocketAdapter.factory),
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Jul 20 11:25:50 GMT 2025 - 4.5K bytes - Click Count (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/Android10SocketAdapter.kt
throw IOException("Android internal error", iae) } } @SuppressSignatureCheck companion object { fun buildIfSupported(): SocketAdapter? = if (isSupported()) Android10SocketAdapter() else null @androidx.annotation.ChecksSdkIntAtLeast(api = 29) fun isSupported() = isAndroid && Build.VERSION.SDK_INT >= 29 }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jan 10 09:36:53 GMT 2026 - 2.8K bytes - Click Count (0) -
okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/BouncyCastlePlatform.kt
true } catch (_: ClassNotFoundException) { false } fun buildIfSupported(): BouncyCastlePlatform? = if (isSupported) BouncyCastlePlatform() else null }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 3.3K bytes - Click Count (0) -
okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt
Class.forName("org.openjsse.net.ssl.OpenJSSE", false, OpenJSSEPlatform::class.java.classLoader) true } catch (_: ClassNotFoundException) { false } fun buildIfSupported(): OpenJSSEPlatform? = if (isSupported) OpenJSSEPlatform() else null }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 3.6K bytes - Click Count (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/AndroidPlatform.kt
@SuppressSignatureCheck class AndroidPlatform : Platform(), ContextAwarePlatform { override var applicationContext: Context? = null private val socketAdapters = listOfNotNull( StandardAndroidSocketAdapter.buildIfSupported(), DeferredSocketAdapter(AndroidSocketAdapter.playProviderFactory), // Delay and Defer any initialisation of Conscrypt and BouncyCastle DeferredSocketAdapter(ConscryptSocketAdapter.factory),
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Oct 10 05:19:46 GMT 2025 - 6.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Jdk9Platform.kt
SSLSocket::class.java.getMethod("getApplicationProtocol") true } catch (nsme: NoSuchMethodException) { false } } } fun buildIfSupported(): Jdk9Platform? = if (isAvailable) Jdk9Platform() else null }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 3.6K bytes - Click Count (0) -
okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt
else -> false } } catch (e: NoClassDefFoundError) { false } catch (e: ClassNotFoundException) { false } fun buildIfSupported(): ConscryptPlatform? = if (isSupported) ConscryptPlatform() else null fun atLeastVersion( major: Int, minor: Int = 0, patch: Int = 0, ): Boolean {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 4.6K bytes - Click Count (0) -
okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/PlatformRegistry.kt
val conscrypt = ConscryptPlatform.buildIfSupported() if (conscrypt != null) { return conscrypt } } if (isBouncyCastlePreferred) { val bc = BouncyCastlePlatform.buildIfSupported() if (bc != null) { return bc } } if (isOpenJSSEPreferred) { val openJSSE = OpenJSSEPlatform.buildIfSupported() if (openJSSE != null) {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu May 22 14:39:30 GMT 2025 - 2.1K bytes - Click Count (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/PlatformRegistry.kt
val androidPlatform = Android10Platform.buildIfSupported() ?: AndroidPlatform.buildIfSupported() if (androidPlatform != null) return androidPlatform // If the API version is 0, assume this is the Android artifact, but running on the JVM without Robolectric. if (Build.VERSION.SDK_INT == 0) { return Jdk9Platform.buildIfSupported() ?: Platform() }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jul 28 07:33:49 GMT 2025 - 1.6K bytes - Click Count (0)