mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
93d39d6ddf
This is a reasonable-sized refactoring underneath a small feature-patch. The refactor reworks what information we maintain (and pickle) about "enabled" services. We've moved from a boolean "Sync enabled" flag to a map of Android authorities (which map to services like Firefox Sync and reading list) and boolean flags indicating whether each authority is "automatically synced". The checkboxes in the status activity correspond directly to whether the authority (service) is automatically synced. The set of authorities we care about is determined by the DEFAULT_* map. Said map is interrogated and written to the pickle file at Sync time. When the pickle file is un-pickled, only the set of known authorities is acted upon. What that means is that both writing and reading a pickle file with different sets of authorities should work across upgrades: if a known authority is missing, the default value will be used; if an unknown authority is present, it will be ignored. This lets us alter the set of known authorities via the build flag. I have tested and Android maintains the "sync automatically" state for an authority even when the authority is not present in the list of sync checkboxes. All in all, I'm not concerned about toggling the build flag multiple times in the future. (If we backed out the updated pickling code, we would need to handle pickle downgrades, but we already needed to handle that.) ======== |
||
---|---|---|
.. | ||
background | ||
browser | ||
moz.build |