Closed Bug 1041840 Opened 10 years ago Closed 4 years ago

Dynamic home panels' setDataset can clear cached data on rotation

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mcomella, Unassigned)

Details

Discovered while creating a fullscreen image panel view for bug 1025546.

On rotation, setDataset is called twice - once with null, and once again with the appropriate dataset. This can cause issues because my dynamic view downloads and caches images in memory, which is then dropped in setDataset when it's called with null. Margaret mentioned the addon is probably calling maybeSetDataset with null from PanelLayout.onDetachedFromWindow [1] on rotation, 

I can code around this issue (e.g. have an image cache independent of dataset), but it's probably not efficient and can be a surprise to developers (e.g. Margaret mentioned some other panel types might also suffer from this issue).

[1]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/PanelLayout.java?rev=f574d2d9ef70#257
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.