mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 01:41:48 +01:00
Require minimum WebView v88, try to catch fatal errors too
This commit is contained in:
parent
7a373fb43a
commit
f5f592be91
@ -11,14 +11,14 @@ import timber.log.Timber
|
|||||||
object WebViewUtil {
|
object WebViewUtil {
|
||||||
const val REQUESTED_WITH = "com.android.browser"
|
const val REQUESTED_WITH = "com.android.browser"
|
||||||
|
|
||||||
const val MINIMUM_WEBVIEW_VERSION = 87
|
const val MINIMUM_WEBVIEW_VERSION = 88
|
||||||
|
|
||||||
fun supportsWebView(context: Context): Boolean {
|
fun supportsWebView(context: Context): Boolean {
|
||||||
try {
|
try {
|
||||||
// May throw android.webkit.WebViewFactory$MissingWebViewPackageException if WebView
|
// May throw android.webkit.WebViewFactory$MissingWebViewPackageException if WebView
|
||||||
// is not installed
|
// is not installed
|
||||||
CookieManager.getInstance()
|
CookieManager.getInstance()
|
||||||
} catch (e: Exception) {
|
} catch (e: Throwable) {
|
||||||
Timber.e(e)
|
Timber.e(e)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user