Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

676 B
Raw Blame
[env]
WRY_RUSTWEBVIEWCLIENT_CLASS_EXTENSION = { value = '''
    @Suppress("DEPRECATION")
    override fun onReceivedError(
        view: WebView,
        errorCode: Int,
        description: String?,
        failingUrl: String?
    ) {
        if (!WebviewRecovery.handleError(view, errorCode, currentUrl, failingUrl)) {
            super.onReceivedError(view, errorCode, description, failingUrl)
        }
    }

    override fun onReceivedSslError(
        view: WebView,
        handler: SslErrorHandler,
        error: android.net.http.SslError
    ) {
        handler.cancel()
        WebviewRecovery.handleSslError(view, currentUrl, error.url)
    }
''', force = true }