android-components / mozilla.components.service.fxa.sync / GlobalSyncableStoreProvider


object GlobalSyncableStoreProvider (source)

A singleton registry of SyncableStore objects. WorkManagerSyncDispatcher will use this to access configured SyncableStore instances.

This pattern provides a safe way for library-defined background workers to access globally available instances of stores within an application.


Name Summary
configureKeyStorage fun configureKeyStorage(ks: SecureAbove22Preferences): Unit
Set an instance of SecureAbove22Preferences used for accessing an encryption key for SyncEngine.Passwords.
configureStore fun configureStore(storePair: Pair<SyncEngine, SyncableStore>): Unit
Configure an instance of SyncableStore for a SyncEngine enum.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.