Our main dependency - android-components - is tightly integrated
against a certain version of appservices. Having a direct dependency
at the Fenix level is a foot-gun: it allows Fenix to consume an API-incompatible
version of appservices, breaking parts of android-components. Due to
how gradle dependency resolution works, this breakage is "silent": there are
no compile time warnings. A recent example of this is broken history sync,
and buggy FxA experience in Fenix.
This patch removes a direct dependency, letting android-components dictate
which appservices version should be used Fenix builds.
This patch integrates the new a-c BackgroundSyncManager, which is the
main entry point for interacting with Sync. Behind the scenes, it uses
WorkManager in order to sync configured syncable stores.
Current behaviour:
- sync runs on start, with a slight delay
- sync runs on a schedule few times a day, to lessen the startup sync burden
Also included is a basic UI integration in order to allow user to synchronize
on demand, and monitor sync state.
This patch integrates relevant a-c components, and updates the current Preferences
UI to allow signing-in and displaying basic account information (email, displayName).
Currently there's no Accounts UI, and so singing out or otherwise interacting with the
account isn't possible.
* greenfield (pure Fenix without anything added)
* firefoxNightly (To replace Firefox Nightly)
* firefoxBeta (To replace Firefox Beta)
* firefoxRelease (To replace Firefox Release)
For now it will be a bit annoying to have all those flavors. But once the transition has been
successfully completed we can start to tear them down again.
Once GeckoView universal builds are available we can get rid of the "abi" dimension.
If this is going to slow down the CI process then I might look into parallelizing the build
or potentially introducing a taskcluster CI setup (if that makes sense).
The Android Lifecycle Architecture component does not have fine-grained enough lifecycle event callbacks to safely manage Rx subscriptions in Fragment lifecycles. Added autodispose to simplify.