Check opening database in read only to saving data

This commit is contained in:
J-Jamet
2020-11-01 12:52:02 +01:00
parent 813240e233
commit f5a28c83f0

View File

@@ -517,15 +517,25 @@ open class PasswordActivity : SpecialModeActivity() {
clearCredentialsViews() clearCredentialsViews()
} }
databaseFileUri?.let { databaseUri -> if (readOnly && (
// Show the progress dialog and load the database mSpecialMode == SpecialMode.SAVE
showProgressDialogAndLoadDatabase( || mSpecialMode == SpecialMode.REGISTRATION)
databaseUri, ) {
password, Log.e(TAG, getString(R.string.autofill_read_only_save))
keyFileUri, Snackbar.make(activity_password_coordinator_layout,
readOnly, R.string.autofill_read_only_save,
cipherDatabaseEntity, Snackbar.LENGTH_LONG).asError().show()
false) } else {
databaseFileUri?.let { databaseUri ->
// Show the progress dialog and load the database
showProgressDialogAndLoadDatabase(
databaseUri,
password,
keyFileUri,
readOnly,
cipherDatabaseEntity,
false)
}
} }
} }