gecko/mobile
Andrzej Hunt e01296ef75 Bug 1254468 - Remove broken TransitionAwareCursorLoaderCallbacks r=sebastian a=ritu
TransitionAwareCursorLoaderCallbacks is fundamentally flawed: old CursorLoader
cursors _must_ not be used after onLoadFinished has been called. However
we sometimes queue the cursor swapping (which is implemented by subclasses
in onLoadFinishedAfterTransitions) until after transitions have finished.
CursorLoader.deliverResult() closes the old cursor immediately after calling
onLoadFinished (with the new cursor). At this stage the adapter is
still holding onto the old (but now closed cursor), and will crash if it tries
to read this cursor (which can happen if the adapter is still iterating over the
cursor).

Instead we should ensure that we swap the cursors during onLoadFinished - the simplest
way to do this is by eliminating TransitionAwareCursorLoader and using onLoadFinished
the way the Android framework expects.

It's worth noting that TransitionAwareCursorLoader is obsolete: at the time it was added,
home panels were placed in the HomePagerTabStrip, which notified TransitionsTracker about
its transitions. However HomePagerTabStrip no longer exists, hence there's no need
for us to care about these transitions anymore. (The crash seems to happen because we
try to hide the doorhanger every time we receive LOCATION_CHANGE, and each of these starts
a hide transition - even if no doorhanger is shown - hence we often have a transition
in progress every time we show topsites.)

MozReview-Commit-ID: HsytLpHOrp2
2016-03-14 15:38:53 -07:00
..
android Bug 1254468 - Remove broken TransitionAwareCursorLoaderCallbacks r=sebastian a=ritu 2016-03-14 15:38:53 -07:00
locales Bug 1251278 - Remove obsolete Yahoo parameter preferences, r=mconnor. 2016-02-29 11:46:37 +01:00