Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Document `OnWebViewRecreatedListener` and `onWebViewRecreated`

Open david-allison opened this issue 1 month ago • 0 comments

[!IMPORTANT] This issue is to be included in a research study, and should not be worked on

Document OnWebViewRecreatedListener/onWebViewRecreated

https://github.com/ankidroid/Anki-Android/blob/5f2258e2388ed51cae2e59031d6244061fd3f356/AnkiDroid/src/main/java/com/ichi2/anki/workarounds/SafeWebViewLayout.kt#L157-L160

  • When it is called
  • How it should be implemented, and why
  • How to test it
  • Whether it can be tested automatically
  • Whether @CallSuper is needed in CardViewerFragment::onWebViewRecreated

Here are some high level Android docs to get you started. A deeper dive into understanding onRenderProcessGone is necessary

https://developer.android.com/reference/android/webkit/WebViewClient#onRenderProcessGone(android.webkit.WebView,%20android.webkit.RenderProcessGoneDetail)

david-allison avatar Nov 23 '25 15:11 david-allison