mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 00:17:47 -10:00
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.) ======== https://github.com/mozilla-services/android-sync/commit/fc8936549a7ae77213736540f8701a561f73de4f Author: Nick Alexander <[email protected]> Date: Wed Feb 11 10:37:34 2015 -0800 Bug 1123107 - Part 3: Include Reading List checkbox during account creation. We are careful to show the checkbox only when the reading list service is enabled. ======== https://github.com/mozilla-services/android-sync/commit/c90ea353cc4e4426ba5ba24b3dda21e0032c4b01 Author: Nick Alexander <[email protected]> Date: Wed Feb 11 10:31:15 2015 -0800 Bug 1123107 - Part 2: Thread authorities to sync automatically through sign up/sign in flow. ======== https://github.com/mozilla-services/android-sync/commit/e0c4d2074431ef1647ed9ae6ea5578316a1e5707 Author: Nick Alexander <[email protected]> Date: Mon Feb 9 12:35:15 2015 -0800 Bug 1123107 - Part 1: Manage map of automatically synced authorities. ======== https://github.com/mozilla-services/android-sync/commit/7f7e308190f792a47dbb640dd6e0acdb0b08212e Author: Nick Alexander <[email protected]> Date: Mon Feb 9 11:54:54 2015 -0800 Bug 1123107 - Part 0: Remove "account needs to be enabled" warning in status activity. As we move Sync to a model where a status checkbox sets whether a single ContentProvider is synced, it no longer makes sense to message when the "account" is not automatically syncing.