mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Revert change done to save alias for the client
This commit is contained in:
parent
fdaaca49c2
commit
ced72aff4f
2 changed files with 4 additions and 5 deletions
|
@ -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.session.securestorage.SecureStorageService
|
||||||
import im.vector.matrix.android.api.util.SecretStoringUtils
|
import im.vector.matrix.android.api.util.SecretStoringUtils
|
||||||
import im.vector.matrix.android.internal.di.UserMd5
|
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
import java.io.OutputStream
|
import java.io.OutputStream
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class DefaultSecureStorageService @Inject constructor(@UserMd5 private val userMd5: String,
|
internal class DefaultSecureStorageService @Inject constructor(private val secretStoringUtils: SecretStoringUtils) : SecureStorageService {
|
||||||
private val secretStoringUtils: SecretStoringUtils) : SecureStorageService {
|
|
||||||
|
|
||||||
override fun securelyStoreObject(any: Any, keyAlias: String, outputStream: OutputStream) {
|
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? {
|
override fun <T> loadSecureSecret(inputStream: InputStream, keyAlias: String): T? {
|
||||||
return secretStoringUtils.loadSecureSecret(inputStream, "${userMd5}_$keyAlias")
|
return secretStoringUtils.loadSecureSecret(inputStream, keyAlias)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -484,6 +484,7 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
||||||
private const val ROOM_MESSAGES_NOTIFICATION_ID = 1
|
private const val ROOM_MESSAGES_NOTIFICATION_ID = 1
|
||||||
private const val ROOM_EVENT_NOTIFICATION_ID = 2
|
private const val ROOM_EVENT_NOTIFICATION_ID = 2
|
||||||
|
|
||||||
|
// TODO Mutliaccount
|
||||||
private const val ROOMS_NOTIFICATIONS_FILE_NAME = "im.vector.notifications.cache"
|
private const val ROOMS_NOTIFICATIONS_FILE_NAME = "im.vector.notifications.cache"
|
||||||
|
|
||||||
private const val KEY_ALIAS_SECRET_STORAGE = "notificationMgr"
|
private const val KEY_ALIAS_SECRET_STORAGE = "notificationMgr"
|
||||||
|
|
Loading…
Reference in a new issue