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>signin</w>
<w>signout</w> <w>signout</w>
<w>signup</w> <w>signup</w>
<w>ssss</w>
<w>threepid</w> <w>threepid</w>
</words> </words>
</dictionary> </dictionary>

View File

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