fune/mobile/android/android-components/components/browser/storage-sync
Lina Butler 9950994d0d Bug 1895171 - Queue outgoing synced tabs commands. r=markh,jonalmeida,007,android-reviewers
This commit adopts the new `RemoteCommandStore` interface to queue
and flush outgoing tab management commands. It works like this:

* `DeviceCommandQueue` provides a generic interface for
  queueing and flushing device commands. Any queueable command can
  implement the `DeviceCommandQueue.Type` marker interface.
* `RemoteTabsCommandQueue` specializes `DeviceCommandQueue` for
  remote tabs commands. The implementation wraps the Rust
  `RemoteCommandStore` interface.
* `SyncedTabsCommands` connects a `RemoteTabsCommandQueue`
  to an `FxaAccountManager` for sending the commands.
* `BackgroundServices` observes the `SyncedTabsCommands` queue, and
  schedules a `SyncedTabsCommandsFlushWorker` to flush the queue
  when a command is added.
* The synced tabs `DefaultPresenter` also observes the
  `SyncedTabsCommands` queue, and refreshes the list of tabs when
  the queue is updated.

The queue allows for retries if the command can't be sent, for eventual
expiration of commands that haven't been sent, and for undoing a close,
though the latter two aren't implemented in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D210887
2024-06-01 02:15:15 +00:00
..
src Bug 1895171 - Queue outgoing synced tabs commands. r=markh,jonalmeida,007,android-reviewers 2024-06-01 02:15:15 +00:00
build.gradle Bug 1849833 - Replace deprecated compileSdkVersion. 2023-09-11 06:36:20 +00:00
README.md

Android Components > Browser > Sync Storage

A syncable implementation of concept-storage backed by application-services' Places lib.

Before using this component

Products sending telemetry and using this component must request a data-review following this process. This component provides data collection using the Glean SDK. The list of metrics being collected is available in the metrics documentation.

Setting up the dependency

Use Gradle to download the library from maven.mozilla.org (Setup repository):

implementation "org.mozilla.components:browser-storage-sync:{latest-version}"

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/