Summary
The WebViewClient in app/src/main/java/ch/tiim/markdown_widget/MarkdownRenderer.kt overrides onPageFinished but does not override onReceivedError. When the widget hits an error during the WebView render step (for example a malformed HTML payload from the parser, or a resource the rendered markdown references that fails to load), onPageFinished still fires, the bitmap gets drawn from a half-loaded WebView, and the widget shows a blank or partially rendered tile with nothing in logcat to point at the cause.
Proposal
Add a minimal onReceivedError(view, request, error) override that logs the error code, description and failing URL with Log.w(TAG, ...), filtered to main-frame requests so subresource failures inside the rendered markdown do not flood logcat. Logging only, no UI change, no behavior change in the happy path.
The new API 23+ (WebView, WebResourceRequest, WebResourceError) signature is used because minSdk is 24.
Summary
The
WebViewClientinapp/src/main/java/ch/tiim/markdown_widget/MarkdownRenderer.ktoverridesonPageFinishedbut does not overrideonReceivedError. When the widget hits an error during the WebView render step (for example a malformed HTML payload from the parser, or a resource the rendered markdown references that fails to load),onPageFinishedstill fires, the bitmap gets drawn from a half-loaded WebView, and the widget shows a blank or partially rendered tile with nothing in logcat to point at the cause.Proposal
Add a minimal
onReceivedError(view, request, error)override that logs the error code, description and failing URL withLog.w(TAG, ...), filtered to main-frame requests so subresource failures inside the rendered markdown do not flood logcat. Logging only, no UI change, no behavior change in the happy path.The new API 23+
(WebView, WebResourceRequest, WebResourceError)signature is used becauseminSdkis 24.