You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
7801: Closesmozilla-mobile#7782: Fix crashes in addon installation dialog r=Amejia481 a=csadilek
This fixes the following problems with `AddonInstallationDialogFragment`:
- It didn't have a default constructor. So any attempt by Android to restore it caused a crash e.g. when rotating the device.
- Since we're displaying the fragment as a result of an async operation it can happen that the "parent" fragment is still attached, our check of `runIfFragmentAttached` succeeds, but the activity is in the process of being destroyed. Then we run into the crash described in mozilla-mobile#7782. I've added the workaround here (seems pretty common based on my research) with a description of why it seems safe to me, but thoughts more than welcome. :)
- The icon fetch job was returned but never cancelled. It's also not need to fetch the icon again when rotating.
Co-authored-by: Christian Sadilek <[email protected]>
Copy file name to clipboardExpand all lines: components/feature/addons/src/main/java/mozilla/components/feature/addons/ui/AddonInstallationDialogFragment.kt
Copy file name to clipboardExpand all lines: components/feature/addons/src/test/java/mozilla/components/feature/addons/ui/AddonInstallationDialogFragmentTest.kt
0 commit comments