|
|
@ -3,6 +3,7 @@ package io.legado.app.help.http |
|
|
|
import android.annotation.SuppressLint |
|
|
|
import android.annotation.SuppressLint |
|
|
|
import android.os.Handler |
|
|
|
import android.os.Handler |
|
|
|
import android.os.Looper |
|
|
|
import android.os.Looper |
|
|
|
|
|
|
|
import android.util.AndroidRuntimeException |
|
|
|
import android.webkit.CookieManager |
|
|
|
import android.webkit.CookieManager |
|
|
|
import android.webkit.WebSettings |
|
|
|
import android.webkit.WebSettings |
|
|
|
import android.webkit.WebView |
|
|
|
import android.webkit.WebView |
|
|
@ -51,7 +52,11 @@ class BackstageWebView( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
runOnUI { |
|
|
|
runOnUI { |
|
|
|
|
|
|
|
try { |
|
|
|
load() |
|
|
|
load() |
|
|
|
|
|
|
|
} catch (error: Throwable) { |
|
|
|
|
|
|
|
block.cancel(error) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -59,6 +64,7 @@ class BackstageWebView( |
|
|
|
return encode ?: "utf-8" |
|
|
|
return encode ?: "utf-8" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Throws(AndroidRuntimeException::class) |
|
|
|
private fun load() { |
|
|
|
private fun load() { |
|
|
|
val webView = createWebView() |
|
|
|
val webView = createWebView() |
|
|
|
mWebView = webView |
|
|
|
mWebView = webView |
|
|
|