Created
June 11, 2019 22:54
-
-
Save mhammond/857fc5ff035afd02ceb5f3c766881d2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git app/build.gradle app/build.gradle | |
index c7408bc..363faa5 100644 | |
--- app/build.gradle | |
+++ app/build.gradle | |
@@ -274,6 +274,7 @@ afterEvaluate { | |
DefaultModuleIdentifier.newId('org.mozilla.appservices', 'fxaclient'), | |
DefaultModuleIdentifier.newId('org.mozilla.appservices', 'logins'), | |
DefaultModuleIdentifier.newId('org.mozilla.appservices', 'rustlog'), | |
+ DefaultModuleIdentifier.newId('org.mozilla.appservices', 'sync15'), | |
] | |
configurations.each { configuration -> | |
diff --git app/src/main/java/mozilla/lockbox/store/DataStore.kt app/src/main/java/mozilla/lockbox/store/DataStore.kt | |
index f1fb11e..4fe50e9 100644 | |
--- app/src/main/java/mozilla/lockbox/store/DataStore.kt | |
+++ app/src/main/java/mozilla/lockbox/store/DataStore.kt | |
@@ -16,7 +16,9 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.rx2.asSingle | |
import mozilla.appservices.logins.ServerPassword | |
import mozilla.appservices.logins.SyncUnlockInfo | |
+//import mozilla.appservices.sync15.SyncTelemetryPing | |
import mozilla.components.service.sync.logins.AsyncLoginsStorage | |
+import mozilla.components.service.sync.logins.SyncTelemetryPing | |
import mozilla.lockbox.action.DataStoreAction | |
import mozilla.lockbox.action.LifecycleAction | |
import mozilla.lockbox.extensions.filterByType | |
@@ -209,7 +211,11 @@ open class DataStore( | |
(syncState as Subject).onNext(SyncState.Syncing) | |
- backend.sync(syncConfig) | |
+ fun do_sync(config: SyncUnlockInfo) { | |
+ backend.sync(config) | |
+ } | |
+ | |
+ do_sync(syncConfig) | |
.asSingle(coroutineContext) | |
.doOnEvent { _, _ -> | |
(syncState as Subject).onNext(SyncState.NotSyncing) | |
diff --git app/src/test/java/mozilla/lockbox/mocks/MockLoginsStorage.kt app/src/test/java/mozilla/lockbox/mocks/MockLoginsStorage.kt | |
index c5ef8e1..fa200c3 100644 | |
--- app/src/test/java/mozilla/lockbox/mocks/MockLoginsStorage.kt | |
+++ app/src/test/java/mozilla/lockbox/mocks/MockLoginsStorage.kt | |
@@ -9,6 +9,7 @@ package mozilla.lockbox.mocks | |
import mozilla.appservices.logins.LoginsStorage | |
import mozilla.appservices.logins.ServerPassword | |
import mozilla.appservices.logins.SyncUnlockInfo | |
+import mozilla.appservices.sync15.SyncTelemetryPing | |
import mozilla.components.service.sync.logins.AsyncLoginsStorage | |
import mozilla.components.service.sync.logins.AsyncLoginsStorageAdapter | |
import mozilla.lockbox.support.DataStoreSupport | |
@@ -60,7 +61,14 @@ open class MockLoginsStorage : LoginsStorage { | |
override fun close() {} | |
- override fun sync(syncInfo: SyncUnlockInfo) {} | |
+ override fun sync(syncInfo: SyncUnlockInfo): SyncTelemetryPing { | |
+ return SyncTelemetryPing( | |
+ version = 1, | |
+ uid = "uid", | |
+ events = emptyList(), | |
+ syncs = emptyList() | |
+ ) | |
+ } | |
override fun reset() {} | |
diff --git build.gradle build.gradle | |
index 8bd3280..f1e30c7 100644 | |
--- build.gradle | |
+++ build.gradle | |
@@ -9,11 +9,11 @@ | |
buildscript { | |
ext.android_support_version = '28.0.0' | |
ext.kotlin_version = '1.3.0' | |
- ext.android_components_version = '0.54.0' | |
+ ext.android_components_version = '0.54.0-markh' | |
// Determined from | |
// https://github.com/mozilla-mobile/android-components/blob/v0.51.0/buildSrc/src/main/java/Dependencies.kt, | |
// where the version in the URL is the tag corresponding to `android_components_version`. | |
- ext.mozilla_appservices_version = '0.29.0' | |
+ ext.mozilla_appservices_version = '0.29.0-markh' | |
ext.lifecycle_version = '1.1.1' | |
ext.navigation_version = '1.0.0' | |
ext.rxbinding_version = '2.2.0' | |
@@ -45,6 +45,7 @@ buildscript { | |
allprojects { | |
repositories { | |
+ mavenLocal() | |
google() | |
// Required until 0.51.0 releases. | |
maven { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment