Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

Commit 71b63e4

Browse files
Dexterp37Elise Richards
authored andcommitted
Bump the required Android Components version to 19.0.1 (#1070)
* Bump the required Android Components version to 19.0.1 This is the first version that comes with a Rust implementation of the Glean SDK. * Fix AccountStore.kt after upgrading to A-C 19.0.1 * Suppress deprecation notice for service-telemetry This is required since Lockwise fails to build due to errors after upgrading to A-C 19.0.1 * Implement the missing methods in `MockLoginsStorage.kt`
1 parent 3192ef7 commit 71b63e4

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

app/src/main/java/mozilla/lockbox/store/AccountStore.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ open class AccountStore(
281281

282282
fxa.beginOAuthFlowAsync(Constant.FxA.scopes)
283283
.asMaybe(coroutineContext)
284+
.map { it.url }
284285
.subscribe((this.loginURL as Subject)::onNext, this::pushError)
285286
.addTo(compositeDisposable)
286287
}

app/src/main/java/mozilla/lockbox/store/TelemetryStore.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
55
*/
66

7+
// The 'service-telemetry' library is deprecated and will go away. Until the Glean
8+
// SDK is fully integrated with Lockwise for Android, keep the suppression on. See
9+
// bug 1597623.
10+
@file:Suppress("DEPRECATION")
11+
712
package mozilla.lockbox.store
813

914
import android.content.Context

app/src/test/java/mozilla/lockbox/mocks/MockLoginsStorage.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ open class MockLoginsStorage : LoginsStorage {
7676
override fun wipe() {}
7777

7878
override fun wipeLocal() {}
79+
80+
override fun getByHostname(hostname: String): List<ServerPassword> {
81+
return all.filter { hostname == it.hostname }
82+
}
83+
84+
override fun getHandle(): Long {
85+
throw UnsupportedOperationException()
86+
}
87+
88+
override fun importLogins(logins: Array<ServerPassword>): Long {
89+
all.addAll(logins)
90+
return 0 // no errors
91+
}
7992
}
8093

8194
class MockDataStoreSupport : DataStoreSupport {

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
buildscript {
1010
ext.android_support_version = '28.0.0'
1111
ext.kotlin_version = '1.3.0'
12-
ext.android_components_version = '9.0.0'
12+
ext.android_components_version = '19.0.1'
1313
// Determined from
14-
// https://github.com/mozilla-mobile/android-components/blob/v0.51.0/buildSrc/src/main/java/Dependencies.kt,
14+
// https://github.com/mozilla-mobile/android-components/blob/v19.0.1/buildSrc/src/main/java/Dependencies.kt,
1515
// where the version in the URL is the tag corresponding to `android_components_version`.
1616
ext.mozilla_appservices_version = '0.42.0'
1717
ext.lifecycle_version = '1.1.1'

0 commit comments

Comments
 (0)