Closed Bug 1191068 Opened 7 years ago Closed 7 years ago

Support "choose what to Sync" on the web in Fennec


(Android Background Services Graveyard :: Firefox Accounts, defect)

Not set


(firefox44 verified, firefox45 verified)

Firefox 44
Tracking Status
firefox44 --- verified
firefox45 --- verified


(Reporter: nalexander, Assigned: nalexander)




(1 file)

This ticket tracks updating Fennec's web sign in flow to speak the language of Bug 1183917.
There are a few technical pieces here:

1) accept the chooseWhatToSync set of engines (post Bug 1183917) in the LOGIN message (in mobile/android/modules/FxAccountsWebChannel.jsm) and ferry it to the createAccountFromJSON message.

2) write the settings to Sync's SharedPrefs.

3) test!
If Bug 1183917 doesn't happen for day one of Fennec's FxA sign in on the web, we need to accept the "chooseWhatToSync" flag from the LOGIN message and persist it.

Then, we need to delay Syncing until we can get the desired set of engines from the user.  That could be a modal dialog, or it could be a notification that requires user intervention before we begin.  The latter is nicer, but much harder: it probably looks like a new Account State, with a tailored notification and a special native UI Activity to make the choice.  We don't want to do that :(
Many of the content-server bugs tracking this work got closed out when it was de-prioritized for desktop; I filed a fresh one to specifically discuss this as part of the Fennec web-login work:
Bug 1191068 - Support "Choose what to Sync" in Fennec web sign in. r?vivek

The set operation is:

* known engines are enabled by default;
* unchecked engines from fxa-content-server are disabled;
* the "forms" engine is special: it's always the same as "history".
Attachment #8679572 - Flags: review?(vivekb.balakrishnan)

::: mobile/android/base/
(Diff revision 1)
> +                    } catch (UnsupportedEncodingException | GeneralSecurityException e) {

storeSelectedEnginesToPrefs() does not throw either UnSupportedEncodingException or GeneralSecurityEXception. How about catch(Exception here?

LGTM except for the issue with exceptions that are caught

My bad. getSyncPrefs() did throw those Exception.
Attachment #8679572 - Flags: review?(vivekb.balakrishnan) → review+
Comment on attachment 8679572 [details]
MozReview Request: Bug 1191068 - Support "Choose what to Sync" in Fennec web sign in. r?vivek
mihai: since you tested some of the related Firefox Accounts and Sync functionality, could you test this?

You'll want to create a new Firefox Account in Fennec, and select what to Sync.  Try disabling a few boxes.  You should see your changes in the status activity, and a second client should pick up your changes.

"History" is special.  You should see "History" and "Forms" being enabled and disabled together.  You can test these two get turned on/off together by looking at the |adb logcat| entries in Fennec; if you have History checked you should see history and forms syncing; if you have it unchecked, you should see neither of them syncing.  (Same in Desktop.)

Assignee: nobody → nalexander
Flags: needinfo?(mihai.ninu)
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Verified as fixed on both latest Nightly (45.0a1) and Aurora (44.0a2) on Sony Xperia Z2 with 5.0.2 Android and Xiaomi Mi i4 with 5.0.2 Android version
Flags: needinfo?(mihai.ninu)
You need to log in before you can comment on or make changes to this bug.