mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent crash in case of exception while creating the MasterKey in VFS
This commit is contained in:
parent
e7a4a24eaf
commit
7f49a7756c
1 changed files with 5 additions and 5 deletions
|
|
@ -111,12 +111,12 @@ class VFS {
|
|||
}
|
||||
|
||||
private fun getEncryptedSharedPreferences(context: Context): SharedPreferences? {
|
||||
val masterKey: MasterKey = MasterKey.Builder(
|
||||
context,
|
||||
MasterKey.DEFAULT_MASTER_KEY_ALIAS
|
||||
).setKeyScheme(MasterKey.KeyScheme.AES256_GCM).build()
|
||||
|
||||
return try {
|
||||
val masterKey: MasterKey = MasterKey.Builder(
|
||||
context,
|
||||
MasterKey.DEFAULT_MASTER_KEY_ALIAS
|
||||
).setKeyScheme(MasterKey.KeyScheme.AES256_GCM).build()
|
||||
|
||||
EncryptedSharedPreferences.create(
|
||||
context,
|
||||
ENCRYPTED_SHARED_PREFS_FILE,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue