Closed Bug 988605 Opened 10 years ago Closed 7 years ago

Pickle on AndroidFxAccount.setState

Categories

(Firefox for Android Graveyard :: Firefox Accounts, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: nalexander, Unassigned)

References

Details

Nothing like running the code to really get an understanding of what's happening.

We currently write the pickle file at the start of a sync.  Of course, the first thing a sync does is update the state of the Account.  So the pickle is perpetually behind.  This isn't really a problem, since nothing manifests itself as a result of the outdated state, but it does show a weakness in our approach.

I suggest that we pickle on AndroidFxAccount creation and also on updates (which for now are only setState).  We could spawn a task to pickle in the background each time, but I actually want to use the same semantics for updating a putative FxAccount Loader in Bug 988574.  So I suggest a pickling service and a PER_ACCOUNT_TYPE Android broadcast.  We should generalize the FxAccountDeletedService to a more general service that handles both these intents.  And then I can make an FxAccount Loader listen for those intents as well.
This did manifest itself in Bug 1400742. From conversations with Nick, I think the way forward is to evaluate if we still need to pickle account data, now that we don't support installing Fennec onto SD Cards. It seems to me that we do not.
Component: Android Sync → Firefox Accounts
Product: Android Background Services → Firefox for Android
I've elected to pickle on account creation in Bug 1404124 as a workaround for the pickle races.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
See Also: → 1404124
Oops; accidentally jammed the fixed button. I think this is a wontfix, actually. See Comment 1.
Resolution: FIXED → WONTFIX
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.