Use const from DefaultSharedSecretStorageService

This commit is contained in:
Benoit Marty 2020-02-14 18:33:15 +01:00
parent 7878da25b8
commit 4c3b754de4
2 changed files with 5 additions and 4 deletions

View file

@ -22,6 +22,7 @@
<w>signin</w>
<w>signout</w>
<w>signup</w>
<w>ssss</w>
<w>threepid</w>
</words>
</dictionary>

View file

@ -79,10 +79,10 @@ class QuadSTests : InstrumentedTest {
var accountData: UserAccountDataEvent? = null
val liveAccountData = runBlocking(Dispatchers.Main) {
aliceSession.getLiveAccountDataEvent("m.secret_storage.key.$TEST_KEY_ID")
aliceSession.getLiveAccountDataEvent("${DefaultSharedSecretStorageService.KEY_ID_BASE}.$TEST_KEY_ID")
}
val accountDataObserver = Observer<Optional<UserAccountDataEvent>?> { t ->
if (t?.getOrNull()?.type == "m.secret_storage.key.$TEST_KEY_ID") {
if (t?.getOrNull()?.type == "${DefaultSharedSecretStorageService.KEY_ID_BASE}.$TEST_KEY_ID") {
accountData = t.getOrNull()
accountDataLock.countDown()
}
@ -328,7 +328,7 @@ class QuadSTests : InstrumentedTest {
quadS.generateKey(keyId, keyId, emptyKeySigner, it)
}
assertAccountData(session, "m.secret_storage.key.$keyId")
assertAccountData(session, "${DefaultSharedSecretStorageService.KEY_ID_BASE}.$keyId")
if (asDefault) {
mTestHelper.doSync<Unit> {
@ -353,7 +353,7 @@ class QuadSTests : InstrumentedTest {
it)
}
assertAccountData(session, "m.secret_storage.key.$keyId")
assertAccountData(session, "${DefaultSharedSecretStorageService.KEY_ID_BASE}.$keyId")
if (asDefault) {
val setDefaultLatch = CountDownLatch(1)
quadS.setDefaultKey(keyId, TestMatrixCallback(setDefaultLatch))