[components] Part 3: Simplify device management code
commitdc5c888a08090e8c101c37a601a1e34f856341eb
authorGrisha Kruglov <gkruglov@mozilla.com>
Thu, 15 Aug 2019 01:06:49 +0000 (14 18:06 -0700)
committerGrisha Kruglov <gkruglov@mozilla.com>
Mon, 19 Aug 2019 20:04:39 +0000 (19 13:04 -0700)
treebaa460e3abed66d8e3ee69cb866dc6e122f783ee
parentb509300eae7b9420b74fe02e2eadf83f8391a75d
[components] Part 3: Simplify device management code

This removes ability to automatically poll for device events.
That removal allows for a nice simplification of the two awkward classes
that split the same responsibilities.

Ability to automatically poll in the background is removed because we now
have proper push support (see `feature-push` and friends). Automatic polling
isn't something we'd like to see applications engage in, so let's not enable them.

Manual event polling is still possible via a simplified API call.
Refreshing constellation state is now possible without polling for events.
13 files changed:
mobile/android/android-components/components/concept/sync/src/main/java/mozilla/components/concept/sync/Devices.kt
mobile/android/android-components/components/service/firefox-accounts/README.md
mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FirefoxAccount.kt
mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FxaDeviceConstellation.kt
mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/Types.kt
mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/manager/FxaAccountManager.kt
mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/manager/FxaDeviceManager.kt [deleted file]
mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/sync/WorkManagerSyncManager.kt
mobile/android/android-components/components/service/firefox-accounts/src/test/java/mozilla/components/service/fxa/FxaAccountManagerTest.kt
mobile/android/android-components/components/service/firefox-accounts/src/test/java/mozilla/components/service/fxa/FxaDeviceConstellationTest.kt [new file with mode: 0644]
mobile/android/android-components/components/service/firefox-accounts/src/test/java/mozilla/components/service/fxa/manager/PollingDeviceManagerTest.kt [deleted file]
mobile/android/android-components/docs/changelog.md
mobile/android/android-components/samples/sync/src/main/java/org/mozilla/samples/sync/MainActivity.kt