Revert change done to save alias for the client

This commit is contained in:
Benoit Marty 2019-09-17 10:32:09 +02:00
parent fdaaca49c2
commit ced72aff4f
2 changed files with 4 additions and 5 deletions

View file

@ -18,19 +18,17 @@ package im.vector.matrix.android.internal.session.securestorage
import im.vector.matrix.android.api.session.securestorage.SecureStorageService
import im.vector.matrix.android.api.util.SecretStoringUtils
import im.vector.matrix.android.internal.di.UserMd5
import java.io.InputStream
import java.io.OutputStream
import javax.inject.Inject
internal class DefaultSecureStorageService @Inject constructor(@UserMd5 private val userMd5: String,
private val secretStoringUtils: SecretStoringUtils) : SecureStorageService {
internal class DefaultSecureStorageService @Inject constructor(private val secretStoringUtils: SecretStoringUtils) : SecureStorageService {
override fun securelyStoreObject(any: Any, keyAlias: String, outputStream: OutputStream) {
secretStoringUtils.securelyStoreObject(any, "${userMd5}_$keyAlias", outputStream)
secretStoringUtils.securelyStoreObject(any, keyAlias, outputStream)
}
override fun <T> loadSecureSecret(inputStream: InputStream, keyAlias: String): T? {
return secretStoringUtils.loadSecureSecret(inputStream, "${userMd5}_$keyAlias")
return secretStoringUtils.loadSecureSecret(inputStream, keyAlias)
}
}

View file

@ -484,6 +484,7 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
private const val ROOM_MESSAGES_NOTIFICATION_ID = 1
private const val ROOM_EVENT_NOTIFICATION_ID = 2
// TODO Mutliaccount
private const val ROOMS_NOTIFICATIONS_FILE_NAME = "im.vector.notifications.cache"
private const val KEY_ALIAS_SECRET_STORAGE = "notificationMgr"