]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/fragments/AboutWebViewFragment.kt
Bump the minimum API to 23. https://redmine.stoutner.com/issues/793
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / fragments / AboutWebViewFragment.kt
index 44bae91dd7591c39c038f792843bae75ada7cce0..9ee7dbed2008a8cd3a2a7a82101f0f21e5c5f35f 100644 (file)
@@ -26,6 +26,7 @@ import android.os.Bundle
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
+import android.webkit.WebResourceRequest
 import android.webkit.WebResourceResponse
 import android.webkit.WebView
 import android.webkit.WebViewClient
@@ -105,9 +106,9 @@ class AboutWebViewFragment : Fragment() {
             }
             
             // Process asset requests with the asset loader.
-            override fun shouldInterceptRequest(webView: WebView, url: String): WebResourceResponse? {
+            override fun shouldInterceptRequest(webView: WebView, webResourceRequest: WebResourceRequest): WebResourceResponse? {
                 // This allows using the `appassets.androidplatform.net` URL, which handles the loading of SVG files, which otherwise is prevented by the CORS policy.
-                return webViewAssetLoader.shouldInterceptRequest(Uri.parse(url))
+                return webViewAssetLoader.shouldInterceptRequest(webResourceRequest.url)
             }
         }