mirror of https://github.com/x13a/Wasted.git
fix preferences migration
This commit is contained in:
parent
0ff328e285
commit
083a1e1cdc
|
@ -13,6 +13,9 @@ class Preferences(ctx: Context) {
|
|||
private const val WIPE_DATA = "wipe_data"
|
||||
private const val WIPE_ESIM = "wipe_esim"
|
||||
private const val MAX_FAILED_PASSWORD_ATTEMPTS = "max_failed_password_attempts"
|
||||
|
||||
// migration
|
||||
private const val DO_WIPE = "do_wipe"
|
||||
}
|
||||
|
||||
private val mk = MasterKeys.getOrCreate(MasterKeys.AES256_GCM_SPEC)
|
||||
|
@ -37,7 +40,7 @@ class Preferences(ctx: Context) {
|
|||
set(value) = prefs.edit { putBoolean(CODE_ENABLED, value) }
|
||||
|
||||
var isWipeData: Boolean
|
||||
get() = prefs.getBoolean(WIPE_DATA, false)
|
||||
get() = prefs.getBoolean(WIPE_DATA, prefs.getBoolean(DO_WIPE, false))
|
||||
set(value) = prefs.edit { putBoolean(WIPE_DATA, value) }
|
||||
|
||||
var isWipeESIM: Boolean
|
||||
|
|
Loading…
Reference in New Issue