Fix OpenPgpApi extra type confusion (#960)

(cherry picked from commit da167599d2)
This commit is contained in:
Fabian Henneke 2020-07-23 15:59:12 +02:00 committed by Harsh Shandilya
parent dc3fcbdc8e
commit 859da9d914
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -313,7 +313,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
}
val gpgIdentifierFileContent = gpgIdentifierFile.useLines { it.firstOrNull() } ?: ""
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))
null -> {
snackbar(message = resources.getString(R.string.invalid_gpg_id))