From ced72aff4f2a37c82af41a9d6a22a9df1fd67213 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 17 Sep 2019 10:32:09 +0200 Subject: [PATCH] Revert change done to save alias for the client --- .../session/securestorage/DefaultSecureStorageService.kt | 8 +++----- .../features/notifications/NotificationDrawerManager.kt | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/securestorage/DefaultSecureStorageService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/securestorage/DefaultSecureStorageService.kt index bd052f962c..7640acfa49 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/securestorage/DefaultSecureStorageService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/securestorage/DefaultSecureStorageService.kt @@ -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 loadSecureSecret(inputStream: InputStream, keyAlias: String): T? { - return secretStoringUtils.loadSecureSecret(inputStream, "${userMd5}_$keyAlias") + return secretStoringUtils.loadSecureSecret(inputStream, keyAlias) } } diff --git a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt index 01fa3210bd..551bbb808b 100644 --- a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt +++ b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt @@ -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"