mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
Mark key import dialogs as non-cancellable
This commit is contained in:
@@ -82,7 +82,7 @@ class PGPKeyImportActivity : AppCompatActivity() {
|
|||||||
.setTitle(getString(R.string.pgp_key_import_succeeded))
|
.setTitle(getString(R.string.pgp_key_import_succeeded))
|
||||||
.setMessage(getString(R.string.pgp_key_import_succeeded_message, tryGetId(key)))
|
.setMessage(getString(R.string.pgp_key_import_succeeded_message, tryGetId(key)))
|
||||||
.setPositiveButton(android.R.string.ok) { _, _ -> finish() }
|
.setPositiveButton(android.R.string.ok) { _, _ -> finish() }
|
||||||
.setOnCancelListener { finish() }
|
.setCancelable(false)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
is Err<Throwable> -> {
|
is Err<Throwable> -> {
|
||||||
@@ -94,14 +94,14 @@ class PGPKeyImportActivity : AppCompatActivity() {
|
|||||||
handleImportResult(runCatching { importKey(lastBytes!!, replace = true) })
|
handleImportResult(runCatching { importKey(lastBytes!!, replace = true) })
|
||||||
}
|
}
|
||||||
.setNegativeButton(R.string.dialog_no) { _, _ -> finish() }
|
.setNegativeButton(R.string.dialog_no) { _, _ -> finish() }
|
||||||
.setOnCancelListener { finish() }
|
.setCancelable(false)
|
||||||
.show()
|
.show()
|
||||||
} else {
|
} else {
|
||||||
MaterialAlertDialogBuilder(this)
|
MaterialAlertDialogBuilder(this)
|
||||||
.setTitle(getString(R.string.pgp_key_import_failed))
|
.setTitle(getString(R.string.pgp_key_import_failed))
|
||||||
.setMessage(result.error.message)
|
.setMessage(result.error.message)
|
||||||
.setPositiveButton(android.R.string.ok) { _, _ -> finish() }
|
.setPositiveButton(android.R.string.ok) { _, _ -> finish() }
|
||||||
.setOnCancelListener { finish() }
|
.setCancelable(false)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user