删除无效代码

pull/1194/head
gedoor 3 years ago
parent 26547c59e1
commit b99df9aca7
  1. 30
      app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt

@ -40,36 +40,6 @@ val cronetEngine: ExperimentalCronetEngine by lazy {
//builder.setExperimentalOptions("{\"quic_version\": \"h3-29\"}")
val engine = builder.build()
URL.setURLStreamHandlerFactory(CronetURLStreamHandlerFactory(engine))
// engine.addRequestFinishedListener(object : RequestFinishedInfo.Listener(executor) {
// override fun onRequestFinished(requestFinishedInfo: RequestFinishedInfo?) {
// val sb = StringBuilder(requestFinishedInfo!!.url).append("\r\n")
//
// try {
// if (requestFinishedInfo.responseInfo != null) {
// val responseInfo = requestFinishedInfo.responseInfo
// if (responseInfo != null) {
// sb.append("[Cached:").append(responseInfo.wasCached())
// .append("][StatusCode:")
// .append(
// responseInfo.httpStatusCode
// ).append("][StatusText:").append(responseInfo.httpStatusText)
// .append("][Protocol:").append(responseInfo.negotiatedProtocol)
// .append("][ByteCount:").append(
// responseInfo.receivedByteCount
// ).append("]\r\n")
// }
// val httpHeaders = requestFinishedInfo.responseInfo!!
// .allHeadersAsList
// for ((key, value) in httpHeaders) {
// sb.append("[").append(key).append("]").append(value).append("\r\n")
// }
// Log.e("Cronet", sb.toString())
// }
// } catch (e: URISyntaxException) {
// e.printStackTrace()
// }
// }
// })
return@lazy engine
}

Loading…
Cancel
Save