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.)
========
fc8936549a
Author: Nick Alexander <nalexander@mozilla.com>
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.
========
c90ea353cc
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Feb 11 10:31:15 2015 -0800
Bug 1123107 - Part 2: Thread authorities to sync automatically through sign up/sign in flow.
========
e0c4d20744
Author: Nick Alexander <nalexander@mozilla.com>
Date: Mon Feb 9 12:35:15 2015 -0800
Bug 1123107 - Part 1: Manage map of automatically synced authorities.
========
7f7e308190
Author: Nick Alexander <nalexander@mozilla.com>
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.
========
21c63a8d1a
Author: vivek <vivekb.balakrishnan@gmail.com>
Bug 1058806 - Part 4: Maintain magic year state across orientation changes.
========
da074438fe
Author: vivek <vivekb.balakrishnan@gmail.com>
Date: Fri Jan 16 16:46:47 2015 +0200
Bug 1058806 - Part 3: Maintain magic year across create -> sign in -> create loop.
========
982d692575
Author: vivek <vivekb.balakrishnan@gmail.com>
Date: Sat Dec 20 20:07:45 2014 +0200
Bug 1058806 - Part 2: Add date and month to UI.
========
15594d36c9
Author: vivek <vivekb.balakrishnan@gmail.com>
Date: Sat Dec 20 04:36:49 2014 +0200
Bug 1058806 - Part 1: Make age pass check consider date and month.
--HG--
extra : rebase_source : 11ab11c519461fa1be8d6dda34777620db05468d
The menu is exposed as "More..." on devices that do not have a hardware
menu button.
========
8adeb1be57
Author: Nick Alexander <nalexander@mozilla.com>
Bug 984503 - Part 4: Show a toast after removing Firefox Account.
========
aeffca77dc
Author: Nick Alexander <nalexander@mozilla.com>
Bug 984503 - Part 3: Hide "More..." option if device has a hardware menu button.
The reason for this dance is to keep the "Remove Account" button out of
view if at all possible. I don't want to make it too easy to delete
your account.
========
4efe597308
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu Aug 28 15:04:38 2014 -0700
Bug 984503 - Part 2: Add "More..." to Firefox Account status list.
========
ad6a55dc33
Author: vivek <vivekb.balakrishnan@gmail.com>
Date: Thu Aug 21 00:25:30 2014 +0300
Bug 984503 - Part 1: Add menu option to remove Firefox Account.
The menu is exposed as "More..." on devices that do not have a hardware
menu button.
========
8adeb1be57
Author: Nick Alexander <nalexander@mozilla.com>
Bug 984503 - Part 4: Show a toast after removing Firefox Account.
========
aeffca77dc
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu Aug 28 15:05:11 2014 -0700
Bug 984503 - Part 3: Hide "More..." option if device has a hardware menu button.
The reason for this dance is to keep the "Remove Account" button out of
view if at all possible. I don't want to make it too easy to delete
your account.
========
4efe597308
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu Aug 28 15:04:38 2014 -0700
Bug 984503 - Part 2: Add "More..." to Firefox Account status list.
========
ad6a55dc33
Author: vivek <vivekb.balakrishnan@gmail.com>
Date: Thu Aug 21 00:25:30 2014 +0300
Bug 984503 - Part 1: Add menu option to remove Firefox Account.
--HG--
extra : rebase_source : 946b86baaa36de4b143d6d8a614f7cc3a2118a6a
========
cf613656fe
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1022749 - Part 2: Show custom server URLs in status activity.
========
91268a261f
Author: Nick Alexander <nalexander@mozilla.com>
Bug 1022749 - Part 1: Show custom server URLs in setup activities.
========
8c7b253142
Author: Nick Alexander <nalexander@mozilla.com>
Date: Tue Jun 3 15:48:40 2014 -0700
Bug 788688 - Review comment: Include timestamp in setClientName.
========
b53b9092c2
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu May 29 16:05:25 2014 -0700
Bug 788688 - Post: PII client data to ease debugging.
========
fd59f3c984
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Jun 4 15:01:12 2014 -0700
Bug 788688 - Part 4: Work around Android DialogPreference caching bug.
========
87d10bc16a
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu May 29 14:44:24 2014 -0700
Bug 788688 - Part 3: Add "Device name" pref to Status activity.
In the edge case where what the user has entered (empty text) and what
is persisted (default client name) differ, Android does not update the
contents of the dialog's EditText correctly. Removing and re-creating
all preferences is the only way I found to work around this; that's in
the next commit.
========
7af72f6c2f
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu May 29 16:05:59 2014 -0700
Bug 788688 - Part 2: Upload clients and tabs records when client name changes.
========
0e99eae1b5
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu May 29 15:28:36 2014 -0700
Bug 788688 - Part 1: Add setClientName with timestamp to ClientsDataDelegate.
========
1999e263db
Author: Nick Alexander <nalexander@mozilla.com>
Date: Thu May 29 14:10:40 2014 -0700
Bug 788688 - Pre: Clean some imports.