mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +00:00
specific exception
This commit is contained in:
parent
6d209968ec
commit
7f17f1fafa
1 changed files with 2 additions and 3 deletions
|
@ -2,8 +2,7 @@ package chat.simplex.common.platform
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.security.keystore.KeyGenParameterSpec
|
import android.security.keystore.*
|
||||||
import android.security.keystore.KeyProperties
|
|
||||||
import chat.simplex.common.views.helpers.AlertManager
|
import chat.simplex.common.views.helpers.AlertManager
|
||||||
import chat.simplex.common.views.helpers.generalGetString
|
import chat.simplex.common.views.helpers.generalGetString
|
||||||
import chat.simplex.res.MR
|
import chat.simplex.res.MR
|
||||||
|
@ -81,7 +80,7 @@ internal class Cryptor: CryptorInterface {
|
||||||
val key = keyGenerator.generateKey()
|
val key = keyGenerator.generateKey()
|
||||||
Log.w(TAG, "StrongBox support is present")
|
Log.w(TAG, "StrongBox support is present")
|
||||||
key
|
key
|
||||||
} catch (e: Exception) {
|
} catch (e: StrongBoxUnavailableException) {
|
||||||
Log.w(TAG, "No StrongBox support")
|
Log.w(TAG, "No StrongBox support")
|
||||||
keyGenerator.init(builder.setIsStrongBoxBacked(false).build())
|
keyGenerator.init(builder.setIsStrongBoxBacked(false).build())
|
||||||
keyGenerator.generateKey()
|
keyGenerator.generateKey()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue