-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix crash in RemoveAccountFragment by implementing OnWebViewRecreatedListener #19581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BrayanDSO
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How Has This Been Tested?
Physical Device (Redmi)
this isn't a description of how has this been tested.
|
Based on the video, I assume that you just opened the fragment and probably didn't understand the issue. The fragment opens correctly even without this change. This is a onRenderProcessGone issue. And you aren't properly implementing onWebViewRecreatedListener. The webview isn't configured correctly on it |
It was crashing in debug apk |
|
In a real crash, the WebView process is dead (either due to a bug, or via the OOM-killer) and the called code likely won't reinitialize the new running Aside: we should document this |
e266cc5 to
74987a8
Compare
| } | ||
|
|
||
| @Deprecated( | ||
| "Deprecated in java, still needed for API 23", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minSdk is now 24, so no need to keep this
74987a8 to
9c7df4a
Compare
david-allison
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers!
|
Important We are trialling an increase to Open Collective payments, invoices submitted more than two weeks after the date you receive this message may not be eligible for this increase. Hi there @sanjaysargam! This is the OpenCollective Notice for PRs merged from 2025-11-01 through 2025-11-30 If you are interested in compensation for this work, the process with details is here: https://github.com/ankidroid/Anki-Android/wiki/OpenCollective-Payment-Process#how-to-get-paid We only post one comment per person per month to avoid spamming you, regardless of the number of PRs merged, but this note applies to all PRs merged for this month Please understand that our monthly budget is never guaranteed to cover all claims - the cap on payments-per-person may be lower, but we try to make our process as fair and transparent as possible, we just need your understanding. Thanks! |
Purpose / Description
RemoveAccountFragment was crashing on open because SafeWebViewLayout requires the host to implement OnWebViewRecreatedListener
Fixes
Approach
Implement listener and reinitialize WebView when recreated to avoid fragment crash
How Has This Been Tested?
Physical Device (Redmi 9 Pro 5G)
Checklist
Please, go through these checks before submitting the PR.