diff options
author | Allan Wang <me@allanwang.ca> | 2021-09-28 23:07:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 23:07:57 -0700 |
commit | 0ef4cbde805db6812b922d967966367ae7c98e60 (patch) | |
tree | 4335658a8313fd5fbb7716c8e5fcf447a11fb4ab /app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt | |
parent | eb9fc5c6a558cdcbe3fe1e1911b22e0855645a38 (diff) | |
parent | 749ebe31d0d23d7097a7c989a8324714aa28d996 (diff) | |
download | frost-0ef4cbde805db6812b922d967966367ae7c98e60.tar.gz frost-0ef4cbde805db6812b922d967966367ae7c98e60.tar.bz2 frost-0ef4cbde805db6812b922d967966367ae7c98e60.zip |
Merge pull request #1818 from AllanWang/resolve-activity
Remove resolveActivity
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt index 5586d479..defdcae1 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt @@ -30,13 +30,12 @@ import java.io.ByteArrayInputStream * Handler to decide when a request should be done by us * This is the crux of Frost's optimizations for the web browser */ -private val blankResource: WebResourceResponse by lazy { +private val blankResource: WebResourceResponse = WebResourceResponse( "text/plain", "utf-8", ByteArrayInputStream("".toByteArray()) ) -} fun WebView.shouldFrostInterceptRequest(request: WebResourceRequest): WebResourceResponse? { val requestUrl = request.url?.toString() ?: return null |