From d8531cead042de9ce9a008d99f329c0fc368c59a Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 10 Aug 2021 10:18:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt | 2 +- app/src/main/java/io/legado/app/ui/dict/DictDialog.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt index 41f6fab98..9517f6e66 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt @@ -147,7 +147,6 @@ class CronetUrlRequestCallback @JvmOverloads internal constructor( private const val TAG = "Callback" private const val MAX_FOLLOW_COUNT = 20 - @Suppress("DEPRECATION") private fun protocolFromNegotiatedProtocol(responseInfo: UrlResponseInfo): Protocol { val negotiatedProtocol = responseInfo.negotiatedProtocol.lowercase(Locale.getDefault()) // Log.e("Cronet", responseInfo.url) @@ -160,6 +159,7 @@ class CronetUrlRequestCallback @JvmOverloads internal constructor( Protocol.QUIC } negotiatedProtocol.contains("spdy") -> { + @Suppress("DEPRECATION") Protocol.SPDY_3 } negotiatedProtocol.contains("h2") -> { diff --git a/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt b/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt index 78c093ba4..68993a416 100644 --- a/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt +++ b/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt @@ -63,6 +63,7 @@ class DictDialog : BaseDialogFragment() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { binding.tvDict.text = Html.fromHtml(it, Html.FROM_HTML_MODE_LEGACY) } else { + @Suppress("DEPRECATION") binding.tvDict.text = Html.fromHtml(it) } }