Closed Bug 1191068 Opened 9 years ago Closed 9 years ago

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

Categories

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

defect
Not set
normal

Tracking

(firefox44 verified, firefox45 verified)

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

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(1 file)

This ticket tracks updating Fennec's web sign in flow to speak the language of Bug 1183917.
Blocks: 1191067, 1191064
No longer blocks: 1161234
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:

  https://github.com/mozilla/fxa-content-server/issues/3080
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)
https://reviewboard.mozilla.org/r/23485/#review20925

::: mobile/android/base/AccountsHelper.java:138
(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
https://reviewboard.mozilla.org/r/23485/#review20927

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

https://reviewboard.mozilla.org/r/23487/#review20931
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.)

Thanks!
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Flags: needinfo?(mihai.ninu)
https://hg.mozilla.org/mozilla-central/rev/c8445cec6e86
Status: ASSIGNED → RESOLVED
Closed: 9 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.

Attachment

General

Created:
Updated:
Size: