pull/1226/head
gedoor 3 years ago
parent 766ccc7029
commit d8531cead0
  1. 2
      app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt
  2. 1
      app/src/main/java/io/legado/app/ui/dict/DictDialog.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") -> {

@ -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)
}
}

Loading…
Cancel
Save