mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-31 22:35:17 +00:00
Fix OpenPgpApi extra type confusion (#960)
This commit is contained in:
@@ -313,7 +313,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
|
|||||||
}
|
}
|
||||||
val gpgIdentifierFileContent = gpgIdentifierFile.useLines { it.firstOrNull() } ?: ""
|
val gpgIdentifierFileContent = gpgIdentifierFile.useLines { it.firstOrNull() } ?: ""
|
||||||
when (val identifier = parseGpgIdentifier(gpgIdentifierFileContent)) {
|
when (val identifier = parseGpgIdentifier(gpgIdentifierFileContent)) {
|
||||||
is GpgIdentifier.KeyId -> data.putExtra(OpenPgpApi.EXTRA_KEY_IDS, arrayOf(identifier.id))
|
is GpgIdentifier.KeyId -> data.putExtra(OpenPgpApi.EXTRA_KEY_IDS, arrayOf(identifier.id).toLongArray())
|
||||||
is GpgIdentifier.UserId -> data.putExtra(OpenPgpApi.EXTRA_USER_IDS, arrayOf(identifier.email))
|
is GpgIdentifier.UserId -> data.putExtra(OpenPgpApi.EXTRA_USER_IDS, arrayOf(identifier.email))
|
||||||
null -> {
|
null -> {
|
||||||
snackbar(message = resources.getString(R.string.invalid_gpg_id))
|
snackbar(message = resources.getString(R.string.invalid_gpg_id))
|
||||||
|
Reference in New Issue
Block a user