From b99df9aca720d2b7b1144739abb3fb6d2d290406 Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 30 Jul 2021 21:08:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E6=95=88=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/help/http/cronet/CronetHelper.kt | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt index 777e91292..0a0efa358 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt +++ b/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 }