diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 81174e1aef..eae53fa958 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -248,6 +248,9 @@ dependencies { implementation("info.debatty:java-string-similarity:1.2.1") implementation("com.google.android.gms:play-services-oss-licenses:${Versions.OSS_LICENSE}") + + // TLS 1.3 support for Android < 10 + implementation("org.conscrypt:conscrypt-android:2.4.0") } diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index 80101cb81e..7f35adea30 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -3,6 +3,7 @@ package eu.kanade.tachiyomi import android.app.Application import android.content.Context import android.content.res.Configuration +import android.os.Build import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.OnLifecycleEvent @@ -16,11 +17,13 @@ import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate import eu.kanade.tachiyomi.util.system.LocaleHelper import org.acra.ACRA import org.acra.annotation.ReportsCrashes +import org.conscrypt.Conscrypt import timber.log.Timber import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.InjektScope import uy.kohesive.injekt.injectLazy import uy.kohesive.injekt.registry.default.DefaultRegistrar +import java.security.Security @ReportsCrashes( formUri = "https://collector.tracepot.com/e90773ff", @@ -35,6 +38,11 @@ open class App : Application(), LifecycleObserver { super.onCreate() if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree()) + // TLS 1.3 support for Android 10 and below + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { + Security.insertProviderAt(Conscrypt.newProvider(), 1) + } + Injekt = InjektScope(DefaultRegistrar()) Injekt.importModule(AppModule(this))